Index: tst_treatment_saline_data/test.py =================================================================== diff -u -rcfb90b69e9a9d77bbaed7c8a33ce177ca5dd29df -r08f868c7ceea6a586e4c78c30529a2100f6999bd --- tst_treatment_saline_data/test.py (.../test.py) (revision cfb90b69e9a9d77bbaed7c8a33ce177ca5dd29df) +++ tst_treatment_saline_data/test.py (.../test.py) (revision 08f868c7ceea6a586e4c78c30529a2100f6999bd) @@ -20,7 +20,7 @@ from dialin.ui.hd_simulator import HDSimulator from dialin.common.ui_defs import TXStates as txStates from dialin.common.msg_defs import RequestRejectReasons as rejectReason -from configuration import config +from configuration import config, utility #testing options for main treatment saline SALINE_BOLUS_TARGET = [0, 1, 25, 30, 50, 80, 70, 150, 180, 220, 250, 280, 300] @@ -96,7 +96,7 @@ # when rejected reason set 16 -> saline bolus in progress if (not accept_status): rejection_reason = rejectReason.REQUEST_REJECT_REASON_SALINE_BOLUS_IN_PROGRESS.value hd_simulator.cmd_set_saline_bolus_response(accepted = accept_status, reason = rejection_reason, target = target) - if (not accept_status): test.compare(findObject(names.o_treatment_notification_bar).text, config.REJECTION_REASON[rejection_reason], \ + if (not accept_status): test.compare(waitForObjectExists(utility.rejection_msg(config.REJECTION_REASON[rejection_reason])).text, config.REJECTION_REASON[rejection_reason], \ "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection_reason])) #set saline transition state. @@ -119,7 +119,7 @@ test.startSection("verification of rejection messages on saline bolus") for rejection in range(1, config.NUM_OF_REQUEST_REJECT_REASONS): hd_simulator.cmd_set_saline_bolus_response(accepted = accept_status, reason = rejection, target = target) - rejection_message = findObject(names.o_treatment_notification_bar) + rejection_message = waitForObjectExists(utility.rejection_msg(config.REJECTION_REASON[rejection])) test.compare(rejection_message.text, config.REJECTION_REASON[rejection], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[rejection])) test.endSection()