Index: suite_leahi/shared/scripts/configuration/navigation.py =================================================================== diff -u -r4de5be406334f420c6a7fe8cc6347d73f45ba74a -r8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff --- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 4de5be406334f420c6a7fe8cc6347d73f45ba74a) +++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff) @@ -1,6 +1,6 @@ import names -import squish import test +import squish from leahi_dialin.ui.td_messaging import TD_Messaging from leahi_dialin.common.td_defs import TDOpModes, TDStandbyStates from configuration import config, utility @@ -30,4 +30,29 @@ "{} screen is displayed and Comparison of Device Settings Screen Title text".format( config.DEVICE_SETTINGS_SCREEN_TITLE_TEXT ), - ) \ No newline at end of file + ) + +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