Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u --- suite_leahi/shared/scripts/configuration/utility.py (revision 0) +++ suite_leahi/shared/scripts/configuration/utility.py (revision e262d0097836365a0adebc78a211d10b851bf23f) @@ -0,0 +1,16 @@ +import squish +import test + +def get_object_from_names(names_dict, error_message = "Missing object", timeout_ms = 200): + """ + To get an object with try..except catching to prevent script errors when the object is not found on the GUI + @param names_dict - the dictionary element from the names.py file (ie: names.some_variable_name_of_element) + @returns the object with corresponding dictionary, otherwise "None" + """ + try: + return squish.waitForObject(names_dict, timeout_ms) + except LookupError: + test.fail("ERROR : " + error_message) + return None + + Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r393a84695cb4efd5f77675bbb6aadac0711bb18c -re262d0097836365a0adebc78a211d10b851bf23f --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 393a84695cb4efd5f77675bbb6aadac0711bb18c) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision e262d0097836365a0adebc78a211d10b851bf23f) @@ -5,102 +5,57 @@ AUT_NAME ="leahi" # Top Parents -o_Gui_MainView = { "type": "Gui::MainView", "unnamed": 1 } -o_QQuickView = { "type": "QQuickView" } -o_Overlay = {"container": o_QQuickView, "type": "Overlay" } -standByScreen_MainHome = {"container": o_Gui_MainView, "type": "MainHome" } -treatmentStack = {"container": o_Gui_MainView, "type": "TreatmentStack" } -startTreatmentButton = {"container": o_Gui_MainView, "id": "_startTreatmentRect", "type": "TouchRect", "unnamed": 1 } -mainTreatmentScreen = {"container": treatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1 } -startFluidButton = {"container": mainTreatmentScreen, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1 } -salineDeliveredText = {"container": mainTreatmentScreen, "objectName": "salineDescriptionText", "type": "Text" } -currentBolusVolume = {"container": mainTreatmentScreen, "type": "Label", "unnamed": 1 } -treatmentSaline = {"container": mainTreatmentScreen, "objectName": "treatmentSaline", "type": "TreatmentSaline" } -salineProgressBar = {"container": mainTreatmentScreen, "id": "_fluidProgressBar", "type": "ProgressBar", "unnamed": 1 } -pressure_venous_marker_text = {"container": mainTreatmentScreen, "id": "_rangeMarkerValue", "occurrence": 2, "type": "RangeMarker", "unnamed": 1 } -pressure_tmp_marker_text = {"container": mainTreatmentScreen, "id": "_rangeMarkerValue", "occurrence": 3, "type": "RangeMarker", "unnamed": 1 } -arterial_RangeBar = {"container": mainTreatmentScreen, "id": "_rangeBar", "type": "RangeBar", "unnamed": 1 } -venous_RangeBar = {"container": mainTreatmentScreen, "id": "_rangeBar", "occurrence": 2, "type": "RangeBar", "unnamed": 1 } -tmp_RangeBar = {"container": mainTreatmentScreen, "id": "_rangeBar", "occurrence": 3, "type": "RangeBar", "unnamed": 1 } -treatmentUltrafiltration = {"container": mainTreatmentScreen, "objectName": "treatmentUltrafiltration", "type": "TreatmentUltrafiltration" } -UF_Volume_Text = {"container": mainTreatmentScreen, "text": "UF Volume", "type": "Text", "unnamed": 1 } -UF_Rate_Text = {"container": mainTreatmentScreen, "text": "UF Rate", "type": "Text", "unnamed": 1 } -treatment_duration = {"container": mainTreatmentScreen, "objectName": "treatmentTime", "type": "TreatmentTime" } -UF_Volume_LabelValue = {"container": mainTreatmentScreen, "id": "_ufVolume", "type": "LabelValue", "unnamed": 1 } -UF_Rate_LabelValue = {"container": mainTreatmentScreen, "id": "_ufRate", "type": "LabelValue", "unnamed": 1 } -Volume_Delivered = {"container": mainTreatmentScreen, "id": "_valueText", "type": "Text", "unnamed": 1 } -blood_flow_value = {"container": mainTreatmentScreen, "id": "_bloodFlow", "objectName": "bloodFlowComponent", "type": "TreatmentFlowsComponent" } -dial_flow_value = {"container": mainTreatmentScreen, "objectName": "dialysateFlowComponent", "type": "TreatmentFlowsComponent" } -dial_tmp_value = {"container": mainTreatmentScreen, "id": "_dialysateTemp", "objectName": "dialysateTempComponent", "type": "TreatmentFlowsComponent" } -dial_cond_value = {"container": mainTreatmentScreen, "id": "_dialysateCond", "objectName": "dialysateCondComponent", "type": "TreatmentFlowsComponent" } -Treatment_Parameters_Text = {"container": mainTreatmentScreen, "text": "Treatment Parameters", "type": "Text", "unnamed": 1 } -pressure_arterial_marker_text = {"container": mainTreatmentScreen, "id": "_rangeMarkerValue", "type": "RangeMarker", "unnamed": 1 } -blood_flow_title_Text = {"container": mainTreatmentScreen, "objectName": "title", "text": "Blood Flow" , "type": "Text", } -dialyste_flow_title_Text = {"container": mainTreatmentScreen, "objectName": "title", "text": "Dialysate Flow", "type": "Text", } -dialyste_tmp_title_Text = {"container": mainTreatmentScreen, "objectName": "title", "text": "Dialysate Temp." , "type": "Text", } -dialyste_cond_title_Text = {"container": mainTreatmentScreen, "objectName": "title", "text": "Dialysate Cond." , "type": "Text", } -treatmentTimeNotificationBarSmall = {"container": mainTreatmentScreen, "objectName": "notification", "type": "NotificationBarSmall" } - +o_Gui_MainView = { "type": "Gui::MainView", "unnamed": 1 } +o_QQuickView = { "type": "QQuickView" } +o_Overlay = {"container": o_QQuickView, "type": "Overlay" } +o_standByScreen_MainHome = {"container": o_Gui_MainView, "type": "MainHome" } o_PreTreatmentCreateStack_PreTreatmentCreateStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentCreateStack", "type": "PreTreatmentCreateStack" } o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate" } -o_PreTreatmentCreate_Prescription_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Prescription", "type": "Text", "unnamed": 1 } +o_PreTreatmentCreate_Prescription_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Prescription", "type": "Text", "unnamed": 1 } o_bullet_object = { "type": "StepBullet", "unnamed": 1 } o_text_object = { "type": "Text", "unnamed": 1 } o_PreTreatmentCreate_gridSteps_Grid = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_gridSteps", "type": "Grid", "unnamed": 1 } -o_PreTreatmentCreate_Blood_Flow_Rate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Blood Flow Rate", "type": "Text", "unnamed": 1 } o_PreTreatmentCreate_bloodFlowRate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bloodFlowRate", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bloodFlowRateControl", "type": "ValueAdjuster", "unnamed": 1 } -PatientIDEntry_TextEntry = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_pretreatmentPatientIDEntry", "type": "TextEntry", "unnamed": 1 } +o_PatientIDEntry_TextEntry = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_pretreatmentPatientIDEntry", "type": "TextEntry", "unnamed": 1 } keyboard_input = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True } o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateFlowRateControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_durationControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_durationControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinBolusVolumeControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinDispensingRateControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_heparinDispensingRateControl_OffText = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "OFF", "type": "Text", "unnamed": 1 } o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinStopTimeControl", "type": "ValueAdjuster", "unnamed": 1 } -PreTreatmentCreate_heparinStopTime_OffText = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "OFF", "type": "Text", " unnamed": 1, "occurrence": 2, } o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateTemperatureControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_salineBolusVolumeControl", "type": "ValueAdjuster", "unnamed": 1 } o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjuster = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementIntervalControl", "type": "ValueAdjuster", "unnamed": 1 } -o_PreTreatmentCreate_Dialysate_Flow_Rate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Dialysate Flow Rate", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_Duration_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Duration", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_Heparin_Bolus_Volume_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Heparin Bolus Volume", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_Heparin_Dispensing_Rate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Heparin Dispensing Rate", "type": "Text", "unnamed": 1 } o_PreTreatmentCreate_OFF_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "OFF", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_Heparin_Stop_Time_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Heparin Stop Time", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_dialysateTemperatureControl_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Dialysate Temperature", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_salineBolusVolume_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Saline Bolus Volume", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_bpMeasurementInterval_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "BP Measurement Interval", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_Bicarbonate_Concentrate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Bicarbonate Concentrate", "type": "Text", "unnamed": 1 } o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox= {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonateConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialyzerTypeComboBox", "type": "BaseComboBox", "unnamed": 1 } -o_PreTreatmentCreate_dialyzerType_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Dialyzer Type", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_acidConcentrate_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "text": "Acid Concentrate", "type": "Text", "unnamed": 1 } -o_PreTreatmentCreate_iconImage_Image = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_editButton", "type": "IconButton", "unnamed": 1, "visible": True } -o_iconImage_Image = {"container": o_Overlay, "id": "_iconImage" , "type": "Image", "unnamed": 1, "source": "qrc:/images/iArrowRight" } o_saveButton_TouchRect = {"container": o_Overlay, "id": "_saveButton", "type": "TouchRect", "unnamed": 1 } o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_acidConcentrateComboBox", "type": "BaseComboBox", "unnamed": 1 } -o_PreTreatmentCreate_acidConcentrate_Popup_Text = {"container": o_Overlay, "text": "Acid Concentrate", "type": "TitleText", "unnamed": 1 } -o_delegate_ItemDelegate_4 = {"checkable": False, "container": o_Overlay, "id": "_delegate", "occurrence": 3, "type": "ItemDelegate", "unnamed": 1 } +o_PreTreatmentCreate_acidConcentrate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_acidConcentrate", "type": "LabelUnitContainer", "unnamed": 1 } +o_acidConcentrate_editbutton = {"container": o_PreTreatmentCreate_acidConcentrate_LabelUnitContainer, "id": "_editButton", "type": "IconButton", "unnamed": 1, "visible": True } +o_PreTreatmentCreate_acidConcentrate_Popup_Text = {"container": o_Overlay, "type": "TitleText", "unnamed": 1 } o_PreTreatmentCreate_qrCode_Image = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_qrCode", "type": "Image", "unnamed": 1 } -o_PreTreatmentCreate_iconImage_Image_2 = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_iconImage", "type": "Image", "unnamed": 1, "source": "qrc:/images/iArrowRight" } -o_PreTreatmentCreate_iconImage_Image_3 = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_iconImage", "occurrence": 2, "type": "Image", "unnamed": 1, "source": "qrc:/images/iArrowRight" } -confirmButtom = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_confirmButton", "type": "ConfirmButton" } -prescription_menuButton = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_prescriptionMenu", "type": "BaseComboBox", "unnamed": 1 } +o_confirmButtom = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "objectName": "_confirmButton", "type": "ConfirmButton" } +o_prescription_menuButton = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_prescriptionMenu", "type": "BaseComboBox", "unnamed": 1 } o_PreTreatmentCreate_dialysateFlowRate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateFlowRate", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_duration_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_duration", "type": "LabelUnitContainer", "unnamed": 1 } -o_PreTreatmentCreate_heparinBolusVolume_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinBolusVolume", "type": "LabelUnitContainer", "unnamed": 1 } -o_PreTreatmentCreate_heparinDispensingRate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinDispensingRate", "type": "LabelUnitContainer", "unnamed": 1, } +o_PreTreatmentCreate_heparinBolusVolume_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinBolusVolume", "type": "LabelUnitContainer", "unnamed": 1 } +o_PreTreatmentCreate_heparinDispensingRate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinDispensingRate", "type": "LabelUnitContainer", "unnamed": 1, } o_PreTreatmentCreate_heparinStopTime_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_heparinStopTime", "type": "LabelUnitContainer", "unnamed": 1 } -o_PreTreatmentCreate_acidConcentrate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_acidConcentrate", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_bicarbonateConcentrate_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bicarbonateConcentrate", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_dialyzerType_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialyzerType", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_dialysateTemperature_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_dialysateTemperature", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_salineBolusVolume_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_salineBolusVolume", "type": "LabelUnitContainer", "unnamed": 1 } o_PreTreatmentCreate_bpMeasurementInterval_LabelUnitContainer = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "id": "_bpMeasurementInterval", "type": "LabelUnitContainer", "unnamed": 1 } -keyboard_switch = {"container": o_Gui_MainView, "id": "_shiftKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iShiftNormal.svg", "type": "Image", "unnamed": 1, } -o_delegate_ItemDelegate = {"checkable": False, "container": o_Overlay, "id": "_delegate", "type": "ItemDelegate", "unnamed": 1 } -o_delegate_ItemDelegate_2 = {"checkable": False, "container": o_Overlay, "id": "_delegate", "occurrence": 2, "type": "ItemDelegate", "unnamed": 1 } -o_delegate_ItemDelegate_3 = {"checkable": False, "container": o_Overlay, "id": "_delegate", "occurrence": 4, "type": "ItemDelegate", "unnamed": 1 } -keyboard_switch2 = {"container": o_Gui_MainView, "id": "_shiftKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iShiftActive.svg", "type": "Image", "unnamed": 1 } -o_SettingsHome_SettingsHome = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} \ No newline at end of file +keyboard_switch = {"container": o_Gui_MainView, "id": "_shiftKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iShiftNormal.svg", "type": "Image", "unnamed": 1 } +keyboard_switch2 = {"container": o_Gui_MainView, "id": "_shiftKeyIcon", "source": "qrc:/plugins/QtQuick/VirtualKeyboard/Styles/denali/images/iShiftActive.svg", "type": "Image", "unnamed": 1 } +o_potassium_LabelUnitContainer = {"container": o_Overlay, "id": "_potassium", "type": "LabelUnitContainer", "unnamed": 1 } +o_potassium_leftArrow_IconButton = {"container": o_potassium_LabelUnitContainer, "id": "_leftArrow", "type": "IconButton", "unnamed": 1 } +o_calcium_LabelUnitContainer = {"container": o_Overlay, "id": "_calcium", "type": "LabelUnitContainer", "unnamed": 1 } +o_calcium_leftArrow_IconButton = {"container": o_calcium_LabelUnitContainer, "id": "_leftArrow", "type": "IconButton", "unnamed": 1 } +o_option_combo_box = {"container": o_Overlay, "type": "Text", "unnamed": 1 } + + + Index: suite_leahi/tst_create_treatment/test.py =================================================================== diff -u -r393a84695cb4efd5f77675bbb6aadac0711bb18c -re262d0097836365a0adebc78a211d10b851bf23f --- suite_leahi/tst_create_treatment/test.py (.../test.py) (revision 393a84695cb4efd5f77675bbb6aadac0711bb18c) +++ suite_leahi/tst_create_treatment/test.py (.../test.py) (revision e262d0097836365a0adebc78a211d10b851bf23f) @@ -15,13 +15,13 @@ import names from names import * - +import squish from leahi_dialin.ui import utils from configuration import utility from leahi_dialin.ui.td_messaging import TD_Messaging from leahi_dialin.common.td_defs import TDOpModes from builtins import int as pyInt -import squish +from squish import * td =TD_Messaging() PRE_TREATMENT_STEP = 0 @@ -41,7 +41,7 @@ BLOOD_PRESSURE_MEASUREMENT_INTERVAL = "BP Measurement Interval" ACID_CONCENTRATE_TITLE = "Acid Concentrate" BICARBONATE_CONCENTRATE_TITLE = "Bicarbonate Concentrate" -DIALYZER_TYPE_TITLE = "Dialyzer Type" +DIALYZER_TYPE_TITLE = "Dialysate Temperature" @@ -85,7 +85,7 @@ COLOR_CODES = "#ffa500" -DIALYZER_TYPE = ["Diacap Pro 13H", "Diacap Pro 16H", "Diacap Pro 19H", "Optiflux F160NRe", "Optiflux F180NRe", "Optiflux F200NRe","Optiflux F250NRe"] +DIALYZER_TYPE = [ "Diacap Pro 13H","Diacap Pro 16H", "Diacap Pro 19H", "Optiflux F160NRe", "Optiflux F180NRe", "Optiflux F200NRe","Optiflux F250NRe"] KEYBOARD_SWITCH = ["ABC", "&123"] ACID_CONCENTRATE = ["0.0 K, 0.00 Ca, 1 Mg", "3.0 K, 2.5 Ca, 1 Mg","2.0 K, 2.5 Ca, 1 Mg","1.0 K, 2.5 Ca, 1 Mg"] CREATE_TREATMENT_PARAMETERS = ["Blood Flow Rate", "Dialysate Flow Rate", @@ -104,7 +104,7 @@ names.o_PreTreatmentCreate_salineBolusVolume_LabelUnitContainer ,names.o_PreTreatmentCreate_bpMeasurementInterval_LabelUnitContainer ] - +BUTTON_TYPE =["Select Rx","Edit Rx","Clear All"] def keyboard_object_map_helper(text): """ Method for setting custom object property's for keyboard keys @@ -171,8 +171,8 @@ Tests verifies valid patient id set through application keyboard setup . @return: N/A """ - patient_id_input = waitForObject(names.PatientIDEntry_TextEntry) - mouseClick(names.PatientIDEntry_TextEntry) + 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: @@ -232,8 +232,26 @@ test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) test.compare(bullet_circle_color, CURRENT_COLOR) test.endSection() + +def custom_object_for_combo_box(text): + """ + Method to set custom object property for export option + @param text : (string) parameter text + """ + names.o_option_combo_box["text"] = text + return names.o_option_combo_box + +def select_different_dropdown(object,type,whichTypeIndex): + type_combo_box = utility.get_object_from_names(object, error_message="Combo box object is missing") + if type_combo_box is not None: + mouseClick(waitForObjectExists(object)) + + type_option = utility.get_object_from_names(custom_object_for_combo_box(type[whichTypeIndex]),error_message=f"Option {DIALYZER_TYPE[whichTypeIndex]} object is missing",timeout_ms=5000) + if type_option is not None: + mouseClick(type_option) + return True + return False # default return if not successful - def verify_create_custom_treatment_parameter(): """ Method to set create custom treatment slider value based on slider buffer @@ -249,19 +267,19 @@ test.endSection() test.startSection("Verification of dialysate flow values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Dialysate_Flow_Rate_Text).text, DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(DIALYSATE_FLOW_RATE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_LabelUnitContainer).text, DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(DIALYSATE_FLOW_RATE)) for dialysate_flow_rate in CREATE_TREATMENT_PARAMETER_RANGE[DIALYSATE_FLOW_RATE]: set_value_based_on_target(names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, dialysate_flow_rate) test.endSection() test.startSection("Verification of duration values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Duration_Text).text, DURATION, "Parameter should be -> "+str(DURATION)) + test.compare(waitForObject(names.o_PreTreatmentCreate_duration_LabelUnitContainer).text, DURATION, "Parameter should be -> "+str(DURATION)) for duration in CREATE_TREATMENT_PARAMETER_RANGE[DURATION]: set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, duration) test.endSection() test.startSection("Verification of heparin bolus volume values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Heparin_Bolus_Volume_Text).text, HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(HEPARIN_BOLUS_VOLUME)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolume_LabelUnitContainer).text, HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(HEPARIN_BOLUS_VOLUME)) mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster)) test.compare(OFF_TEXT, waitForObject(names.o_PreTreatmentCreate_OFF_Text).text, "OFF text should be enabled") for heparin_bolus_volume in CREATE_TREATMENT_PARAMETER_RANGE[HEPARIN_BOLUS_VOLUME]: @@ -270,89 +288,75 @@ test.startSection("Verification of heparin dispensing rate values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Heparin_Dispensing_Rate_Text).text, HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(HEPARIN_DISPENSING_RATE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRate_LabelUnitContainer).text, HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(HEPARIN_DISPENSING_RATE)) mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster)) test.compare(OFF_TEXT, waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateControl_OffText).text, "OFF text should be enabled") - # test.compare(OFF_TEXT, waitForObject(names.PreTreatmentCreate_heparinStopTime_OffText).text, "OFF text should be enabled for heparin stop values") for heparin_dispensing_rate in CREATE_TREATMENT_PARAMETER_RANGE[HEPARIN_DISPENSING_RATE]: set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, heparin_dispensing_rate) test.endSection() test.startSection("Verification of heparin stop time values") set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "0.2") set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, "480") - test.compare(waitForObject(names.o_PreTreatmentCreate_Heparin_Stop_Time_Text).text, HEPARIN_STOP_TIME, "Parameter should be -> "+str(HEPARIN_STOP_TIME)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinStopTime_LabelUnitContainer).text, HEPARIN_STOP_TIME, "Parameter should be -> "+str(HEPARIN_STOP_TIME)) for heparin_stop_time in CREATE_TREATMENT_PARAMETER_RANGE[HEPARIN_STOP_TIME]: set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, heparin_stop_time) test.endSection() test.startSection("Verification of Dialysate Temperature") - test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperatureControl_Text).text,DIALYSATE_TEMPERATURE , "Parameter should be -> "+str(DIALYSATE_TEMPERATURE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperature_LabelUnitContainer).text,DIALYSATE_TEMPERATURE , "Parameter should be -> "+str(DIALYSATE_TEMPERATURE)) for dialysate_temperature in CREATE_TREATMENT_PARAMETER_RANGE[DIALYSATE_TEMPERATURE]: set_value_based_on_target(names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster,dialysate_temperature) test.endSection() test.startSection("Verification of saline bolus values") - test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolusVolume_Text).text, SALINE_BOLUS_VOLUME, "Parameter should be -> "+str(SALINE_BOLUS_VOLUME)) + test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolusVolume_LabelUnitContainer).text, SALINE_BOLUS_VOLUME, "Parameter should be -> "+str(SALINE_BOLUS_VOLUME)) for saline_bolus in CREATE_TREATMENT_PARAMETER_RANGE[SALINE_BOLUS_VOLUME]: set_value_based_on_target(names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, saline_bolus) test.endSection() test.startSection("Verification of BP Measurement Interval") - test.compare(waitForObject(names.o_PreTreatmentCreate_bpMeasurementInterval_Text).text, BLOOD_PRESSURE_MEASUREMENT_INTERVAL, "Parameter should be -> "+str(BLOOD_PRESSURE_MEASUREMENT_INTERVAL)) + test.compare(waitForObject(names.o_PreTreatmentCreate_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]: set_value_based_on_target(names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjuster,bp_measurement_interval) test.endSection() - test.startSection("Verification of acid concentrate type") - test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrate_Text).text, ACID_CONCENTRATE_TITLE, "Parameter should be -> "+str(ACID_CONCENTRATE_TITLE)) - mouseClick(waitForObject(names.o_PreTreatmentCreate_iconImage_Image)) + test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrate_LabelUnitContainer).text, ACID_CONCENTRATE_TITLE, "Parameter should be -> "+str(ACID_CONCENTRATE_TITLE)) + mouseClick(waitForObject(names.o_acidConcentrate_editbutton)) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrate_Popup_Text).text, ACID_CONCENTRATE_TITLE, "Parameter should be -> "+str(ACID_CONCENTRATE_TITLE)) - mouseClick(waitForObject(names.o_iconImage_Image)) - mouseClick(waitForObject(names.o_iconImage_Image)) + mouseClick(waitForObject(names.o_potassium_leftArrow_IconButton)) + mouseClick(waitForObject(names.o_calcium_leftArrow_IconButton)) mouseClick(waitForObject(names.o_saveButton_TouchRect)) - mouseClick(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox)) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_3)) + select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,0) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox).currentText, ACID_CONCENTRATE[0], "Acid concentrate value should be :"+str(ACID_CONCENTRATE[0])) - mouseClick(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox)) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,1) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox).currentText, ACID_CONCENTRATE[1], "Acid concentrate value should be :"+str(ACID_CONCENTRATE[1])) - mouseClick(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox)) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_4)) + select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,2) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox).currentText, ACID_CONCENTRATE[2], "Acid concentrate value should be :"+str(ACID_CONCENTRATE[2])) - mouseClick(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox)) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_3)) + select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,ACID_CONCENTRATE,3) test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox).currentText, ACID_CONCENTRATE[3], "Acid concentrate value should be :"+str(ACID_CONCENTRATE[3])) test.endSection() - test.startSection("Verification of dialyzer type") - test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerType_Text).text, DIALYZER_TYPE_TITLE, "Parameter should be -> "+str(DIALYZER_TYPE_TITLE)) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate)) + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperature_LabelUnitContainer).text, DIALYZER_TYPE_TITLE, "Parameter should be -> "+str(DIALYZER_TYPE_TITLE)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,0) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[0], "Dialyzer type value should be :"+str(DIALYZER_TYPE[0])) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,1) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[1], "Dialyzer type value should be :"+str(DIALYZER_TYPE[1])) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,2) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[2], "Dialyzer type value should be :"+str(DIALYZER_TYPE[2])) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,3) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[3], "Dialyzer type value should be :"+str(DIALYZER_TYPE[3])) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,4) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[4], "Dialyzer type value should be :"+str(DIALYZER_TYPE[4])) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,5) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[5], "Dialyzer type value should be :"+str(DIALYZER_TYPE[5])) - mouseClick(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_2)) + select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,DIALYZER_TYPE,6) test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox).currentText, DIALYZER_TYPE[6], "Dialyzer type value should be :"+str(DIALYZER_TYPE[6])) - + test.endSection() - + td.td_Treatment_Parameters_Validation( vAccepted = 1, vBloodFlowRateRejectReason = 0, vDialysateFlowRateRejectReason = 0, @@ -376,7 +380,7 @@ ) utils.waitForGUI(3) test.verify(waitForObjectExists(names.o_PreTreatmentCreate_qrCode_Image), "QR Code is visible") - confirmButton = waitForObject(names.confirmButtom) + confirmButton = waitForObject(names.o_confirmButtom) test.compare(confirmButton.enabled, True, "Confirm button is enabled") td.td_operation_mode(TDOpModes.MODE_PRET.value, 0) test.endSection() @@ -407,57 +411,64 @@ vHeparinBolusVolumeRejectReason = 0 ) utils.waitForGUI(3) - mouseClick(waitForObjectExists(names.prescription_menuButton)) - mouseClick(waitForObject(names.o_delegate_ItemDelegate)) + select_different_dropdown(names.o_prescription_menuButton,BUTTON_TYPE,0) test.startSection("Verification of blood flow values") test.compare(waitForObject(names.o_PreTreatmentCreate_bloodFlowRate_LabelUnitContainer).text, BLOOD_FLOW_RATE, "Parameter should be -> "+str(BLOOD_FLOW_RATE)) for blood_flow_rate in CREATE_TREATMENT_PARAMETER[BLOOD_FLOW_RATE]: set_value_based_on_target(names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, blood_flow_rate) test.endSection() test.startSection("Verification of dialysate flow values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Dialysate_Flow_Rate_Text).text, DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(DIALYSATE_FLOW_RATE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_LabelUnitContainer).text, DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(DIALYSATE_FLOW_RATE)) for dialysate_flow_rate in CREATE_TREATMENT_PARAMETER[DIALYSATE_FLOW_RATE]: set_value_based_on_target(names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, dialysate_flow_rate) test.endSection() test.startSection("Verification of duration values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Duration_Text).text, DURATION, "Parameter should be -> "+str(DURATION)) + test.compare(waitForObject(names.o_PreTreatmentCreate_duration_LabelUnitContainer).text, DURATION, "Parameter should be -> "+str(DURATION)) for duration in CREATE_TREATMENT_PARAMETER[DURATION]: set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, duration) test.endSection() test.startSection("Verification of heparin bolus volume values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Heparin_Bolus_Volume_Text).text, HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(HEPARIN_BOLUS_VOLUME)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolume_LabelUnitContainer).text, HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(HEPARIN_BOLUS_VOLUME)) mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster)) test.compare(OFF_TEXT, waitForObject(names.o_PreTreatmentCreate_OFF_Text).text, "OFF text should be enabled") for heparin_bolus_volume in CREATE_TREATMENT_PARAMETER[HEPARIN_BOLUS_VOLUME]: set_value_based_on_target(names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, heparin_bolus_volume) test.endSection() + test.startSection("Verification of heparin dispensing rate values") - test.compare(waitForObject(names.o_PreTreatmentCreate_Heparin_Dispensing_Rate_Text).text, HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(HEPARIN_DISPENSING_RATE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRate_LabelUnitContainer).text, HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(HEPARIN_DISPENSING_RATE)) mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster)) test.compare(OFF_TEXT, waitForObject(names.o_PreTreatmentCreate_heparinDispensingRateControl_OffText).text, "OFF text should be enabled") for heparin_dispensing_rate in CREATE_TREATMENT_PARAMETER[HEPARIN_DISPENSING_RATE]: set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, heparin_dispensing_rate) test.endSection() + test.startSection("Verification of heparin stop time values") + set_value_based_on_target(names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "0.2") + set_value_based_on_target(names.o_PreTreatmentCreate_durationControl_ValueAdjuster, "480") + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinStopTime_LabelUnitContainer).text, HEPARIN_STOP_TIME, "Parameter should be -> "+str(HEPARIN_STOP_TIME)) + for heparin_stop_time in CREATE_TREATMENT_PARAMETER[HEPARIN_STOP_TIME]: + set_value_based_on_target(names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, heparin_stop_time) + test.endSection() test.startSection("Verification of Dialysate Temperature") - test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperatureControl_Text).text,DIALYSATE_TEMPERATURE , "Parameter should be -> "+str(DIALYSATE_TEMPERATURE)) - for dialysate_temperature in CREATE_TREATMENT_PARAMETER[DIALYSATE_TEMPERATURE]: + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperature_LabelUnitContainer).text,DIALYSATE_TEMPERATURE , "Parameter should be -> "+str(DIALYSATE_TEMPERATURE)) + for dialysate_temperature in CREATE_TREATMENT_PARAMETER_RANGE[DIALYSATE_TEMPERATURE]: set_value_based_on_target(names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster,dialysate_temperature) test.endSection() test.startSection("Verification of saline bolus values") - test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolusVolume_Text).text, SALINE_BOLUS_VOLUME, "Parameter should be -> "+str(SALINE_BOLUS_VOLUME)) + test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolusVolume_LabelUnitContainer).text, SALINE_BOLUS_VOLUME, "Parameter should be -> "+str(SALINE_BOLUS_VOLUME)) for saline_bolus in CREATE_TREATMENT_PARAMETER[SALINE_BOLUS_VOLUME]: set_value_based_on_target(names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, saline_bolus) test.endSection() test.startSection("Verification of BP Measurement Interval") - test.compare(waitForObject(names.o_PreTreatmentCreate_bpMeasurementInterval_Text).text, BLOOD_PRESSURE_MEASUREMENT_INTERVAL, "Parameter should be -> "+str(BLOOD_PRESSURE_MEASUREMENT_INTERVAL)) + test.compare(waitForObject(names.o_PreTreatmentCreate_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]: set_value_based_on_target(names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjuster,bp_measurement_interval) test.endSection() @@ -491,9 +502,8 @@ vHeparinBolusVolumeRejectReason = 0 ) utils.waitForGUI(3) - mouseClick(waitForObjectExists(names.prescription_menuButton)) - mouseClick(waitForObject(names.o_delegate_ItemDelegate_4)) - button = waitForObjectExists(names.confirmButtom) + select_different_dropdown(names.o_prescription_menuButton,BUTTON_TYPE,2) + button = waitForObjectExists(names.o_confirmButtom) test.verify(not button.enabled, "Validate that the button is disabled") test.endSection() @@ -612,15 +622,15 @@ td.td_operation_mode(TDOpModes.MODE_STAN.value) # verify Standby screen - test.verify(waitForObjectExists(names.standByScreen_MainHome), "In Standby") + test.verify(waitForObjectExists(names.o_standByScreen_MainHome), "In Standby") td.td_operation_mode(TDOpModes.MODE_TPAR.value, 0 ) test.startSection("Verfiy the treatement parameter validation") test.compare(waitForObject(names.o_PreTreatmentCreate_Prescription_Text).text, PRESCRIPTION_TITLE, "Title text should be -> "+str(PRESCRIPTION_TITLE)) verify_page_step_indicator(screen_obj=names.o_PreTreatmentCreate_gridSteps_Grid, treatment_step=PRE_TREATMENT_STEP, treatment_screens=PRE_TREATMENT_SCREENS) test.log("Verify the Patient ID field") - mouseClick(waitForObject(names.PatientIDEntry_TextEntry)) + mouseClick(waitForObject(names.o_PatientIDEntry_TextEntry)) for expected_patient_id, actual_patient_id in PATIENT_ID_COMBINATION.items(): verify_valid_patient_id_through_keypad(expected_patient_id, actual_patient_id)