Index: suite_leahi/tst_general_alarm_requirements_instruction/test.py =================================================================== diff -u -rec76004219cdb69cfa40c7258b156593b6dc5e82 -r95e4941e40bc1845970836c162e137701653dc3e --- suite_leahi/tst_general_alarm_requirements_instruction/test.py (.../test.py) (revision ec76004219cdb69cfa40c7258b156593b6dc5e82) +++ suite_leahi/tst_general_alarm_requirements_instruction/test.py (.../test.py) (revision 95e4941e40bc1845970836c162e137701653dc3e) @@ -60,7 +60,7 @@ @param N/A @output N/A """ - mouseClick(waitForObject(names.o_AlarmButton_Minimize)) + mouseClick(waitForObject(names.o_AlarmButton_Minimize, 2000)) def maximize(): @@ -69,7 +69,7 @@ @param N/A @output N/A """ - mouseClick(waitForObject(names.o_AlarmButton_Maximize)) + mouseClick(waitForObject(names.o_AlarmButton_Maximize, 2000)) def findChildByText(parent_object, target_text): @@ -85,8 +85,8 @@ def test_send_active_list_response_batch_alarms(): alarm.cmd_activate_alarm_id(state=1, alarm=1, silence_expires=0, flags=0) - mouseClick(names.o_AlarmsList_IconButton) - # Generate alarms in batches of 10 from 1 to 160 + mouseClick(waitForObject(names.o_AlarmsList_IconButton, 2000)) + # Generate alarms in batches of 10 from 1 to 160s count = 0 for batch_start in range(1, 161, 10): count += 1 @@ -106,7 +106,7 @@ ) # Get the alarm list grid and verify rows count - alarm_grid = waitForObject(names.o_Alarm_List) + alarm_grid = waitForObject(names.o_Alarm_List, 2000) # Verify 10 alarms are displayed using rows property test.compare(alarm_grid.rows, 10, "Comparison Number of Alarms displayed") @@ -132,7 +132,8 @@ # Finding and Comparison Alarm Reject Notification text alarm.cmd_send_active_list_response(accept=0, reason=count) alarm_reject_notification = utility.get_object_from_names( - names.o_Reject_Notification_Description_Text + names.o_AlarmReject_Notification_Description_Text, + timeout_ms=3000 ) alarm_reject_notification_text = str(alarm_reject_notification.text) trimmed_alarm_reject_notification_text = re.sub( @@ -161,14 +162,14 @@ ) test.compare( - str(waitForObjectExists(names.o_Alarm_Dialog_TitleBar).color.name), + str(waitForObjectExists(names.o_Alarm_Dialog_TitleBar, 2000).color.name), config.ALARMS_COLORS_HEADER[(config.ALARM_PRIORITY_OPTIONS[alarm_priority])], "Comparison of Alarm TitleBar Color", ) minimize() test.compare( - str(waitForObject(names.o_Alarm_Bar).color.name), + str(waitForObject(names.o_Alarm_Bar, 2000).color.name), config.ALARMS_COLORS_HEADER[(config.ALARM_PRIORITY_OPTIONS[alarm_priority])], "Comparison of Alarm Bar Color After Alarm minimized", ) @@ -192,66 +193,66 @@ + str(alarm_timeout) ) test.compare( - waitForObjectExists(names.o_AlarmButton_Mute).timeout, + waitForObjectExists(names.o_AlarmButton_Mute, 2000).timeout, alarm_timeout, "Timeout delay for alarm", ) muted = v_flags == config.ALARM_MUTE_FLAG test.compare( - waitForObjectExists(names.o_AlarmButton_Mute_Min).visible, + waitForObjectExists(names.o_AlarmButton_Mute_Min, 2000).visible, muted, "Mute minutes button is visible", ) test.compare( - waitForObjectExists(names.o_AlarmButton_Mute_Sec).visible, + waitForObjectExists(names.o_AlarmButton_Mute_Sec, 2000).visible, muted, "Mute seconds button is visible", ) muteTimeout_min, muteTimeout_sec = divmod(alarm_timeout, 60) if muted: test.compare( - str(waitForObjectExists(names.o_AlarmButton_Mute_Img).source.path), + str(waitForObjectExists(names.o_AlarmButton_Mute_Img, 2000).source.path), "/images/iBellOff", "Comparison of Alarm BellOff", ) test.compare( - str(waitForObjectExists(names.o_AlarmButton_Mute_Min).text), + str(waitForObjectExists(names.o_AlarmButton_Mute_Min, 2000).text), "{}".format(muteTimeout_min), "Comparison of Mute Minutes", ) test.compare( - str(waitForObjectExists(names.o_AlarmButton_Mute_Sec).text), + str(waitForObjectExists(names.o_AlarmButton_Mute_Sec, 2000).text), "{0:02}".format(muteTimeout_sec), "Comparison of Mute seconds", ) minimize() test.compare( - str(waitForObjectExists(names.o_Alarm_Bar_Mute_Img).source.path), + str(waitForObjectExists(names.o_Alarm_Bar_Mute_Img, 2000).source.path), "/images/iBellOff", "Comparison of Alarm BellOff After minimized", ) test.compare( - str(waitForObjectExists(names.o_Alarm_Bar_Mute_Min).text), + str(waitForObjectExists(names.o_Alarm_Bar_Mute_Min, 2000).text), "{}".format(muteTimeout_min), "Comparison of Mute Minutes After minimized", ) test.compare( - str(waitForObjectExists(names.o_Alarm_Bar_Mute_Sec).text), + str(waitForObjectExists(names.o_Alarm_Bar_Mute_Sec, 2000).text), "{0:02}".format(muteTimeout_sec), "Comparison of Mute seconds After minimized", ) else: test.compare( - str(waitForObjectExists(names.o_AlarmButton_Mute_Img).source.path), + str(waitForObjectExists(names.o_AlarmButton_Mute_Img, 2000).source.path), "/images/iBellOn", "Comparison of Alarm BellOn", ) minimize() test.compare( - str(waitForObjectExists(names.o_Alarm_Bar_Mute_Img).source.path), + str(waitForObjectExists(names.o_Alarm_Bar_Mute_Img, 2000).source.path), "/images/iBellOn", "Comparison of Alarm BellOn After minimized", ) @@ -284,7 +285,7 @@ alarm_status="Mute", ) - mouseClick(waitForObjectExists(names.o_AlarmButton_Mute)) + mouseClick(waitForObjectExists(names.o_AlarmButton_Mute, 2000)) alarm.cmd_activate_alarm_id( state=alarm_index, alarm=alarm_id, flags=alarm_flags["flags"] ) @@ -314,16 +315,16 @@ if ok_button.visible == True: mouseClick(ok_button) test.compare( - waitForObjectExists(names.o_Alarm_Ok_Button).visible, + waitForObjectExists(names.o_Alarm_Ok_Button, 2000).visible, True, "Alarm Ok Button visible", ) - resume_button = waitForObjectExists(names.o_Alarm_Resume_Button) + resume_button = waitForObjectExists(names.o_Alarm_Resume_Button, 2000) if resume_button.visible == True: mouseClick(resume_button) test.compare( - waitForObjectExists(names.o_Alarm_Resume_Button).visible, + waitForObjectExists(names.o_Alarm_Resume_Button, 2000).visible, True, "Alarm Resume Button visible", ) @@ -332,16 +333,16 @@ if rinseback_button.visible == True: mouseClick(rinseback_button) test.compare( - waitForObjectExists(names.o_Alarm_Rinseback_Button).visible, + waitForObjectExists(names.o_Alarm_Rinseback_Button, 2000).visible, True, "Alarm Rinseback Button visible", ) - end_treatment_button = waitForObjectExists(names.o_Alarm_End_Treatment_Button) + end_treatment_button = waitForObjectExists(names.o_Alarm_End_Treatment_Button, 2000) if end_treatment_button.visible == True: mouseClick(end_treatment_button) test.compare( - waitForObjectExists(names.o_Alarm_End_Treatment_Button).visible, + waitForObjectExists(names.o_Alarm_End_Treatment_Button, 2000).visible, True, "Alarm End Treatment Button visible", ) @@ -351,17 +352,17 @@ alarm_silenced = waitForObjectExists(names.o_AlarmButton_Mute) if alarm_silenced.visible == True: test.compare( - waitForObjectExists(names.o_AlarmButton_Mute).visible, + waitForObjectExists(names.o_AlarmButton_Mute, 2000).visible, True, "Alarm Mute Button Silenced visible", ) flag_status = alarm_flags["no_minimize"] alarm.cmd_activate_alarm_id(1, 1, 0, flags=flag_status) - minimize_buttonn = waitForObjectExists(names.o_AlarmButton_Minimize) + minimize_buttonn = waitForObjectExists(names.o_AlarmButton_Minimize, 2000) if minimize_buttonn.visible is not True: test.compare( - waitForObjectExists(names.o_AlarmButton_Minimize).visible, + waitForObjectExists(names.o_AlarmButton_Minimize, 2000).visible, False, "Alarm Minimize Button not visible", ) @@ -374,8 +375,8 @@ utils.tstStart(__file__) startApplication(config.AUT_NAME_ONLY) test.startSection("Verification of General Alarm Requirements ") - test_send_active_list_response_batch_alarms() verification_of_alarm_parameters() verification_of_alarm_flag() + test_send_active_list_response_batch_alarms() test.endSection() utils.tstDone()