Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r047ceb6dfaaa7fafd5580d141dbf32b68c0c4147 -rd3be2d44b89d5ccb33c7e2d456acdce9d78d8d61 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 047ceb6dfaaa7fafd5580d141dbf32b68c0c4147) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision d3be2d44b89d5ccb33c7e2d456acdce9d78d8d61) @@ -38,6 +38,31 @@ def color_verification(exp_val = "Red", act_val = "#c53b33"): test.compare(config.COLOR_CODES[color_name],(act_val.color[name])) +def scroll_to_zone(zone=None, screen_object=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 + """ + counter = 0 + while counter <= 100: + try: + counter += 1 + 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) + 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") + def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container @@ -60,7 +85,7 @@ return True return False - + def scroll_to_zone(zone=None, screen_object=None, direction = None): """ scroll to the UI, if object is hidden @@ -1359,8 +1384,6 @@ content_record.append(ack_bak_status) return content_record -======= raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") - ->>>>>>> settings +