Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r7cd0c21e76de3964af8178655467e82ff99ae98d -r7a5b9be3631dca85dee5c71e1f3581db4d7db342 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 7cd0c21e76de3964af8178655467e82ff99ae98d) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 7a5b9be3631dca85dee5c71e1f3581db4d7db342) @@ -20,43 +20,6 @@ from builtins import int as pyInt from builtins import float as pyFloat - -def start_application(app_name): - """ - Function to start application and verify application status [running] - If application does not start or running status is false, test stops - Argument: - @param app_name : (str) - Name of the executable application. - @return: handle for the application if the application is in running state, - or error (exist the application) - """ - counter = 0 - while True: - try: - counter += 1 - test.log("Starting {}".format(app_name)) - squish.startApplication(app_name) - if counter == 1: - test.log("Application launched at the "+str(counter)+" st try.") - elif counter == 2: - test.log("Application launched at the "+str(counter)+" nd try.") - elif counter == 3: - test.log("Application launched at the "+str(counter)+" rd try.") - else: - test.log("Application launched at the "+str(counter)+" th try.") - break - except RuntimeError: - if counter == 1: - test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") - elif counter == 20: - test.log("Exiting after "+str(counter)+ " tries..") - sys.exit(1) - else: - test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") - except: - logErrorDetails("Failed to start the application") - sys.exit(1) - def check_if_object_is_within_the_container(obj=None, container=None): """ Index: shared/scripts/names.py =================================================================== diff -u -r7cd0c21e76de3964af8178655467e82ff99ae98d -r7a5b9be3631dca85dee5c71e1f3581db4d7db342 --- shared/scripts/names.py (.../names.py) (revision 7cd0c21e76de3964af8178655467e82ff99ae98d) +++ shared/scripts/names.py (.../names.py) (revision 7a5b9be3631dca85dee5c71e1f3581db4d7db342) @@ -45,4 +45,6 @@ o_confirm_button = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_back_button_confirm_treatment = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} - +#standbymode +o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} +o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible":True} Index: tst_standbymode/test.py =================================================================== diff -u -rc6274593f3f5a607595b95f0243313a6cf32d599 -r7a5b9be3631dca85dee5c71e1f3581db4d7db342 --- tst_standbymode/test.py (.../test.py) (revision c6274593f3f5a607595b95f0243313a6cf32d599) +++ tst_standbymode/test.py (.../test.py) (revision 7a5b9be3631dca85dee5c71e1f3581db4d7db342) @@ -1,20 +1,13 @@ import names -import squish -import math import datetime -import test -import sys + +from builtins import int as pyInt +from configuration import config from time import sleep from dialin.ui import utils -from dialin.ui import unittests - from dialin.ui.hd_simulator import HDSimulator -from builtins import str as pyStr -from builtins import int as pyInt -# from dialin.ui.dg_simulator import DGSimulator -# from dialin.ui.hd_simulator_alarms import HDAlarmsSimulator GOODMORNING_START_TIME_SEC = 0 GOODEVENING_START_TIME_SEC = 43200 @@ -41,7 +34,7 @@ @return: N/A """ - standby_text = waitForObject(names.standby_page) + standby_text = waitForObject(names.o_standby_page) create_treatment = object.children(standby_text)[1] child = object.children(create_treatment)[1] test.compare(child.text, "CREATE TREATMENT") @@ -53,7 +46,7 @@ @return: current time in seconds """ - standby_text = waitForObject(names.standby_page) + standby_text = waitForObject(names.o_standby_page) child = object.children(standby_text)[0] if current_time >= GOODMORNING_START_TIME_SEC and \ current_time <= GOODEVENING_START_TIME_SEC: @@ -64,11 +57,11 @@ def main(): - utils.tstStart("demo") - startApplication("denaliSquish") + utils.tstStart(__file__) + startApplication(config.AUT_NAME) hd = HDSimulator() - #dg = DGSimulator() + hd.cmd_send_power_on_self_test_version_request() hd.cmd_send_hd_operation_mode(3)