Index: suite_leahi/shared/scripts/configuration/navigation.py =================================================================== diff -u -r8a2c16a0af26e03c9bcb54dcb3c6b88907ffddab -r0130028593cbcfc6ec7e97af4b4c48f26b96898b --- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 8a2c16a0af26e03c9bcb54dcb3c6b88907ffddab) +++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 0130028593cbcfc6ec7e97af4b4c48f26b96898b) @@ -39,6 +39,9 @@ def get_ini_value(conf_path: str , section: str, key: str): + """ + Method to get the advanced option from the System.conf file + """ path = Path(conf_path) if not path.exists(): raise FileNotFoundError(f"Not found: {path}") @@ -51,10 +54,6 @@ if not parser.has_option(section, key): raise KeyError(f"Key '{key}' not found in section [{section}]") return parser.get(section, key) - -# Example: -# value = get_ini_value("settings.conf", "database", "host") -# print(value) def navigation_pageIndicator_step(vStep_name): """ @@ -67,16 +66,15 @@ """ 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") value = get_ini_value("/home/denali/Public/luis/config/configurations/Settings/System.conf", section ="AdvancedMode", key ="AdvancedMode") - if stepcount.count == 9: + if value == "0": + 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 input_field in values[3:]: test.log(str(input_field.text)) if str(input_field.text) == "Water Sample": @@ -87,6 +85,11 @@ Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT) squish.mouseClick(Nextbutton) else: + 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 input_field in values[3:]: test.log(str(input_field.text)) if str(input_field.text) == "Water Sample":