Class: SaraMonitor
- Inherits:
-
BaseMonitor
- Object
- BaseMonitor
- SaraMonitor
- Includes:
- RoiHelper
- Defined in:
- lib/test_case/monitoring/sara_monitor.rb
Overview
This class should be included in the MonitoringTest module
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
Methods included from RoiHelper
Methods inherited from BaseMonitor
#black_screen_roi, #check_black_screen, #check_health, #check_live_video?, #check_platform, #check_power, #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
Constructor Details
This class inherits a constructor from BaseMonitor
Instance Method Details
#check_live_tv? ⇒ Boolean
29 30 31 32 |
# File 'lib/test_case/monitoring/sara_monitor.rb', line 29 def check_live_tv? report_parental_controls(parental_control) super end |
#check_menu ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/test_case/monitoring/sara_monitor.rb', line 12 def #Saramenu channel_guide = dut.roi.text.new(:x => 362, :y => 498, :width => 194, :height => 62, :similarity => 70, :text => 'CHANNEL', :only_digits => false, :ref_img => "") channel_guide_roi = roi_resolution(channel_guide, dut.height, dut.width) check1 = false dut.press_key('exit', :sleep_time=>2.sec) return nil if channel_guide_roi.wait_until_displayed?(10000, key: 'menu') set_err_result(@health_hash, 'Unable to nav to menu. Check platform or device health', 'S3') # Lots of errors reported due to wrong plat rather than device issue. end |
#find_mac ⇒ Object
24 25 26 27 |
# File 'lib/test_case/monitoring/sara_monitor.rb', line 24 def find_mac dut.press_key('exit', :sleep_time=>2.sec) {} #do nothing for now just return empty hash (no mac info just exit out of guide) end |
#parental_control ⇒ Object
7 8 9 10 |
# File 'lib/test_case/monitoring/sara_monitor.rb', line 7 def parental_control roi_resolution(dut.roi.text.new(:x => 760, :y => 212, :width => 392, :height => 70, :similarity => 70, :text => 'Parental Control: ON', :only_digits => false, :ref_img => ""), dut.height, dut.width) end |