Index: tst_instructions_poc/test.py =================================================================== diff -u -rf4c31bbf4daba2faa30d995f55cd306e19250671 -r5452e639265be9bc37215535a02877c98ebaecee --- tst_instructions_poc/test.py (.../test.py) (revision f4c31bbf4daba2faa30d995f55cd306e19250671) +++ tst_instructions_poc/test.py (.../test.py) (revision 5452e639265be9bc37215535a02877c98ebaecee) @@ -11,15 +11,20 @@ from dialin.ui.utils import waitForGUI hd_simulator = HDSimulator() +ven_low = 40 +ven_high = 400 +art_low = -240 +art_high = -20 contents = [] instructions = [] image_names = [] title_list = [] count_of_instructions = [] title_count_dict = {} conf_dict = {} -text_obj_names = [names.o_PreTreatmentBase_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView_2,names.o_preTreatmentDisposablesCartridgeInstallation_swipeview_SwipeView,names.o_preTreatmentDisposablesCartridgeConnetion_swipeview_SwipeView,names.o_preTreatmentDisposablesSalineBag_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView_3] -rightarrow_obj_names = [names.o_preTreatmentConsumablesStack_PreTreatmentBase_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase,names.o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase] +image_list_from_location = os.listdir(config.EXPECTED_IMAGE_LOCATION) +text_obj_names = [names.o_PreTreatmentBase_swipeview_SwipeView_WaterSample,names.o_PreTreatmentBase_swipeview_SwipeView_Consumables,names.o_preTreatmentDisposablesCartridgeInstallation_swipeview_SwipeView,names.o_preTreatmentDisposablesCartridgeConnetion_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView,names.o_preTreatmentDisposablesSalineBag_swipeview_SwipeView,names.o_PreTreatmentBase_swipeview_SwipeView_3,names.o_EndTreatmentRinsebackInit_swipeview_SwipeView,names.o_EndTreatmentRinsebackComplete_swipeview_SwipeView,names.o_patientDisconnectionConfirm_swipeview_SwipeView,names.o_disposablesRemovalConfirm_swipeview_SwipeView,names.o_EndTreatmentBase_swipeview_SwipeView,names.o_disinfect_swipeview_SwipeView] +rightarrow_obj_names = [names.o_preTreatmentConsumablesStack_PreTreatmentBase_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeInstallation_TreatmentFlowBase,names.o_preTreatmentDisposablesStack_preTreatmentDisposablesCartridgeConnetion_TreatmentFlowBase,names.o_PreTreatmentStack_preTreatmentDisposablesStack_PreTreatmentDisposablesStack,names.o_pretreatmentConnectionStack_PreTreatmentBase_TreatmentFlowBase,names.o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit,names.o_PostTreatmentStack_patientDisconnectionConfirm_TreatmentFlowBase,names.o_PostTreatmentStack_disposablesRemovalConfirm_TreatmentFlowBase,names.o_EndTreatmentRecirculateStack_EndTreatmentBase_EndTreatmentBase,names.o_DisinfectStack_disinfect_TreatmentFlowBase] def get_text_obj(screen_obj,text): """ @@ -94,30 +99,256 @@ for i in range((title_count_dict.get(title))): instruction_text = instructions[index] image_text = image_names[index] -# test.log(str(instruction_text)) instruction_text = instruction_text.replace('\\n','\n') -# test.log(str(instruction_text)) index += 1 -# test.log(str(index)) if instruction_text[-1] == " ": instruction_text = instruction_text.rstrip() -# test.log(str(instruction_text)) image_source = waitForObjectExists(get_img_obj(text_obj_names[0],"{}{}".format(config.IMAGE_LOCATION, image_text))).source.path test.compare(str(waitForObject(get_text_obj(text_obj_names[0],instruction_text)).text),instruction_text, "Instruction from " +title+ " screen is visible and matched") - test.compare(str(image_source),"{}{}".format(config.EXPECTED_IMAGE_LOCATION, image_text), "Image from " +title+ " screen is visible and matched") - if object.exists(names.o_next_button): + if not(str(image_source).endswith(".png")): + image_source = "{}{}".format(image_source,".png") + if not(str(image_text).endswith(".png")): + image_text = str(image_text) + ".png" + if image_text in image_list_from_location: + test.compare(str(image_source),"{}{}".format(config.EXPECTED_IMAGE_LOCATION, image_text), "Image from " +title+ " screen is visible and matched") + else: + test.fail(image_text+" is not present at "+config.EXPECTED_IMAGE_LOCATION) + if object.exists(names.o_next_button_ws): mouseClick(waitForObject(names.o_next_button)) - if object.exists(names.o_fail_button): + if object.exists(names.o_fail_button_ws): mouseClick(waitForObject(names.o_fail_button)) if object.exists(get_rightarrow_obj(rightarrow_obj_names[0])): mouseClick(waitForObject(get_rightarrow_obj(rightarrow_obj_names[0]))) test.endSection() return index +def verify_create_custom_treatment_parameter(): + """ + Method to set create custom treatment slider value based on slider buffer + """ + test.startSection("Method to set create custom treatment slider based on positive slider buffer") + test.compare(waitForObject(names.o_PreTreatmentCreate_Create_a_Custom_Treatment_Text).text, config.TREATMENT_TITLE, "Title text should be -> "+str(config.TREATMENT_TITLE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_PRESCRIPTION_Text).text, config.PRESCRIPTION_TITLE, "Title text should be -> "+str(config.PRESCRIPTION_TITLE)) + + #set custom values for parameters + test.startSection("verification of blood flow values") + test.compare(waitForObject(names.o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment).label, config.BLOOD_FLOW_RATE, "Parameter should be -> "+str(config.BLOOD_FLOW_RATE)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_bloodFlowRateSlider_Slider, 100, config.CREATE_TREATMENT_SLIDER_VALUES["blood_flow_rate"], config.BLOOD_FLOW_RATE) + test.endSection() + + test.startSection("verification of dialysate flow values") + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment).label, config.DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(config.DIALYSATE_FLOW_RATE)) + + test_custom_treatment_slider(names.o_PreTreatmentCreate_dialysateFlowRateSlider_Slider, 250, config.CREATE_TREATMENT_SLIDER_VALUES["dialysate_flow_rate"], config.DIALYSATE_FLOW_RATE) + test.endSection() + + test.startSection("verification of duration values") + test.compare(waitForObject(names.o_PreTreatmentCreate_duration_SliderCreateTreatment).label, config.DURATION, "Parameter should be -> "+str(config.DURATION)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_durationSlider_Slider, 60, config.CREATE_TREATMENT_SLIDER_VALUES["duration"], config.DURATION) + test.endSection() + + #scroll the screen to the title heparin bolus volume + parameter_object = set_parameter_type(text = config.HEPARIN_BOLUS_VOLUME) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of heparin dispensing rate values") + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinDispensingRate_SliderCreateTreatment).label, config.HEPARIN_DISPENSING_RATE, "Parameter should be -> "+str(config.HEPARIN_DISPENSING_RATE)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_heparinDispensingRateSlider_Slider, 0.8, config.CREATE_TREATMENT_SLIDER_VALUES["heparin_dispensing_rate"], config.HEPARIN_DISPENSING_RATE) + + test.endSection() + + test.startSection("verification of heparin bolus volume values") + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinBolusVolume_SliderCreateTreatment).label, config.HEPARIN_BOLUS_VOLUME, "Parameter should be -> "+str(config.HEPARIN_BOLUS_VOLUME)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_heparinBolusVolumeSlider_Slider, 1.3, config.CREATE_TREATMENT_SLIDER_VALUES["heparin_bolus_volume"], config.HEPARIN_BOLUS_VOLUME) + + test.endSection() + + #scroll the screen to the title acid concentrate type + parameter_object = set_parameter_type(text = config.HEPARIN_TYPE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of heparin stop time values") + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinStopTime_SliderCreateTreatment).label, config.HEPARIN_STOP_TIME, "Parameter should be -> "+str(config.HEPARIN_STOP_TIME)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_heparinStopTimeSlider_Slider, 230, config.CREATE_TREATMENT_SLIDER_VALUES["heparin_stop_time"], config.HEPARIN_STOP_TIME) + + test.endSection() + + test.startSection("verification of saline bolus values") + test.compare(waitForObject(names.o_PreTreatmentCreate_salineBolus_SliderCreateTreatment).label, config.SALINE_BOLUS_TITLE, "Parameter should be -> "+str(config.SALINE_BOLUS_TITLE)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_salineBolusSlider_Slider, 100, config.CREATE_TREATMENT_SLIDER_VALUES["saline_bolus"], config.SALINE_BOLUS_TITLE) + test.endSection() + + #scroll the screen to the title acid concentrate type + parameter_object = set_parameter_type(text = config.ACID_CONCENTRATE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of heparin type") + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinTypeRect_GridSelection).labels, config.HEPARIN_TYPE, "Parameter should be -> "+str(config.HEPARIN_TYPE)) + mouseClick(waitForObject(names.o_PreTreatmentCreate_heparinTypeRect0_TouchRect)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinTypeRect0_TouchRect).text.text, config.HEPARIN_TYPE, "heparin text should be :"+ str(config.HEPARIN_TYPE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_heparinTypeRect0_TouchRect).bgColor.name, config.TREATMENT_HIGHLIGHTED_COLOR, str(config.HEPARIN_TYPE)+" checkbox should be highlighted") + test.endSection() + + #scroll the screen to the title dialyste rectangle + parameter_object = set_parameter_type(text = config.DIALYZER_TYPE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of acid concentrate type") + test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateRect_GridSelection).title, config.ACID_CONCENTRATE_TITLE, "Parameter should be -> "+str(config.ACID_CONCENTRATE_TITLE)) + mouseClick(names.o_PreTreatmentCreate_acidConcentrateRect0_TouchRect) + test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateRect0_TouchRect).bgColor.name, config.TREATMENT_HIGHLIGHTED_COLOR, str(config.HEPARIN_TYPE)+" checkbox should be highlighted") + test.compare(waitForObject(names.o_PreTreatmentCreate_acidConcentrateRect0_TouchRect).text.text, config.ACID_CONCENTRATE[0], "Acid concentrate value should be :"+str(config.ACID_CONCENTRATE[0])) + test.endSection() + + #scroll the screen to the title dialyste rectangle + parameter_object = set_parameter_type(text = config.DIALYZER_TYPE_TITLE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of bicarbonate concentrate rectangle") + test.compare(waitForObject(names.o_PreTreatmentCreate_bicarbonateConcentrateRect_GridSelection).title, config.BICARBONATE_CONCENTRATE_TITLE, "Parameter should be -> "+str(config.BICARBONATE_CONCENTRATE_TITLE)) + mouseClick(names.o_PreTreatmentCreate_bicarbonateConcentrateRect0_TouchRect) + test.compare(waitForObject(names.o_PreTreatmentCreate_bicarbonateConcentrateRect0_TouchRect).bgColor.name, config.TREATMENT_HIGHLIGHTED_COLOR, str(config.HEPARIN_TYPE)+" checkbox should be highlighted") + test.compare(waitForObject(names.o_PreTreatmentCreate_bicarbonateConcentrateRect0_TouchRect).text.text, config.BICARBONATE_CONCENTRATE, "Bicarbonate concentrate value should be :"+str(config.ACID_CONCENTRATE[0])) + test.endSection() + + #scroll the screen to the title dialyste temperature value + parameter_object = set_parameter_type(text = config.DIALYSATE_TEMPERATURE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of dialysate rectangle") + test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeRect_GridSelection).title, config.DIALYZER_TYPE_TITLE, "Parameter should be -> "+str(config.DIALYZER_TYPE_TITLE)) + mouseClick(names.o_PreTreatmentCreate_dialyzerTypeRect0_TouchRect) + test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeRect0_TouchRect).bgColor.name, config.TREATMENT_HIGHLIGHTED_COLOR, str(config.HEPARIN_TYPE)+" checkbox should be highlighted") + test.compare(waitForObject(names.o_PreTreatmentCreate_dialyzerTypeRect0_TouchRect).text.text, config.DIALYZER_TYPE[0], "Dialyzer type value should be :"+str(config.DIALYZER_TYPE[0])) + test.endSection() + + #scroll the screen to the title blood pressure measurement interval + parameter_object = set_parameter_type(text = config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + test.startSection("verification of dialysate temperature values") + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateTemperature_SliderCreateTreatment).label, config.DIALYSATE_TEMPERATURE, "Parameter should be -> "+str(config.DIALYSATE_TEMPERATURE)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_dialysateTemperatureSlider_Slider, 35, config.CREATE_TREATMENT_SLIDER_VALUES["dialysate_temperature"], config.DIALYSATE_TEMPERATURE) + test.endSection() + + #scroll the screen to the title rinseback flow rate + parameter_object = set_parameter_type(text = config.RINSEBACK_FLOW_RATE) + utility.scroll_to_zone(parameter_object, names.o_treatment_create_flickable) + + set_arterial_low_and_high() + set_venous_low_and_high() + + test.startSection("verification of blood pressure measurement interval values") + test.compare(waitForObject(names.o_PreTreatmentCreate_bloodPressureMeasurementInterval_SliderCreateTreatment).label, config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL, "Parameter should be -> "+str(config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_bloodPressureMeasurementIntervalSlider_Slider, 25, config.CREATE_TREATMENT_SLIDER_VALUES["blood_pressure_measurement_interval"], config.BLOOD_PRESSURE_MEASUREMENT_INTERVAL) + + test.endSection() + + test.startSection("verification of rinseback flow rate values") + test.compare(waitForObject(names.o_PreTreatmentCreate_rinsebackFlowRate_SliderCreateTreatment).label, config.RINSEBACK_FLOW_RATE, "Parameter should be -> "+str(config.RINSEBACK_FLOW_RATE)) + test_custom_treatment_slider(names.o_PreTreatmentCreate_rinsebackFlowRateSlider_Slider, 50, config.CREATE_TREATMENT_SLIDER_VALUES["rinseback_flow_rate"], config.RINSEBACK_FLOW_RATE) + test.endSection() + + test.endSection() + +def verify_request_continue_mode(): + """ + Method to accept treatment response. + """ + treatment_status = hd_simulator.cmd_send_treatment_parameter_manual_validation_response([ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]) + test.compare(treatment_status, True, "custom treatment should be accepted") + +def set_arterial_low_and_high(): + """ + Method to set the arterial low and high limits using slider + """ + test.startSection("Set the arterial low and high limits using slider") + utility.set_arterial_ranges_max_val(art_high) + utility.set_arterial_ranges_min_val(art_low) + + test.endSection() + +def set_venous_low_and_high(): + """ + Method to set the venous low and high limits using slider + """ + test.startSection("Set the venous low and high limits using slider") + utility.set_venous_ranges_min_val(ven_low) + utility.set_venous_ranges_max_val(ven_high) + + test.endSection() + +def set_parameter_type(text): + """ + Method to set object property based on text + @param text : (string) treatment parameter text + """ + if isinstance(text, str): + names.o_operating_parameters["text"] = text + return names.o_operating_parameters + else: + test.log("Invalid \"text\": " +text+" for object.") + names.o_operating_parameters["text"] = None + +def test_custom_treatment_slider(slider_object, value, slider_parameter, parameter): + """ + Method to set slider handle based on custom values + @param slider_object : (dictionary) object of treatment parameters + @param vale : (int)value to be set on slider + @param slider_parameter : (list) consist combination of slider minimum value, slider buffer and width buffer + @param parameter : (str) parameter name + """ + minimum_slider_value = slider_parameter[0] + slider_buffer = slider_parameter[1] + width_buffer = slider_parameter[2] + slider_width = ((value - minimum_slider_value)/slider_buffer) * width_buffer + utils.waitForGUI(0.3) + mouseClick(findObject(slider_object), float(slider_width) , 3, Qt.LeftButton) + test.compare(waitForObjectExists(slider_object).value, value, str(parameter)+" slider value should set to"+str(value)) + +# def set_venous_high_and_low_limits_using_slider(): +# """ +# Method to set the venous low and high limits using slider +# """ +# test.startSection("Set the venous low and high limits using slider") +# utils.waitForGUI(1) +# for venous_value in range(config.VENOUS_VALUE_50, config.VENOUS_VALUE_600, config.POSITIVE_BUFFER): +# utility.set_venous_ranges_max_val(venous_value) +# for venous_value in range(config.VENOUS_VALUE_20, config.VENOUS_VALUE_570, config.POSITIVE_BUFFER): +# utility.set_venous_ranges_min_val(venous_value) +# +# test.endSection() + + +# def set_arterial_high_and_low_limits_using_slider(): +# """ +# Method to set the arterial low and high limits using slider +# """ +# test.startSection("Set the arterial low and high limits using slider") +# utils.waitForGUI(1) +# utility.set_arterial_ranges_min_val(config.ARTERIAL_VALUE_NEGATIVE_300) +# for arterial_value in range(config.ARTERIAL_VALUE_0, config.ARTERIAL_VALUE_NEGATIVE_270, config.NEGATIVE_BUFFER): +# utility.set_arterial_ranges_max_val(arterial_value) +# +# test.endSection() + +# def drag_and_drop_ultrafiltration_slider(slider_value = 0, maximum_ultrafiltration = 0): +# """ +# Tests to verify ultrafiltration slider range +# @param slider_value: (int) value of the slider to set. +# """ +# slider_buffer = (config.UF_MAXIMUM_SLIDER_WIDTH/(maximum_ultrafiltration/100)) * slider_value +# slider_width = slider_buffer + config.UF_MINIMUM_SLIDER_WIDTH +# mouseClick(waitForObject(names.o_PreTreatmentUltrafiltration_volumeSlider_Slider), slider_width , 3, Qt.LeftButton) +# +# utils.waitForGUI(0.1) + + def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) - read_data_from_conf_file() + read_data_from_conf_file() hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value) test.startSection("Navigating to Pre-Treatment Sample screen") @@ -128,7 +359,7 @@ index = verify_instruction_and_image("Water Sample Result",index = index) index = verify_instruction_and_image("Water Sample Result Failed",index = index) test.endSection() - + test.startSection("Navigating to Pre-Treatment Consumables screen") hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_WAIT_FOR_DISINFECT.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, @@ -138,7 +369,17 @@ rightarrow_obj_names.pop(0) test.endSection() + test.startSection("Method to navigate to create custom treatment to set all parameters ") + hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_TPAR.value , sub_mode = HDOpSubModes.SUBMODE_START.value) + mouseClick(waitForObject(names.o_input_patient_id)) + type(waitForObject(names.o_input_patient_id), "abcd") + mouseClick(waitForObject(names.o_confirm_button)) + verify_create_custom_treatment_parameter() +# verify_request_continue_mode() + test.endSection() + test.startSection("Navigating to Pre-Treatment Disposables screen") + hd_simulator.cmd_send_hd_operation_mode(op_mode = 5 , sub_mode = 0) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_DG_HEAT_DISINFECT_IN_PROGRESS.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value, consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_INSTALL_STATE.value, @@ -147,7 +388,7 @@ dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, prime_state=PreTreatmentPrimeStates.HD_PRIME_START_STATE.value, recirculate_state=PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, - patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) + patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) text_obj_names.pop(0) index = verify_instruction_and_image("Cartridge Installation",index = index) text_obj_names.pop(0) @@ -156,10 +397,15 @@ mouseClick(waitForObjectExists(names.o_next_button_cartridge_installation)) index = verify_instruction_and_image("Cartridge Connection",index = index) text_obj_names.pop(0) + rightarrow_obj_names.pop(0) test.log("Clicking on next button in Cartridge Connection instruction page") - mouseClick(waitForObjectExists(names.o_next_button_cartridge_connection)) - index = verify_instruction_and_image("Saline Bag",index = 18) + mouseClick(waitForObjectExists(names.o_next_button_cartridge_connection)) + index = verify_instruction_and_image("Heparin Syringe",index = index) text_obj_names.pop(0) + test.log("Clicking on next button in Heparin Syringe instruction page") + mouseClick(waitForObjectExists(names.o_next_button_heparinsyringe)) + index = verify_instruction_and_image("Saline Bag",index = index) + text_obj_names.pop(0) rightarrow_obj_names.pop(0) test.endSection() @@ -175,11 +421,66 @@ test.startSection("Navigating to Pre-Treatment Patient Connection screen") index = verify_instruction_and_image("Patient Connection",index = index) test.endSection() - + test.startSection("Navigating to Pre-Treatment Start screen") hd_simulator.cmd_send_pre_treatment_patient_connection_confirm_response(accepted=True, reason=0) index = verify_instruction_and_image("Start Treatment",index = index) + text_obj_names.pop(0) + rightarrow_obj_names.pop(0) test.endSection() + + test.startSection("Navigating to End Treatment Rinseback Setup screen") + hd_simulator.cmd_set_treatment_states_data(sub_mode = 4, 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) + index = verify_instruction_and_image("Rinseback Setup",index = index) + text_obj_names.pop(0) + test.endSection() + + test.startSection("Navigating to End Treatment Rinseback Complete screen") + hd_simulator.cmd_set_treatment_states_data(sub_mode = 4, uf_state = 0, saline_state = 0, heparin_state = 0, + rinseback_state = 3, recirculate_state = 0, blood_prime_state = 0,treatment_end_state = 0, treatment_stop_state = 0, dialysis_state = 0) + index = verify_instruction_and_image("Rinseback Complete",index = index) + text_obj_names.pop(0) + rightarrow_obj_names.pop(0) + test.endSection() + + test.startSection("Navigating to Post Treatment Disconnection screen") + hd_simulator.cmd_send_hd_operation_mode(op_mode = 7, sub_mode = 0) + index = verify_instruction_and_image("Patient Disconnection",index = index) + mouseClick(waitForObject(names.o_confirm_button_patient_disconnection)) + mouseClick(waitForObject(names.o_next_button_review)) + text_obj_names.pop(0) + rightarrow_obj_names.pop(0) + test.endSection() + + test.startSection("Navigating to Post Treatment Disposables screen") + index = verify_instruction_and_image("Disposables Removal",index = index) + text_obj_names.pop(0) + rightarrow_obj_names.pop(0) + test.endSection() + + test.startSection("Navigating to End Treatment Recirculate screen") + hd_simulator.cmd_set_treatment_states_data(sub_mode = 5, 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) + index = verify_instruction_and_image("Recirculate",index = index) + text_obj_names.pop(0) + rightarrow_obj_names.pop(0) + test.endSection() + + test.startSection("Navigating to Standby Disinfection screen") + hd_simulator.cmd_send_hd_operation_mode(op_mode = 3, sub_mode = 2) + index = verify_instruction_and_image("Disinfection",index = index) + test.endSection() - utils.tstDone() - \ No newline at end of file + #TODO :- Chemical Disinfect + + utils.tstDone() + + + + + + + + + \ No newline at end of file