Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r8fe5a9ba850a3e98ba082d6bbe110cef84b072fe -rab639c7acff8c8444f869f2ac898a1cd241efa87 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 8fe5a9ba850a3e98ba082d6bbe110cef84b072fe) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision ab639c7acff8c8444f869f2ac898a1cd241efa87) @@ -46,32 +46,38 @@ return False -def scroll_to_zone(zone=None, screen_object=None): +def scroll_to_zone(zone=None, screen_object=None, direction = None): """ - scroll to the numeric if object is hidden - @param zone - UI object - @param screen_object - UI object (UI Home screen = waveforms + numerics) - @return boolean true/false + scroll to the UI, if object is hidden + @param zone - object to be find out. + @param screen_object - object of the screen. + @return boolean """ counter = 0 while counter <= 100: try: counter += 1 + squish.snooze(0.5) squish.findObject(zone) squish.snooze(0.5) if check_if_object_is_within_the_container(obj=zone, container=screen_object): return True else: raise RuntimeError except RuntimeError: - ScreenObj = squish.waitForObject(screen_object) + ScreenObj = squish.findObject(screen_object) screenHeight = pyInt(ScreenObj.height) screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth-1000,screenHeight-10, 0, -50, squish.Qt.NoModifier) - - raise LookupError("zone object is not in view to the user after trying 100 times") + if direction is None: + squish.mouseWheel(ScreenObj, (screenWidth-100), + 107, 0, -(screenHeight-460), squish.Qt.NoModifier) + else: + squish.mouseWheel(ScreenObj, (screenWidth-100), + -(screenHeight-700), 0, 50, squish.Qt.NoModifier) + + raise LookupError("zone object is not in view to the user after " + \ + "trying 100 times") - def keyboard_input(key_value): names.o_keyboard_object["text"] = key_value return names.o_keyboard_object