Method: Roi#find_frame_not_displayed
- Defined in:
- lib/roi/roi.rb
#find_frame_not_displayed(frames, start_time, args = {}) ⇒ Object
Public: Finds the frame in which the given Roi does not verify.
Corresponds to: api_find_non_<ROI TYPE>_frame
frames - Array of frames to search, each being a Hash with the following keys:
:filename - String full path to the frame on the server.
:capturedAt - Time at which the frame was captured.
:keep - Boolean indicating whether to keep the frame if cleanup is true. Initializes false.
start_time - Time at which frame capture began. starting_frame - Integer index of frame at which to start evaluation (default: 0). timeout - Integer total milliseconds to allow before timing out (default: nil).
If default, all frames will be searched.
scale - Boolean if the larger image should be scaled to the size of the smaller image (default: false).
Applies to image ROIs only.
verifies_for - Integer total milliseconds for which the ROI must continuously verify in order to be counted
successful (default: 0).
If default, the ROI must only verify once.
priority - Symbol evaluation priority used to throttle CPU usage (default: :normal):
:critical - Sleep 10 ms between intensive tasks (USE SPARINGLY)
:high - Sleep 100 ms between intensive tasks
:normal - Sleep 1 second between intensive tasks
:low - Sleep 10 seconds between intensive tasks
:background - Sleep 1 minute between intensive tasks (USE SPARINGLY)
log_every - Integer total milliseconds between logs (default: 1000). report - Boolean indicating whether to report measurements to ITMS (default: false).
Returns the Integer index of the matching frame.
620 621 622 623 624 625 626 627 628 |
# File 'lib/roi/roi.rb', line 620 def find_frame_not_displayed(frames, start_time, args={}) logger.info("Finding frame where #{self.class.name} is not displayed") args[:with_last_frame] = true args[:expected] = false args[:report] = false frame(frames, start_time, args) do |frame, last_frame| displayed?(:frame => frame, :last_frame => last_frame, :set_roi_options => args) end end |