Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -r0917bcb39a7346b452e56e961d19c928a71ef608 -rf110ca9e178cb56b02ed6329dc7c98e579998fba --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 0917bcb39a7346b452e56e961d19c928a71ef608) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision f110ca9e178cb56b02ed6329dc7c98e579998fba) @@ -40,7 +40,7 @@ names.o_text_object["text"] = txt return names.o_text_object -def set_property_text(text,obj): +def set_Object_Text(text,obj): """ Method to set object property based on text @param text : (string) treatment parameter text @@ -108,11 +108,14 @@ test.log(f"✅ Target value reached: {current_value}") def select_different_dropdown(object,type,whichTypeIndex): + """ + Method selects the option based on index from the dropdown + """ type_combo_box = get_object_from_names(object, error_message="Combo box object is missing") if type_combo_box is not None: squish.mouseClick(squish.waitForObjectExists(object)) - type_option = get_object_from_names(set_property_text(obj = names.o_option_combo_box,text = type[whichTypeIndex]),error_message=f"Option {type[whichTypeIndex]} object is missing",timeout_ms=5000) + type_option = get_object_from_names(set_Object_Text(obj = names.o_option_combo_box,text = type[whichTypeIndex]),error_message=f"Option {type[whichTypeIndex]} object is missing",timeout_ms=5000) if type_option is not None: squish.mouseClick(type_option) return True @@ -156,10 +159,21 @@ test.fail(f"{parameter}: LookupError - {e}") def click_left_until_off(object_name): + """ + Method to perform the left arrow untill the value + becomes off + """ parent_obj = waitForObject(object_name) left_arrow = findObjectById(parent_obj, "_leftArrow") # Loop until the value becomes "off" while findObject(object_name).value != 0.0: squish.mouseClick(waitForObject(left_arrow)) - utils.waitForGUI(0.2) # Small delay to allow UI to update \ No newline at end of file + utils.waitForGUI(0.2) # Small delay to allow UI to update + +def button_text_obj(text): + """ + To get the text from Validate and confirm button + """ + names.o_PreTreatmentCreate_Text["text"] = text + return names.o_PreTreatmentCreate_Text