Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r8242123c781d022e2c7d9e1d36436ddfde01ffe4 -r30b3e1a07f940f488bc749e2d39438ce2a3f5168 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 8242123c781d022e2c7d9e1d36436ddfde01ffe4) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 30b3e1a07f940f488bc749e2d39438ce2a3f5168) @@ -18,46 +18,7 @@ import squish from configuration import config from builtins import int as pyInt - -def start_application(app_name): - """ - Function to start application and verify application status [running] - If application does not start or running status is false, test stops - Argument: - @param app_name : (str) - Name of the application - @param app_executable : (str) - Actual application - @return: handle for the application if the application is in running state, - or error (exist the application) - """ - counter = 0 - while True: - try: - counter += 1 - test.log("Starting {}".format(app_name)) - squish.startApplication(app_name) - if counter == 1: - test.log("Application launched at the "+str(counter)+" st try.") - elif counter == 2: - test.log("Application launched at the "+str(counter)+" nd try.") - elif counter == 3: - test.log("Application launched at the "+str(counter)+" rd try.") - else: - test.log("Application launched at the "+str(counter)+" th try.") - break - except RuntimeError: - if counter == 1: - test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") - elif counter == 20: - test.log("Exiting after "+str(counter)+ " tries..") - sys.exit(1) - else: - test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") - except: - logErrorDetails("Failed to start the application") - sys.exit(1) - - def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container @@ -81,11 +42,6 @@ return False - -def rejection_msg(text): - names.rejection_msg["text"] = text - return names.rejection_msg - def scroll_to_zone(zone=None, screen_object=None): """ scroll to the numeric if object is hidden @@ -112,3 +68,13 @@ raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") + + +def rejection_msg(text): + names.rejection_msg["text"] = text + return names.rejection_msg + + +def expected_heparin_value(val): + names.o_heparin_value["text"] = val + return names.o_heparin_value