Class: DtaMonitor
- Inherits:
-
BaseMonitor
- Object
- BaseMonitor
- DtaMonitor
- Defined in:
- lib/test_case/monitoring/dta_monitor.rb
Instance Attribute Summary
Attributes inherited from BaseMonitor
#health_hash, #host, #id, #identity, #iteration, #job, #logger, #ssh, #start_time, #status, #stop_time
Instance Method Summary collapse
- #boot_screen ⇒ Object
- #check_health ⇒ Object
- #check_menu ⇒ Object
-
#check_power ⇒ Object
def diag_screen roi_resolution(dut.roi.text.new(:x => 254, :y => 60, :width => 746, :height => 76, :similarity => 70, :text => ‘Diagnostic Main Menu’, :only_digits => false, :ref_img => “”). dut.height, dut.width) end.
- #dta_menu ⇒ Object
- #find_mac ⇒ Object
Methods inherited from BaseMonitor
#black_screen_roi, #check_black_screen, #check_live_video?, #check_platform, #dut, #initialize, #no_input_roi, #report_parental_controls, #server_name
Methods included from TmcHelpers
#aws_config, #aws_create_s3_bucket, #aws_delete_s3, #aws_delete_s3_bucket, #aws_read_s3, #aws_upload_s3, #aws_write_s3, #get_clean_ocr_text, #get_readable_size, #get_readable_time, #get_string_similarity, #get_substring_similarity, #is_rating?, #is_year?, #jsonify, #pick_random, #rubify, #send_webex_alert, #to_camel_case, #to_pascal_case, #to_snake_case, #twb_case_exists?, #twb_get_case_instance_id, #twb_get_suite_instance_id, #twb_post_screenshot, #twb_post_screenshot!, #twb_post_suite, #twb_post_testcase, #twb_post_teststep, #twb_post_teststep!, #twb_prep_s3_screenshot, #twb_suite_exists?, #until_condition, #until_equals, #until_includes, #until_not_empty, #until_not_equals, #until_not_includes, #until_not_nil, #until_same, #web_delete, #web_get, #web_post, #web_put
Methods included from HttpHelper
Methods included from CsvHelper
Methods included from SshHelper
Methods included from EmailHelper
#send_email, #send_email_setup
Methods included from SnmpHelper
Methods included from ReportMonitor
#assign_email_params?, #assign_test_params, #confirm_platform, #generate_email_msg, #invalid_report, #log_hash, #send_legacy_err_hash, #set_err_result, #sword_send_results, #take_screenshot
Methods included from RoiHelper
Constructor Details
This class inherits a constructor from BaseMonitor
Instance Method Details
#boot_screen ⇒ Object
10 11 12 13 |
# File 'lib/test_case/monitoring/dta_monitor.rb', line 10 def boot_screen roi_resolution(dut.roi.text.new(:x => 616, :y => 444, :width => 726, :height => 66, :similarity => 70, :text => 'Searching for channels...', :only_digits => false, :ref_img => ""), dut.height, dut.width) end |
#check_health ⇒ Object
36 37 38 |
# File 'lib/test_case/monitoring/dta_monitor.rb', line 36 def check_health set_err_result(@health_hash, "Failed to display video", 'B5') unless check_live_video? end |
#check_menu ⇒ Object
40 41 42 43 |
# File 'lib/test_case/monitoring/dta_monitor.rb', line 40 def # set_err_report(@health_hash, 'Unable to nav to menu. Check platform or device health', 'D3') unless dta_menu.press_key_until_displayed?('menu', presses: 5, timeout: 5000, try_every: 1000) # dut.press_key('exit', sleep_time: 500) end |
#check_power ⇒ Object
def diag_screen
roi_resolution(dut.roi.text.new(:x => 254, :y => 60, :width => 746, :height => 76, :similarity => 70, :text => 'Diagnostic Main Menu', :only_digits => false, :ref_img => "").
dut.height, dut.width)
end
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/test_case/monitoring/dta_monitor.rb', line 20 def check_power dut.press_key('exit', :sleep_time=>1.sec) dut.press_key('exit', :sleep_time=>1.sec) dut.press_key('menu', :sleep_time=>2.sec) if no_input_roi.displayed?(timeout: 3000) dut.power_on set_err_result(@health_hash, 'Failed to bypass boot screen', 'D2') unless boot_screen.wait_until_not_displayed?(1_000_000_000, delay: 60_000) # take as long as you need...dta # dut.press_key('power', sleep_time:2.sec) end if black_screen_roi.displayed?(timeout: 3000) dut.press_key('power', sleep_time:2.sec) end dut.press_key('exit', sleep_time:1.sec) check_health end |
#dta_menu ⇒ Object
5 6 7 8 |
# File 'lib/test_case/monitoring/dta_monitor.rb', line 5 def roi_resolution(dut.roi.text.new(:x => 342, :y => 54, :width => 486, :height => 102, :similarity => 70, :text => 'Find Channels', :only_digits => false, :ref_img => ""), dut.height, dut.width) end |
#find_mac ⇒ Object
45 46 47 |
# File 'lib/test_case/monitoring/dta_monitor.rb', line 45 def find_mac # set_err_report(@health_hash, 'Unable to nav to DTA diag screen', '') unless diag_screen.press_key_until_displayed?("sel_long_5", presses: 3, try_every: 10_000) end |