Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rbb798f36abcf369278c91d168e16c35003d0b55a -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b --- shared/scripts/configuration/utility.py (.../utility.py) (revision bb798f36abcf369278c91d168e16c35003d0b55a) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) @@ -17,10 +17,7 @@ import test import squish from configuration import config - from builtins import int as pyInt -#from builtins import str as pyStr -#from builtins import float as pyFloat def start_application(app_name): @@ -38,50 +35,35 @@ try: counter += 1 test.log("Starting {}".format(app_name)) - squish.startApplication(config.Application_name) + squish.startApplication(app_name) if counter == 1: - test.log(f"Application launched at the {counter}'st try.") + test.log("Application launched at the "+str(counter)+" st try.") elif counter == 2: - test.log(f"Application launched at the {counter}'nd try.") + test.log("Application launched at the "+str(counter)+" nd try.") elif counter == 3: - test.log(f"Application launched at the {counter}'rd try.") + test.log("Application launched at the "+str(counter)+" rd try.") else: - test.log(f"Application launched at the {counter}'th try.") - squish.snooze(20) + test.log("Application launched at the "+str(counter)+" th try.") break except RuntimeError: if counter == 1: - test.log(f"Application failed to launch after {counter} try - Please refer logs") + test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") elif counter == 20: - test.log(f"Exiting after {counter} tries..") + test.log("Exiting after "+str(counter)+ " tries..") sys.exit(1) else: - test.log(f"Application failed to launch after {counter} tries - Please refer logs") + test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") except: logErrorDetails("Failed to start the application") sys.exit(1) - -def color_verification(exp_val = "Red", act_val = "#c53b33"): - """ - Function to verify item color verification - Argument: - exp_val - Expected required value - act_val - Color displayed on UI - Return: - handle the application for log - """ - test.compare(config.COLOR_CODES[color_name],(act_val.color[name])) - - + def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container - Arguments: - obj - child UI object - container - container UI object - Return: - bool + @param obj - child UI object + @param container - container UI object + @return boolean true/false """ container = squish.findObject(container) containerPos = container.mapToGlobal(squish.QPoint(0, 0)) @@ -100,15 +82,12 @@ return False - def scroll_to_zone(zone=None, screen_object=None): """ scroll to the numeric if object is hidden - Arguments: - zone - UI object - screen_object - UI object (UI Home screen = waveforms + numerics) - Return: - bool + @param zone - UI object + @param screen_object - UI object (UI Home screen = waveforms + numerics) + @return boolean true/false """ counter = 0 while counter <= 100: