Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r59ae5d4df386b059d64f32bbceaf1b96202d7585 -r4521c70c724ec4c96276631f2d2c22bc9a512f28 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 59ae5d4df386b059d64f32bbceaf1b96202d7585) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 4521c70c724ec4c96276631f2d2c22bc9a512f28) @@ -145,10 +145,10 @@ def scroll_to_zone(zone=None, screen_object=None, direction = None): """ - scroll to the UI, if object is hidden - @param zone - object to be find out. - @param screen_object - object of the screen. - @return boolean + 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: @@ -274,4 +274,32 @@ if slider_value <= pyFloat(slider_object.maxValue): slider_value = slider_value - 30 counter = counter + 1 + + +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")