Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r36cbf11896e8390abbfa43d3887d88817fee5463 -r67e27d13523c842962c2ab6ace6f2ca9a07eef06 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 36cbf11896e8390abbfa43d3887d88817fee5463) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 67e27d13523c842962c2ab6ace6f2ca9a07eef06) @@ -238,8 +238,4 @@ o_SettingsBase_backButton_AdvancedMode = {"container": o_SettingsBase_SettingsAdvancedMode, "objectName": "_backButton", "type": "BackButton", } o_preTreatmentStack_pretreatmentInstallation_PreTreatmentInstallStack= {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_pretreatmentInstallation", "type": "PreTreatmentInstallStack", "unnamed": 1 } o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase = {"container": o_preTreatmentStack_pretreatmentInstallation_PreTreatmentInstallStack, "objectName": "_PreTreatmentBase", "type": "PreTreatmentBase", } -o_pretreatmentInstallation_instructionView_InstructionView = {"container": o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase, "id": "_instructionView", "type": "InstructionView", "unnamed": 1 } -# -# o_preTreatmentStack_pretreatmentInstallation_PreTreatmentInstallStack = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_pretreatmentInstallation", "type": "PreTreatmentInstallStack", "unnamed": 1, "visible": True} -# o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase = {"container": o_preTreatmentStack_pretreatmentInstallation_PreTreatmentInstallStack, "objectName": "_PreTreatmentBase", "type": "PreTreatmentBase", "visible": True} -# o_PreTreatmentBase_instructionView_InstructionView_2 = {"container": o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase, "id": "_instructionView", "type": "InstructionView", "unnamed": 1, "visible": True} +o_pretreatmentInstallation_instructionView_InstructionView = {"container": o_pretreatmentInstallation_PreTreatmentBase_PreTreatmentBase, "id": "_instructionView", "type": "InstructionView", "unnamed": 1 } Index: suite_leahi/tst_pre_treatment_foundation/test.py =================================================================== diff -u -r36cbf11896e8390abbfa43d3887d88817fee5463 -r67e27d13523c842962c2ab6ace6f2ca9a07eef06 --- suite_leahi/tst_pre_treatment_foundation/test.py (.../test.py) (revision 36cbf11896e8390abbfa43d3887d88817fee5463) +++ suite_leahi/tst_pre_treatment_foundation/test.py (.../test.py) (revision 67e27d13523c842962c2ab6ace6f2ca9a07eef06) @@ -12,6 +12,7 @@ # Navigate to Through Pre-Treatment Pages Comparing Page Title and Page Contents import names +import re from configuration import config, utility, navigation, application_init from leahi_dialin.ui import utils from leahi_dialin.ui.td_messaging import TD_Messaging @@ -21,6 +22,8 @@ from leahi_dialin.utils import conversions td_simulator = TD_Messaging() +can_interface = td_simulator.can_interface +startTreatment = "-1" # handler for messages from UI to FW def handle_start_treatment_request(message, timestamp=0.0): @@ -35,224 +38,242 @@ startTreatment = str(state) -def main(): - utils.tstStart(__file__) - test.startSection("Pre-Treatment Foundation") - can_interface = td_simulator.can_interface - global startTreatment +def send_start_treatment_response(vRejectionReason: int): + """ + the start treatment response message method(Msg ID: 0xXX, XXX) + Args: + None + @return: None + """ + payload = conversions.integer_to_bytearray(1 if vRejectionReason == 0 else 0) + payload += conversions.integer_to_bytearray(vRejectionReason) - # handle bloodSetAutoLoad sent messages from UI - if can_interface is not None: - channel_id = CAN.DenaliChannels.ui_to_td_ch_id - message_id = MsgIds.MSG_ID_UI_ADJUST_START_TREATMENT_REQUEST.value - can_interface.register_receiving_publication_function( - channel_id, message_id, handle_start_treatment_request - ) - application_init.reset_system_setting("AdvancedMode") - startApplication(utility.aut("-q")) - td_simulator.td_operation_mode(TDOpModes.MODE_STAN.value) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 3000)) - td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) - - pre_treatment = waitForObjectExists( - names.o_preTreatmentStack_PreTreatmentStack, 3000 + message = CAN.DenaliMessage.build_message( + channel_id=CAN.DenaliChannels.td_to_ui_ch_id, + message_id=MsgIds.MSG_ID_TD_ADJUST_START_TREATMENT_RESPONSE.value, + payload=payload, ) - concentrates_page_title_text = waitForObjectExists( - names.o_PreTreatmentBase_instructionView_InstructionView, 3000 - ).title - test.compare( - concentrates_page_title_text, - config.CONCENTRATES_PAGE_TITLE, - "Comparison of Concentrates Page Title Text", - ) + can_interface.send(message, 0) - instruction_view_container = waitForObjectExists( - names.o_PreTreatmentBase_instructionView_InstructionView, 3000 - ) - connect_dry_bicarbonate_option = utility.findChildByText( - instruction_view_container, config.CONCENTRATES_PAGE_CONTENTS[1] - ) - mouseClick(connect_dry_bicarbonate_option) - mouseClick(waitForObject(utility.findChildByText(pre_treatment, config.NEXT), 3000)) - - installation_stepper_1_page_title_text = waitForObjectExists( - names.o_pretreatmentInstallation_instructionView_InstructionView, - 3000 - ).title - test.compare( - installation_stepper_1_page_title_text, - config.INSTALLATION_STEPPER_1_PAGE_TITLE, - "Comparison of Installation Page Stepper 1 Title Text", +def click_text(container, text, timeout=3000): + mouseClick( + utility.findChildByText(container, text) + if container + else utility.setObjectText(names.o_preTreatmentStack_Text, text) ) - for content in config.INSTALL_BLOOD_TUBING_SET_CONTENTS[1:4]: - install_bloodlines_content = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, content), 3000 - ) - mouseClick(install_bloodlines_content) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.AUTO_LOAD)) - td_simulator.td_blood_set_auto_load_response(0) - - installation_stepper_2_page_title_text = waitForObject( - utility.setObjectText( - names.o_preTreatmentStack_Text, config.INSTALLATION_STEPPER_2_PAGE_TITLE - ), - 3000, +def click_next(): + next_button = waitForObject( + utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT), 3000 ) - test.compare( - installation_stepper_2_page_title_text.text, - config.INSTALLATION_STEPPER_2_PAGE_TITLE, - "Comparison of Installation Page Stepper 2 Title Text", - ) + mouseClick(next_button) - for content in config.INSTALL_BLOODLINES_CONTENTS[1:5]: - install_bloodlines_content = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, content), 3000 - ) - mouseClick(install_bloodlines_content) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - - installation_stepper_3_page_title_text = waitForObject( - utility.setObjectText( - names.o_preTreatmentStack_Text, config.INSTALLATION_STEPPER_3_PAGE_TITLE - ), - 3000, +def click_auto_load(): + auto_load_button = waitForObject( + utility.setObjectText(names.o_preTreatmentStack_Text, config.AUTO_LOAD), 3000 ) - test.compare( - installation_stepper_3_page_title_text.text, - config.INSTALLATION_STEPPER_3_PAGE_TITLE, - "Comparison of Installation Page Stepper 3 Title Text", - ) + mouseClick(auto_load_button) - for content in config.INSTALL_PRESSURE_LINES_CONTENTS[1:7]: - install_pressure_lines_content = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, content), 3000 - ) - mouseClick(install_pressure_lines_content) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - - for content in config.SELF_TESTS_PAGE_CONTENTS: - slef_test_page_content = waitForObjectExists( - utility.setObjectText(names.o_preTreatmentStack_Text, content) - ) - test.compare( - slef_test_page_content.text, - content, - "Comparison of Self Tests Page Contents".format(content), - ) - - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - - saline_page_title = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, config.SALINE_PAGE_TITLE), - 3000, +def wait_compare_text(obj_name, expected, msg_suffix): + obj = waitForObject( + utility.setObjectText(names.o_preTreatmentStack_Text, expected), 3000 ) test.compare( - saline_page_title.text, - config.SALINE_PAGE_TITLE, - "Comparison of Saline Page Title Text", + obj.text if hasattr(obj, "text") else obj, + expected, + f"Comparison of {msg_suffix}", ) - for content in config.SALINE_PAGE_CONTENTS[1:5]: - saline_page_content = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, content), 3000 - ) - mouseClick(saline_page_content) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - - for content in config.PRIME_PAGE_CONTENTS: - prime_page_content = waitForObjectExists( - utility.setObjectText(names.o_preTreatmentStack_Text, content) - ) - test.compare( - prime_page_content.text, - content, - "Comparison of Prime Page Contents".format(content), - ) - - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - +def set_treatment_params(blood, dial, dur, hep_vol, hep_rate, hep_stop, + acid_idx, temp, dialyzer_idx, saline, bp, bicarb_idx): utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, 50 + names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, blood ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, 50 + names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, dial ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_durationControl_ValueAdjuster, 60 + names.o_PreTreatmentCreate_durationControl_ValueAdjuster, dur ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, "0.2" + names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, hep_vol ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "0.2" + names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, hep_rate ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 60 + names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, hep_stop ) utility.select_different_dropdown( names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox, config.ACID_CONCENTRATE, - 2, + acid_idx, ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster, 37.0 + names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster, temp ) utility.select_different_dropdown( names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox, config.DIALYZER_TYPE, - 2, + dialyzer_idx, ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, 100 + names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, saline ) utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom, 6.0 + names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom, bp ) utility.select_different_dropdown( names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox, config.BICARBONATE, - 0, + bicarb_idx, ) - mouseClick( - waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) - ) - td_simulator.td_Treatment_Parameters_Validation(vAccepted=1) - mouseClick( - waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) +def verify_start_rejection(): + click_text(None, config.START) + test.verify( + waitFor("'startTreatment == 1'", 3000), "Testing UI -> TD message Auto Load" ) - - connect_page_title = waitForObject( + send_start_treatment_response(1) + notification = waitForObject( utility.setObjectText( - names.o_preTreatmentStack_Text, config.CONNECT_PAGE_TITLE + names.o_preTreatmentStack_Text, + config.START_TREATMENT_REJECTION_NOTIFICATION, ), 3000, ) + digit = re.sub(r"^.*?\[(\d+)\].*$", r"\1", str(notification.text)) + if digit: + test.compare( + 1, int(float(digit)), f"Rejection reason number comparison for reason {1}" + ) + test.log(f"Rejection reason text is {notification.text}") + + +def main(): + utils.tstStart(__file__) + test.startSection("Pre-Treatment Foundation") + global startTreatment + + if can_interface: + can_interface.register_receiving_publication_function( + CAN.DenaliChannels.ui_to_td_ch_id, + MsgIds.MSG_ID_UI_ADJUST_START_TREATMENT_REQUEST.value, + handle_start_treatment_request, + ) + + application_init.reset_system_setting("AdvancedMode") + startApplication(utility.aut("-q")) + + # --- Flow 1: Full Pre-Treatment --- + td_simulator.td_operation_mode(TDOpModes.MODE_STAN.value) + mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 3000)) + td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) + + # Concentrates + waitForObjectExists(names.o_preTreatmentStack_PreTreatmentStack, 3000) test.compare( - connect_page_title.text, - config.CONNECT_PAGE_TITLE, - "Comparison of Connect Page Title Text", + waitForObjectExists( + names.o_PreTreatmentBase_instructionView_InstructionView, 3000 + ).title, + config.CONCENTRATES_PAGE_TITLE, + "Comparison of Concentrates Page Title Text", ) + click_text( + waitForObjectExists( + names.o_PreTreatmentBase_instructionView_InstructionView, 3000 + ), + config.CONCENTRATES_PAGE_CONTENTS[1], + ) + click_next() - for content in config.CONNECT_PAGE_CONTENTS[1:5]: - connect_page_content = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, content), 3000 + # 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) + + click_auto_load() + td_simulator.td_blood_set_auto_load_response(0) + + wait_compare_text( + names.o_preTreatmentStack_Text, + config.INSTALLATION_STEPPER_2_PAGE_TITLE, + "Installation Page Stepper 2", + ) + for content in config.INSTALL_BLOODLINES_CONTENTS[1:5]: + click_text(None, content) + click_next() + + wait_compare_text( + names.o_preTreatmentStack_Text, + config.INSTALLATION_STEPPER_3_PAGE_TITLE, + "Installation Page Stepper 3", + ) + for content in config.INSTALL_PRESSURE_LINES_CONTENTS[1:7]: + click_text(None, content) + click_next() + + # Self Tests + for content in config.SELF_TESTS_PAGE_CONTENTS: + obj = waitForObjectExists( + utility.setObjectText(names.o_preTreatmentStack_Text, content) ) - mouseClick(connect_page_content) + test.compare( + obj.text, content, f"Comparison of Self Tests Page Contents: {content}" + ) + click_next() - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.START)) + # Saline + wait_compare_text( + names.o_preTreatmentStack_Text, + config.SALINE_PAGE_TITLE, + "Saline Page Title Text", + ) + for content in config.SALINE_PAGE_CONTENTS[1:5]: + mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, content)) + click_next() - test.verify( - waitFor("'startTreatment == 1'", 3000), "Testing UI -> TD message Auto Load" + # Prime + for content in config.PRIME_PAGE_CONTENTS: + obj = waitForObjectExists( + utility.setObjectText(names.o_preTreatmentStack_Text, content) + ) + test.compare(obj.text, content, f"Comparison of Prime Page Contents: {content}") + click_next() + + # Create Rx Flow 1 + set_treatment_params(50, 50, 60, "0.2", "0.2", 60, 2, 37.0, 2, 100, 6.0, 0) + mouseClick( + waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) ) + td_simulator.td_Treatment_Parameters_Validation(vAccepted=1) + mouseClick( + waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) + ) + # Connect + wait_compare_text( + names.o_preTreatmentStack_Text, + config.CONNECT_PAGE_TITLE, + "Connect Page Title Text", + ) + for content in config.CONNECT_PAGE_CONTENTS[1:5]: + click_text(None, content) + + verify_start_rejection() + + # Post Treatment + td_simulator.td_blood_set_auto_load_response(0) td_simulator.td_operation_mode(TDOpModes.MODE_TREA.value, 0) td_simulator.td_tx_state( TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -270,158 +291,86 @@ config.DISCONNECT_PAGE_TITLE, "Comparison of Disconnect Page Title Text", ) - disconnect_page_content = waitForObject( - utility.findChildByText(post_treatment, config.DISCONNECT_PAGE_CONTENTS[1]), - 3000, - ) - mouseClick(disconnect_page_content) - mouseClick( - waitForObject(utility.findChildByText(post_treatment, config.AUTO_EJECT), 3000) - ) + click_text(post_treatment, config.DISCONNECT_PAGE_CONTENTS[1]) + click_text(post_treatment, config.AUTO_EJECT) td_simulator.td_blood_set_auto_eject_response(0) - td_simulator.td_operation_mode(TDOpModes.MODE_INIT.value, 0) - navigation.navigate_to_device_settings_using_service_password() - grid_container = waitForObject(names.o_DeviceSettingsGrid, 2000) - mouseClick(utility.findChildByText(grid_container, config.ADVANCED_MODE)) - advanced_mode_switch = waitForObject(names.o_settingsAdvancedMode_BaseSwitch, 1000) - # Check current state and toggle Advanced Mode Switch and store the initial state - was_checked = advanced_mode_switch.checked - test.log( - f"Initial Advanced Mode switch state: {'Checked' if was_checked else 'Unchecked'}" + # --- Toggle Advanced Mode --- + navigation.navigate_to_device_settings_using_service_password() + mouseClick( + utility.findChildByText( + waitForObject(names.o_DeviceSettingsGrid, 2000), config.ADVANCED_MODE + ) ) - # Perform the toggle action - mouseClick(advanced_mode_switch) + mouseClick(waitForObject(names.o_settingsAdvancedMode_BaseSwitch, 1000)) mouseClick(waitForObjectExists(names.o_SettingsBase_backButton_AdvancedMode, 3000)) + # --- Flow 2: Simplified Pre-Treatment --- main_menu_container = waitForObject(names.o_mainMenu_MainMenu, 2000) - mouseClick(utility.findChildByText(main_menu_container, config.PRESCRIPTIONS)) - mouseClick(utility.findChildByText(main_menu_container, config.TREATMENT)) - mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 2000)) - td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) - installation_page_title = waitForObject( - utility.setObjectText( - names.o_preTreatmentStack_Text, config.INSTALLATION_PAGE_TITLE - ), - 3000, + prescription_menu = waitForObject( + utility.findChildByText(main_menu_container, config.PRESCRIPTIONS), 3000 ) - test.compare( - installation_page_title.text, - config.INSTALLATION_PAGE_TITLE, - "Comparison of Installation Page Title Text", + mouseClick(prescription_menu) + treatment_menu = waitForObject( + utility.findChildByText(main_menu_container, config.TREATMENT), 3000 ) + mouseClick(treatment_menu) - installation_page_content = waitForObject( - utility.setObjectText( - names.o_preTreatmentStack_Text, config.INSTALLATION_PAGE_CONTENTS[1] - ), - 3000, + mouseClick(waitForObject(names.o_createTreatmentRect_TouchRect, 3000)) + td_simulator.td_operation_mode(TDOpModes.MODE_PRET.value) + + wait_compare_text( + names.o_preTreatmentStack_Text, + config.INSTALLATION_PAGE_TITLE, + "Installation Page Title Text", ) - mouseClick(installation_page_content) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.AUTO_LOAD)) + click_text(None, config.INSTALLATION_PAGE_CONTENTS[1]) + click_text(None, config.AUTO_LOAD) td_simulator.td_blood_set_auto_load_response(0) + # Self Tests for content in config.SELF_TESTS_PAGE_CONTENTS: - slef_test_page_content = waitForObjectExists( + obj = waitForObjectExists( utility.setObjectText(names.o_preTreatmentStack_Text, content) ) test.compare( - slef_test_page_content.text, - content, - "Comparison of Self Tests Page Contents".format(content), + obj.text, content, f"Comparison of Self Tests Page Contents: {content}" ) + click_next() - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - - saline_page_title = waitForObject( - utility.setObjectText(names.o_preTreatmentStack_Text, config.SALINE_PAGE_TITLE), - 3000, - ) - test.compare( - saline_page_title.text, + # Saline + wait_compare_text( + names.o_preTreatmentStack_Text, config.SALINE_PAGE_TITLE, - "Comparison of Saline Page Title Text", + "Saline Page Title Text", ) + click_next() - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - + # Prime for content in config.PRIME_PAGE_CONTENTS: - prime_page_content = waitForObjectExists( + obj = waitForObjectExists( utility.setObjectText(names.o_preTreatmentStack_Text, content) ) - test.compare( - prime_page_content.text, - content, - "Comparison of Prime Page Contents".format(content), - ) + test.compare(obj.text, content, f"Comparison of Prime Page Contents: {content}") + click_next() - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.NEXT)) - - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bloodFlowRateControl_ValueAdjuster, 60 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateFlowRateControl_ValueAdjuster, 75 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_durationControl_ValueAdjuster, 75 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinBolusVolumeControl_ValueAdjuster, "0.3" - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinDispensingRateControl_ValueAdjuster, "0.3" - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_heparinStopTimeControl_ValueAdjuster, 60 - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_acidConcentrateComboBox_BaseComboBox, - config.ACID_CONCENTRATE, - 2, - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_dialysateTemperatureControl_ValueAdjuster, 38.0 - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_dialyzerTypeComboBox_BaseComboBox, - config.DIALYZER_TYPE, - 2, - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_salineBolusVolumeControl_ValueAdjuster, 200 - ) - utility.set_value_based_on_target( - names.o_PreTreatmentCreate_bpMeasurementIntervalControl_ValueAdjusterCustom, 3.0 - ) - utility.select_different_dropdown( - names.o_PreTreatmentCreate_bicarbonateConcentrateComboBox_BaseComboBox, - config.BICARBONATE, - 0, - ) - + # Create Rx Flow 2 + set_treatment_params(60, 75, 75, "0.3", "0.3", 60, 2, 38.0, 2, 200, 3.0, 0) mouseClick( waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) ) - td_simulator.td_Treatment_Parameters_Validation(vAccepted=1) mouseClick( waitForObjectExists(names.o_preTreatmentStack_confirmButton_ConfirmButton, 3000) ) - connect_page_title = waitForObject( - utility.setObjectText( - names.o_preTreatmentStack_Text, config.CONNECT_PAGE_TITLE - ), - 3000, - ) - test.compare( - connect_page_title.text, + wait_compare_text( + names.o_preTreatmentStack_Text, config.CONNECT_PAGE_TITLE, - "Comparison of Connect Page Title Text", + "Connect Page Title Text", ) - mouseClick(utility.setObjectText(names.o_preTreatmentStack_Text, config.START)) + verify_start_rejection() test.endSection()