Index: suite_leahi/tst_Headerbar_Prescription/test.py =================================================================== diff -u -ra9f09c063531da4405d18dbb5b25023e39ba7497 -r34c1f4aff8b23afe47e68c6c8f5047b897bb5abf --- suite_leahi/tst_Headerbar_Prescription/test.py (.../test.py) (revision a9f09c063531da4405d18dbb5b25023e39ba7497) +++ suite_leahi/tst_Headerbar_Prescription/test.py (.../test.py) (revision 34c1f4aff8b23afe47e68c6c8f5047b897bb5abf) @@ -93,90 +93,7 @@ VALIDATE = "VALIDATE" CONFIRM = "CONFIRM" td =TD_Messaging() -# def keyboard_object_map_helper(text): -# """ -# Method for setting custom object property's for keyboard keys -# @return: required object property's for keys -# """ -# if text is not None: -# names.keyboard_input["text"] = text -# return names.keyboard_input -# else: -# test.log("Invalid ",text," for object.") -# names.o_keyboard_input["text"] = "Q" -# -# -# def keyboard_switching_section(text): -# """ -# Tests to automate keyboard based on user input -# @return: key text (text displayed on keyboard) -# """ -# keyboard_value = keyboard_object_map_helper(text) -# object_status = object.exists(keyboard_value) -# if object_status is True: -# return text -# -# else: -# #Tests to get status of keys in keyboard layout -# object_status = object.exists(keyboard_object_map_helper(KEYBOARD_SWITCH[1])) -# if object_status is True: -# keyboard_value = keyboard_object_map_helper(KEYBOARD_SWITCH[1]) -# utils.waitForGUI(.3) -# mouseClick(waitForObject(keyboard_value)) -# keyboard_value = keyboard_object_map_helper(text) -# object_status = object.exists(keyboard_value) -# if object_status is True: -# return text -# -# object_status = object.exists(keyboard_object_map_helper(KEYBOARD_SWITCH[0])) -# if object_status is True: -# keyboard_value = keyboard_object_map_helper(KEYBOARD_SWITCH[0]) -# mouseClick(waitForObject(keyboard_value)) -# keyboard_value = keyboard_object_map_helper(text) -# object_status = object.exists(keyboard_value) -# if object_status is True: -# return text -# -# object_status = object.exists(names.keyboard_switch2) -# if object_status is True: -# keyboard_value = waitForObject(names.keyboard_switch2) -# mouseClick(keyboard_value) -# text = text.lower() -# keyboard_value = keyboard_object_map_helper(text) -# object_status = object.exists(keyboard_value) -# if object_status is True: -# return text -# -# object_status = object.exists(names.keyboard_switch) -# if object_status is True: -# keyboard_value = waitForObject(names.keyboard_switch) -# mouseClick(keyboard_value) -# text = text.lower() -# keyboard_value = keyboard_object_map_helper(text) -# object_status = object.exists(keyboard_value) -# if object_status is True: -# return text -# -# -# def verify_valid_patient_id_through_keypad(expected_value, actual_value): -# """ -# Tests verifies valid patient id set through application keyboard setup . -# @return: N/A -# """ -# patient_id_input = waitForObject(names.o_PatientIDEntry_TextEntry) -# mouseClick(names.o_PatientIDEntry_TextEntry) -# for text in expected_value: -# keyword_state = keyboard_switching_section(text) -# if keyword_state is not None: -# keyboard_value = keyboard_object_map_helper(keyword_state) -# mouseClick(waitForObject(keyboard_value)) -# utils.waitForGUI(.2) -# -# test.compare(actual_value, (patient_id_input.text), "Patient id should be -> "+ str(actual_value)) -# test.log("User successfully authenticated through patient id -> " + expected_value + "using keypad.") - - def verify_create_custom_treatment_parameter(): """ Method to set create custom treatment value @@ -269,16 +186,11 @@ utility.set_value_based_on_target(names.o_salineBolusVolumeControl_ValueAdjuster, saline_bolus) test.endSection() - # test.startSection("Verification of BP Measurement Interval") - # test.compare(waitForObject(names.o_bpMeasurementInterval_LabelUnitContainer).text, BLOOD_PRESSURE_MEASUREMENT_INTERVAL, "Parameter should be -> "+str(BLOOD_PRESSURE_MEASUREMENT_INTERVAL)) - # for bp_measurement_interval in CREATE_TREATMENT_PARAMETER_RANGE[BLOOD_PRESSURE_MEASUREMENT_INTERVAL]: - # utility.set_value_based_on_target(names.o_bpMeasurementIntervalControl_ValueAdjuster,bp_measurement_interval) - # test.endSection() - test.startSection("Verification of Bicarbonate Value") test.compare(waitForObject(names.o_bicarbonateConcentrate_LabelUnitContainer).text, BICARBONATE_CONCENTRATE_TITLE, "Parameter should be -> "+str(BICARBONATE_CONCENTRATE_TITLE)) utility.select_different_dropdown(names.o_bicarbonateConcentrateComboBox_BaseComboBox,BICARBONATE,0) test.compare(waitForObject(names.o_bicarbonateConcentrateComboBox_BaseComboBox).currentText, BICARBONATE[0], " Bicarbonate value should be :"+str(BICARBONATE[0])) + test.endSection() test.startSection("Verification of acid concentrate type") test.compare(waitForObject(names.o_acidConcentrate_LabelUnitContainer).text, ACID_CONCENTRATE_TITLE, "Parameter should be -> "+str(ACID_CONCENTRATE_TITLE)) @@ -315,35 +227,7 @@ test.endSection() utility.select_different_dropdown(names.o_vitalsCombobox_BaseCombobox,VITALS,2) - - # td.td_Treatment_Parameters_Validation( vAccepted = 1, - # vBloodFlowRateRejectReason = 0, - # vDialysateFlowRateRejectReason = 0, - # vTreatmentDurationRejectReason = 0, - # vSalineBolusVolumeRejectReason = 0, - # vHeparinStopTimeRejectReason = 0, - # vHeparinTypeRejectReason = 0, - # vAcidConcentrateRejectReason = 0, - # vBicarbonateConcentrateRejectReason = 0, - # vDialyzerTypeRejectReason = 0, - # vBloodPressureMeasureIntervalRejectReason = 0, - # vRinsebackFlowRateRejectReason = 0, - # vRinsebackVolumeRejectReason = 0, - # vArterialPressureLimitWindowRejectReason = 0, - # vVenousPressureLimitWindowRejectReason = 0, - # vVenousPressureLimitAsymtrcRejectReason = 0, - # vTrancembrncPressureLimitWindowRejectReason = 0, - # vDialysateTempRejectReason = 0, - # vHeparinDispensingRateRejectReason = 0, - # vHeparinBolusVolumeRejectReason = 0 - # ) - # - # test.verify(waitForObjectExists(names.o_qrCode_Image), "QR Code is visible") - # confirmButton = waitForObject(names.o_confirmButton_ConfirmButton) - # test.compare(confirmButton.enabled, True, "Confirm button is enabled") - # mouseClick(waitForObjectExists(names.o_confirmButton_ConfirmButton)) - # test.log("Confirm button is Enabled") - + validateButton = waitForObject(names.o_PreTreatmentButton) #Check the button text validateText = waitForObject(utility.button_text_obj(VALIDATE)) @@ -408,9 +292,6 @@ vHeparinBolusVolumeRejectReason = 0 ) - - # mouseClick(waitForObjectExists(names.o_prescriptionMenu_BaseComboBox)) - utils.waitForGUI(0.5) utility.select_different_dropdown(names.o_prescriptionMenu_BaseComboBox,BUTTON_TYPE,0) test.startSection("Verification of blood flow values") test.compare(waitForObject(names.o_bloodFlowRate_LabelUnitContainer).text, BLOOD_FLOW_RATE, "Parameter should be -> "+str(BLOOD_FLOW_RATE)) @@ -458,13 +339,7 @@ for saline_bolus in CREATE_TREATMENT_PARAMETER[SALINE_BOLUS_VOLUME]: utility.set_value_based_on_target(names.o_salineBolusVolumeControl_ValueAdjuster, saline_bolus) test.endSection() - - # test.startSection("Verification of BP Measurement Interval") - # test.compare(waitForObject(names.o_bpMeasurementInterval_LabelUnitContainer).text, BLOOD_PRESSURE_MEASUREMENT_INTERVAL, "Parameter should be -> "+str(BLOOD_PRESSURE_MEASUREMENT_INTERVAL)) - # for bp_measurement_interval in CREATE_TREATMENT_PARAMETER[BLOOD_PRESSURE_MEASUREMENT_INTERVAL]: - # utility.set_value_based_on_target(names.o_bpMeasurementIntervalControl_ValueAdjuster,bp_measurement_interval) - # test.endSection() - + test.endSection()