Index: suite_leahi/shared/scripts/configuration/navigation.py =================================================================== diff -u -r30aa33698b5c5b0559841590c4bf0e87f9ccf820 -r8bfb02b2b8e50dccd822549c11d340df033744c7 --- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 30aa33698b5c5b0559841590c4bf0e87f9ccf820) +++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 8bfb02b2b8e50dccd822549c11d340df033744c7) @@ -8,60 +8,43 @@ from pathlib import Path td_simulator = TD_Messaging() - + def navigate_to_device_settings_screen(): """ - Method to navigate to "Service" screen + Method to navigate to "Device Settings" screen and Compare Device Settings screen title text """ td_simulator.td_operation_mode(TDOpModes.MODE_STAN.value, 0) - settings_menu_object = utility.get_object_from_names( - names.o_Settings_Menu, - error_message="Settings menu object missing", - timeout_ms=1000, - ) - if settings_menu_object is not None: - squish.mouseClick(settings_menu_object) + main_menu_container = squish.waitForObject(names.o_mainMenu_MainMenu, 2000) + squish.mouseClick(utility.findChildByText(main_menu_container, config.SETTINGS)) - device_setting_screen_title_text = utility.get_object_from_names( - names.o_DeviceSettingsTitleText, - error_message="Device Settings Screen title text object missing", - timeout_ms=2000, + headerbar_container = squish.waitForObject(names.o_headerBar_HeaderBar, 2000) + device_setting_screen_headerbar_title_text = utility.findChildByText( + headerbar_container, config.DEVICE_SETTINGS ) - if device_setting_screen_title_text is not None: + if device_setting_screen_headerbar_title_text is not None: test.compare( - device_setting_screen_title_text.text, + device_setting_screen_headerbar_title_text.text, config.DEVICE_SETTINGS_SCREEN_TITLE_TEXT, "{} screen is displayed and Comparison of Device Settings Screen Title text".format( config.DEVICE_SETTINGS_SCREEN_TITLE_TEXT ), ) def navigate_to_device_settings_using_service_password(): + td_simulator.td_operation_mode(TDOpModes.MODE_STAN.value, 0) + main_menu_container = squish.waitForObject(names.o_mainMenu_MainMenu, 2000) + squish.mouseClick(utility.findChildByText(main_menu_container, config.SETTINGS)) + td_simulator.td_operation_mode(TDOpModes.MODE_SERV.value, 0) grid_container = squish.waitForObject(names.o_DeviceSettingsGrid) - service_option = utility.findChildByText(grid_container, "Service") + squish.mouseClick(utility.findChildByText(grid_container, config.SERVICE)) - if service_option is not None: - squish.mouseClick(service_option) - - headerbar_container = squish.waitForObject(names.o_headerBar_HeaderBar) - service_screen_headerbar_title_text = utility.findChildByText( - headerbar_container, "Service" - ) - if service_screen_headerbar_title_text is not None: - test.compare( - service_screen_headerbar_title_text.text, - config.SERVICE_SCREEN_TITLE_TEXT, - "{} screen is displayed and Comparison of Device Settings Screen Title text".format( - config.SERVICE_SCREEN_TITLE_TEXT - ), - ) input_field = squish.waitForObject(names.o_userConfirmation_TextInput, 1000) squish.type(input_field, config.DEFAULT_SERVICE_PASSWORD_RAW) confirm_button = squish.waitForObject(names.o_userConfirmation_ConfirmButton, 1000) squish.mouseClick(confirm_button) - + def get_ini_value(conf_path: str , section: str, key: str): """ Method to get the advanced option from the System.conf file @@ -114,4 +97,4 @@ Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) squish.mouseClick(Nextbutton) - test.endSection() \ No newline at end of file + test.endSection()