Index: suite_leahi/tst_pre_treatment_foundation/test.py =================================================================== diff -u -rb551aa7300336151240a5fc79ebd7cd366de2018 -r0b9e1c4d2429e9ad58420f00a52adf8ec800ef35 --- suite_leahi/tst_pre_treatment_foundation/test.py (.../test.py) (revision b551aa7300336151240a5fc79ebd7cd366de2018) +++ suite_leahi/tst_pre_treatment_foundation/test.py (.../test.py) (revision 0b9e1c4d2429e9ad58420f00a52adf8ec800ef35) @@ -86,38 +86,38 @@ ) -def set_treatment_params(): +def set_treatment_params(patient_id, blood_flow, dialysate_flow, duration_value, ultrafiltration_volume_value): mouseClick(waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry)) - waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text ="1234" - parent_obj = waitForObject(names.o_PreTreatmentCreate_leftColumn_Column, 3000) - blood_flow_rate = utility.findObjectById(parent_obj, "_bloodFlowRate") - utility.set_value_based_on_target(blood_flow_rate, 60) - dialysate_flow_rate = utility.findObjectById(parent_obj, "_dialysateFlowRate") - utility.set_value_based_on_target(dialysate_flow_rate, 75) - duration = utility.findObjectById(parent_obj,"_duration") - utility.set_value_based_on_target(duration, 75) - right_obj = waitForObject(names.o_PreTreatmentCreate_rightColumn_Column) + waitForObject(names.o_PreTreatmentCreate_pretreatmentPatientIDEntry_TextEntry).text = patient_id + parent_obj = waitForObject(names.o_PreTreatmentCreate_leftColumn_Column, 3000) + blood_flow_rate = utility.findObjectById(parent_obj, "_bloodFlowRate") + utility.set_value_based_on_target(blood_flow_rate, blood_flow) + dialysate_flow_rate = utility.findObjectById(parent_obj, "_dialysateFlowRate") + utility.set_value_based_on_target(dialysate_flow_rate, dialysate_flow) + duration = utility.findObjectById(parent_obj,"_duration") + utility.set_value_based_on_target(duration, duration_value) + right_obj = waitForObject(names.o_PreTreatmentCreate_rightColumn_Column) ultrafiltration_volume = utility.findObjectById(right_obj,"_ufVolume") - utility.set_value_based_on_target(ultrafiltration_volume,0.10) - heparin_rx = utility.findObjectById(right_obj,"_heparinRx") - heparin_right_arrow = utility.findObjectById(heparin_rx, "_rightArrow") + utility.set_value_based_on_target(ultrafiltration_volume,ultrafiltration_volume_value) + heparin_rx = utility.findObjectById(right_obj,"_heparinRx") + heparin_right_arrow = utility.findObjectById(heparin_rx, "_rightArrow") mouseClick(heparin_right_arrow) - heparin_obj = waitForObject(names.o_LabelUnitValueAdjuster_LabelUnitValueAdjuster) - heparin_bolus = utility.findObjectById(heparin_obj,"_heparinBolusVolume") + heparin_obj = waitForObject(names.o_LabelUnitValueAdjuster_LabelUnitValueAdjuster) + heparin_bolus = utility.findObjectById(heparin_obj,"_heparinBolusVolume") utility.set_value_based_on_target(heparin_bolus, 0.2) utility.set_value_based_on_target(names.o_heparinDispensingRate_LabelUnitValueAdjuster,0.3) utility.set_value_based_on_target(names.o_heparinDeliveryDuration_LabelUnitValueAdjuster, 75) mouseClick(waitForObject(names.o_confirmButton_ConfirmButton)) utility.select_different_dropdown(names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox,config.ACID_CONCENTRATE,2) utility.select_different_dropdown(names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox,config.DIALYZER_TYPE,2) utility.select_different_dropdown(names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox,config.BICARBONATE,0) - Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) mouseClick(waitForObject(Nextbutton)) utility.set_value_based_on_target(names.o_PreTreatmentCreate_sodium_LabelUnitValueAdjuster, 139) utility.set_value_based_on_target(names.o_PreTreatmentCreate_bicarbonate_LabelUnitValueAdjuster, 35) utility.set_value_based_on_target(names.o_PreTreatmentCreate_fluidBolusVolume_LabelUnitValueAdjuster,300) utility.set_value_based_on_target(names.o_PreTreatmentCreate_primeRinsebackVolume_LabelUnitValueAdjuster,310) - confirm_button = waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton) + confirm_button = waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton) mouseClick(confirm_button) td_simulator.td_Treatment_Parameters_Validation(vAccepted= 1) @@ -166,23 +166,18 @@ connect_obj = waitForObject(names.o_PreTreatmentBase_instructionView_InstructionView, 3000) connect = utility.findChildByText(connect_obj, config.CONCENTRATES_PAGE_CONTENTS[1]) test.compare(connect.color.name, config.BLUE_COLOR, "Test step changes to another index") - click_text( - waitForObjectExists( - names.o_PreTreatmentBase_instructionView_InstructionView, 3000 - ), - config.CONCENTRATES_PAGE_CONTENTS[1], - ) click_next() - # Installation Stepper wait_compare_text( names.o_preTreatmentStack_Text, config.INSTALLATION_STEPPER_1_PAGE_TITLE, "Installation Page Stepper 1", ) - for content in config.INSTALL_BLOOD_TUBING_SET_CONTENTS[1:4]: - click_text(None, content) + content_column = waitForObjectExists(names.o_PreTreatmentBase_contentColumn_Column) + values = utility.findAllObjectsById(content_column, "_message") + for content in values[1:4]: + mouseClick(content) click_auto_load() td_simulator.td_blood_set_auto_load_response(0) @@ -239,7 +234,7 @@ click_next() # Create Rx Flow 1 - set_treatment_params() + set_treatment_params('1234', 60, 75, 75, 0.10) # Connect wait_compare_text( @@ -249,13 +244,10 @@ ) content_column = waitForObjectExists(names.o_PreTreatmentBase_contentColumn_Column_2) values = utility.findAllObjectsById(content_column, "_message") - for content in values[1:3]: + for content in values[1:4]: mouseClick(content) verify_start_treatment_request() - # click_next() - # for content in config.CONNECT_PAGE_CONTENTS[1:5]: - # click_text(None, content) td_simulator.td_operation_mode(TDOpModes.MODE_INIT.value, 0) @@ -310,7 +302,7 @@ click_next() # Create Rx Flow 2 - set_treatment_params() + set_treatment_params('123', 80, 100, 90, 0.20) wait_compare_text( names.o_preTreatmentStack_Text,