Index: suite_leahi/shared/scripts/configuration/navigation.py =================================================================== diff -u -rb0ef2e099ea10d4ec265b06bd6c0325630f69a58 -r279e768763ca90eadc690f1c922889f8969e5e6f --- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision b0ef2e099ea10d4ec265b06bd6c0325630f69a58) +++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 279e768763ca90eadc690f1c922889f8969e5e6f) @@ -69,40 +69,35 @@ """ test.startSection("Method to navigation in the pretreatment page ") + stepcount = squish.waitForObjectExists(names.o_preTreatmentStack_repeater_Repeater) + Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + squish.mouseClick(squish.waitForObject(Nextbutton)) + autoLoadbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text ="Auto Load") + squish.mouseClick(squish.waitForObject(autoLoadbutton)) + td_simulator.td_blood_set_auto_load_response(vRejectionReason = 0) stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) values = utility.findAllObjectsById(stepId, "_text") - for index, input_field in enumerate(values[1:]): - test.log(str(index)); - test.log(str(input_field.text)) - if str(input_field.text) == vStep_name: - test.log("Reached the target step") - break - else: - Nextbutton = utility.setObjectText(obj=names.o_preTreatmentStack_Text, text=config.NEXT) - squish.mouseClick(Nextbutton) - test.endSection() + if stepcount.count == 9: + for input_field in values[3:]: + test.log(str(input_field.text)) + if str(input_field.text) == "Water Sample": + squish.mouseClick(squish.waitForObject(names.o_PreTreatmentSampleStack_button_TouchRect)) + if str(input_field.text) == vStep_name: + break + else: + Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + squish.mouseClick(Nextbutton) + else: + for input_field in values[3:]: + test.log(str(input_field.text)) + if str(input_field.text) == "Water Sample": + squish.mouseClick(waitForObject(names.o_PreTreatmentSampleStack_button_TouchRect)) + + if str(input_field.text) == vStep_name: + break + else: + Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) + squish.mouseClick(Nextbutton) -def navigation_pageIndicator_step(vStep_name): - """ - Navigate to the specified page using the step indicator component. - - This method selects the given step from the page step indicator - Args: - vStep_name (str): The name of the step to navigate to as displayed - in the step indicator. - - """ - test.startSection("Method to navigation in the pretreatment page ") - stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator) - values = utility.findAllObjectsById(stepId, "_text") - for index, input_field in enumerate(values[2:]): - test.log(str(index)); - test.log(str(input_field.text)) - if str(input_field.text) == vStep_name: - test.log("Reached the target step") - break - else: - Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) - squish.mouseClick(Nextbutton) test.endSection() \ No newline at end of file