Index: suite_leahi/tst_service_export_logs/test.py =================================================================== diff -u -r98661ca0120138f0a071a0444750c7a39f03b5d9 -rb2b2472fa5eedb28367009ec83db8397d552f4fe --- suite_leahi/tst_service_export_logs/test.py (.../test.py) (revision 98661ca0120138f0a071a0444750c7a39f03b5d9) +++ suite_leahi/tst_service_export_logs/test.py (.../test.py) (revision b2b2472fa5eedb28367009ec83db8397d552f4fe) @@ -49,10 +49,9 @@ if export_logs_item is not None: mouseClick(export_logs_item) - export_log_screen_title_text = utility.get_object_from_names( - names.o_ExportLogsPageTitleText, - error_message="export log screen title text object missing", - timeout_ms=1000, + headerbar_container = waitForObject(names.o_headerBar_HeaderBar, 2000) + export_log_screen_title_text = utility.findChildByText( + headerbar_container, "Export Logs" ) if export_log_screen_title_text is not None: test.compare( @@ -87,7 +86,13 @@ """ tests the case that the usb is ejected, requires restarting the application to get original state """ - mouseClick(waitForObjectExists(names.o_ExportButton)) + export_button = utility.get_object_from_names( + names.o_ExportButton, + error_message="Export button was not enabled", + timeout_ms=3000, + ) + if export_button is not None: + mouseClick(export_button) utils.waitForGUI( 1 ) # This wait is to verify that the Application log export to USB is complete. Increase seconds in waitForGUI if the test compare fails. @@ -110,7 +115,7 @@ def select_different_log_type(whichTypeIndex): log_type_combo_box = utility.get_object_from_names( - names.o_LogTypeComboBox, error_message="Combo box object is missing" + names.o_LogTypeComboBox, error_message="Combo box object is missing", timeout_ms=3000 ) if log_type_combo_box is not None: mouseClick(waitForObjectExists(names.o_LogTypeComboBox)) @@ -134,11 +139,11 @@ config.EXPORT_LOGS_OPTIONS[whichTypeIndex] ), ) - + export_button = utility.get_object_from_names( names.o_ExportButton, error_message="Export button was not enabled", - timeout_ms=2000, + timeout_ms=3000, ) if export_button is not None: mouseClick(export_button) @@ -164,8 +169,22 @@ def select_a_log_file_and_export(): - mouseClick(waitForObjectExists(names.o_ExportLogsProgressRect)) - mouseClick(waitForObjectExists(names.o_ExportButton)) + + select_a_file = utility.get_object_from_names( + names.o_ExportLogsProgressRect, + error_message="eject o_ExportLogsProgressRect object not found", + timeout_ms=3000, + ) + if select_a_file is not None: + mouseClick(select_a_file) + export_button = utility.get_object_from_names( + names.o_ExportButton, + error_message="Export button was not enabled", + timeout_ms=3000, + ) + if export_button is not None: + mouseClick(export_button) + export_log_status = utility.get_object_from_names( names.o_ExportLogsNotificationBar, error_message="export log status missing", @@ -229,16 +248,16 @@ test.startSection("Export Application log files") application_init.delete_existing_files_usb_folders() - startApplication(config.AUT_NAME) + startApplication("leahi") navigation.navigate_to_device_settings_screen() navigate_to_export_logs() test_export_logs_eject_usb_case() closeWindow(names.o_Gui_MainView) test.endSection() - + test.startSection("Export Service log files") - - startApplication(config.AUT_NAME) + + startApplication("leahi") navigation.navigate_to_device_settings_screen() navigate_to_export_logs() select_different_log_type(1) @@ -248,9 +267,9 @@ test.startSection("Export single log file") application_init.delete_existing_files_usb_folders() - startApplication(config.AUT_NAME) + startApplication("leahi") navigation.navigate_to_device_settings_screen() navigate_to_export_logs() select_a_log_file_and_export() - utils.tstDone() + utils.tstDone() \ No newline at end of file