Index: shared/scripts/configuration/strings.py =================================================================== diff -u -rd93c008881fb5c10224bf08a46572cfa9df6e563 -r2383588eef5e87099e1719356276aa5d12a48aeb --- shared/scripts/configuration/strings.py (.../strings.py) (revision d93c008881fb5c10224bf08a46572cfa9df6e563) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 2383588eef5e87099e1719356276aa5d12a48aeb) @@ -16,7 +16,9 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" +BLOOD_PRIMING_UNIT = "mL" +BLOOD_PRIMING_VALUE_0 = "0" +BLOOD_PRIMING_DEFAULT_VALUE = BLOOD_PRIMING_VALUE_0 + " " + BLOOD_PRIMING_UNIT #main-treatment heparin HEPARIN_UNIT = "mL" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r1b768bf7dfe01ac87aaf6d3af7b89012879d8828 -r2383588eef5e87099e1719356276aa5d12a48aeb --- shared/scripts/configuration/utility.py (.../utility.py) (revision 1b768bf7dfe01ac87aaf6d3af7b89012879d8828) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 2383588eef5e87099e1719356276aa5d12a48aeb) @@ -13,7 +13,6 @@ ############################################################################ import names -import sys import test import squish from configuration import config @@ -63,11 +62,9 @@ ScreenObj = squish.waitForObject(screen_object) screenHeight = pyInt(ScreenObj.height) screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth-1000, - screenHeight-10, 0, -50, squish.Qt.NoModifier) + squish.mouseWheel(ScreenObj, screenWidth-1000, screenHeight-10, 0, -50, squish.Qt.NoModifier) - raise LookupError("zone object is not in view to the user after " + \ - "trying 100 times") + raise LookupError("zone object is not in view to the user after trying 100 times") def rejection_msg(text): Index: tst_main_treatment_heparin/test.py =================================================================== diff -u -rb8a67f4c5d9db3c5ba172e092f4787610d0a2a82 -r2383588eef5e87099e1719356276aa5d12a48aeb --- tst_main_treatment_heparin/test.py (.../test.py) (revision b8a67f4c5d9db3c5ba172e092f4787610d0a2a82) +++ tst_main_treatment_heparin/test.py (.../test.py) (revision 2383588eef5e87099e1719356276aa5d12a48aeb) @@ -11,11 +11,8 @@ from configuration import config, utility from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator -from configuration.utility import expected_heparin_value, rejection_msg -from dialin.ui.utils import waitForGUI -from configuration.config import REJECTION_REASON +from dialin.common.hd_defs import PreTreatmentSubModes, HDOpModes, HDOpSubModes, TreatmentStates, HeparinStates - HIGHER_RANGE = 20 STEP_VALUE = 1 LOWER_RANGE = 0 @@ -30,24 +27,24 @@ "STATE_6_HEPARIN DELIVERY_MESSAGE": "Syringe Empty"} hd_simulator = HDSimulator() -def verification_of_cumulative_value(expected_cumulative_value): +def verify_cumulative_value(expected_cumulative_value): """ - Verifying cumulative values from heparin delivery section. - @param expected_cumulative_value - (str) expected cumulative value. + Method to verify cumulative values from heparin delivery section. + @param expected_cumulative_value - (str) expected cumulative value. """ expected_cumulative_value =str(expected_cumulative_value).replace(".0","") heparin_value = waitForObjectExists(utility.expected_heparin_value(expected_cumulative_value)) - test.compare(heparin_value.text,expected_cumulative_value, utility.msg("Actual heparin cumulative value: {} should be equal to expected heparin cumulative value: {}".format(heparin_value.text, expected_cumulative_value))) + test.compare(heparin_value.text, expected_cumulative_value, utility.msg("Actual heparin cumulative value: {} should be equal to expected heparin cumulative value: {}".format(heparin_value.text, expected_cumulative_value))) def constants_for_cumulative_value(): """ - Method is used to verify the constants for cumulative value. + Method is used to verify the constants for cumulative value. """ test.startSection("Verifying Heparin State 3 HEPARIN_INITIAL_BOLUS values") test.log("Verifying Heparin State 3 -> Heparin bolus is active") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 0, heparin_state= 3, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state= 0, treatment_stop_state=0, dialysis_state= 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_INITIAL_BOLUS.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(names.o_state1_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state1_heparin_delivery_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) initial_bolus_text = waitForObjectExists(names.o_state3_heparin_state_initial_bolus_text).text @@ -63,48 +60,46 @@ heparin_cumulative = format(heparin_cumulative/10, ".1f") heparin_cumulative = float(heparin_cumulative) hd_simulator.cmd_set_treatment_heparin_data(heparin_cumulative) - verification_of_cumulative_value(LOWER_RANGE) + verify_cumulative_value(LOWER_RANGE) utils.waitForGUI(1) elif 100 == LOWER_RANGE: verify_rejection_msg_id(False) - utils.waitForGUI(2) + utils.waitForGUI(1) verify_rejection_msg_id(True) test.log("Lower range works") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 0, heparin_state= 3, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state= 0, treatment_stop_state=0, dialysis_state= 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_INITIAL_BOLUS.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) heparin_cumulative = format(heparin_cumulative/10, ".1f") heparin_cumulative = float(heparin_cumulative) hd_simulator.cmd_set_treatment_heparin_data(heparin_cumulative) - verification_of_cumulative_value(LOWER_RANGE) + verify_cumulative_value(LOWER_RANGE) test.endSection() def heparin_stop_states_in_main_treatment(): """ - Verifying the heparin states when heparin cumulative is '0' at - HEPARIN STATE 0 -> HEPARIN_STATE_OFF - HEPARIN STATE 1 -> HEPARIN_STATE_STOPPED - HEPARIN STATE 5 -> HEPARIN_STATE_COMPLETED - HEPARIN STATE 6 -> HEPARIN_STATE_EMPTY + Method to verify the heparin states when heparin cumulative is '0' at + HEPARIN STATE 0 -> HEPARIN_STATE_OFF + HEPARIN STATE 1 -> HEPARIN_STATE_STOPPED + HEPARIN STATE 5 -> HEPARIN_STATE_COMPLETED + HEPARIN STATE 6 -> HEPARIN_STATE_EMPTY """ test.log("Verifying Heparin State 0 - HEPARIN_STATE_OFF") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 0, heparin_state= 0, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state= 0, treatment_stop_state= 0, dialysis_state= 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_OFF.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(names.o_state0_heparin_delivery_Off_text).text), config.HEPARIN_DELIVERY_OFF_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state0_heparin_delivery_Off_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") test.compare(str(findObject(names.o_state0_heparin_delivery_Off_text).text ), config.HEPARIN_DELIVERY_OFF_TEXT, utility.msg("Notification Message should be {}".format(config.HEPARIN_DELIVERY_OFF_TEXT))) utils.waitForGUI(1) test.log("Verifying Heparin State 1 - HEPARIN_STATE_STOPPED") - - - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 1, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state= 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_STOPPED.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(names.o_state1_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state1_heparin_delivery_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") @@ -115,21 +110,19 @@ heparin_pause_resume_states() test.log("Verifying Heparin State 5 - HEPARIN_STATE_COMPLETED") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 5, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state= 0) - + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_COMPLETED.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(names.o_state0_heparin_delivery_Off_text).text), config.HEPARIN_DELIVERY_OFF_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state0_heparin_delivery_Off_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") test.compare(str(waitForObjectExists(names.o_state5_heparin_state_completed_text).text), config.HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT, utility.msg("Notification Message should be {}".format(config.HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT))) utils.waitForGUI(1) test.log("Verifying Heparin State 6 - HEPARIN_STATE_EMPTY") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 6, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state= 0) - + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_EMPTY.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(names.o_state6_heparin_state_empty_text).text), config.HEPARIN_SYRINGE_EMPTY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state6_heparin_state_empty_text)).enabled, True, utility.msg("Heparin Delivery should be disabled")) test.log("Verifying Notification Message") @@ -138,15 +131,15 @@ def heparin_pause_resume_states(): """ - Verifying pause/resume delivery when HEPARIN DELIVERY button is active or deactive using heparin states + Method to verify pause/resume delivery when HEPARIN DELIVERY button is active or deactive using heparin states HEPARIN STATE 2 -> HEPARIN_STATE_PAUSED HEPARIN STATE 4 -> HEPARIN_STATE_DISPENSING """ test.startSection("Verifying Heparin State ->2 HEPARIN_STATE_PAUSED") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 2, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state= 0) - hd_simulator.cmd_set_heparin_pause_resume_response(accepted = 1, reason = 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_PAUSED.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) + hd_simulator.cmd_set_heparin_pause_resume_response(accepted=1, reason=0) test.compare(str(waitForObjectExists(names.o_state2_heparin_state_paused_text).text),config.HEPARIN_RESUME_DELIVERY_TEXT, utility.msg("Heparin Resume Delivery Text should be {}".format(config.HEPARIN_RESUME_DELIVERY_TEXT))) test.compare( waitForObjectExists(names.o_state2_heparin_state_paused_text).enabled, True, utility.msg("Resume Delivery Button is enabled")) mouseClick(waitForObject(names.o_state2_heparin_state_paused_text)) @@ -156,9 +149,9 @@ test.endSection() test.startSection("Verifying Heparin State ->4 HEPARIN_STATE_DISPENSING") - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 4, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state= 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=HeparinStates.HEPARIN_STATE_DISPENSING.value, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(names.o_state4_heparin_state_dispensing_text).text), config.HEPARIN_PAUSE_DELIVERY_TEXT, utility.msg("Heparin Pause Delivery Text should be {}".format(config.HEPARIN_PAUSE_DELIVERY_TEXT))) test.compare( waitForObjectExists(names.o_state4_heparin_state_dispensing_text).enabled , True, utility.msg("Pause Delivery Button is enabled")) mouseClick(waitForObject(names.o_state4_heparin_state_dispensing_text)) @@ -168,46 +161,43 @@ def verify_the_rejection_msg(reason_id): """ - Method to verify rejection messages - + Method to verify rejection messages """ test.startSection("Verifying Rejection Messages") rejection_msg = waitForObjectExists(utility.rejection_msg(text=config.REJECTION_REASON[reason_id])) test.compare(rejection_msg.text, config.REJECTION_REASON[reason_id], utility.msg("The rejection message should be {}".format(config.REJECTION_REASON[reason_id]))) test.endSection() def verify_rejection_messages_for_heparin_states(): - """ - Method to test current states and rejection messages + Method to test current states and rejection messages """ - test.startSection("Verifying test case scenario for rejection and acceptance in current state") for reason_id in range(1, (config.NUM_OF_REQUEST_REJECT_REASONS)): for state_id, state in HEPARIN_BUTTON_STATES.items(): - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state=state_id, - rinseback_state=0, recirculate_state=0, blood_prime_state=0, - treatment_end_state=0, treatment_stop_state=0, dialysis_state=0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=state_id, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) test.compare(str(waitForObjectExists(utility.expected_heparin_value(state)).text), state, utility.msg("{} text should be displayed".format(state))) hd_simulator.cmd_set_heparin_pause_resume_response(accepted=0, reason=reason_id) verify_the_rejection_msg(reason_id) hd_simulator.cmd_set_heparin_pause_resume_response(accepted=1, reason=reason_id) test.log("Verifying rejection message {} is not displayed".format(config.REJECTION_REASON[reason_id])) test.log("Verifying the current state of heparin button") test.compare(str(waitForObjectExists(utility.expected_heparin_value(state)).text), state, utility.msg("{} text should be displayed".format(state))) - msg = HEPARIN_STATE_MSGS["STATE_"+str(state_id)+"_"+state+"_MESSAGE"] + msg = HEPARIN_STATE_MSGS["STATE_" + str(state_id) + "_"+ state + "_MESSAGE"] test.compare(waitForObjectExists(utility.expected_heparin_value(msg)).text, msg, utility.msg("{} text should be displayed".format(msg))) hd_simulator.cmd_set_heparin_pause_resume_response(accepted=0, reason=reason_id+1) verify_the_rejection_msg(reason_id=reason_id+1) #changing the state - hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state=state_id+1, - rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, - treatment_end_state=0, treatment_stop_state= 0, dialysis_state= 0) + hd_simulator.cmd_set_treatment_states_data(sub_mode=TreatmentStates.TREATMENT_DIALYSIS_STATE.value, uf_state=TreatmentStates.TREATMENT_START_STATE.value, saline_state=TreatmentStates.TREATMENT_START_STATE.value, heparin_state=state_id+1, + rinseback_state=TreatmentStates.TREATMENT_START_STATE.value, recirculate_state=TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state=TreatmentStates.TREATMENT_START_STATE.value, + treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) if state_id == 6: break else: test.compare(str(waitForObjectExists(utility.expected_heparin_value(HEPARIN_BUTTON_STATES[state_id+1])).text), HEPARIN_BUTTON_STATES[state_id+1], utility.msg("{} text should be displayed".format(HEPARIN_BUTTON_STATES[state_id+1]))) - msg = HEPARIN_STATE_MSGS["STATE_"+str(state_id+1)+"_"+HEPARIN_BUTTON_STATES[state_id+1]+"_MESSAGE"] + msg = HEPARIN_STATE_MSGS["STATE_" + str(state_id+1) + "_"+ HEPARIN_BUTTON_STATES[state_id+1] + "_MESSAGE"] test.compare(waitForObjectExists(utility.expected_heparin_value(msg)).text, msg, utility.msg("{} text should be displayed".format(msg))) test.endSection()