Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r575215296a0233033f2b9a3f684230e1651078bd -rdc93cd0aeabdc36b82101be86224cc31ce57b626 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 575215296a0233033f2b9a3f684230e1651078bd) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision dc93cd0aeabdc36b82101be86224cc31ce57b626) @@ -1104,3 +1104,29 @@ squish.mouseClick(key_val) utils.waitForGUI(0.1) test.endSection() + +def scroll_to_value_on_pop_up(value=None, container=None): + """ + scroll to the to the value if object is hidden + @param value - (obj) value object + @param container - (obj) Container of the value + @return boolean true and false + """ + counter = 0 + while counter <= 100: + try: + counter += 1 + squish.findObject(value) + squish.snooze(0.5) + if check_if_object_is_within_the_container(obj=value, container=container): + return True + else: + raise RuntimeError + except RuntimeError: + ScreenObj = squish.waitForObject(container) + screenHeight = pyInt(ScreenObj.height) + screenWidth = pyInt(ScreenObj.width) + squish.mouseWheel(ScreenObj, screenWidth//2, screenHeight//2, 0, -50, squish.Qt.NoModifier) + raise LookupError("value object is not in view to the user after trying 100 times") + +