Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r025314f84b7e369d579a9e9a689ad065f6772414 -r302953f40b6bbfaf9a0688a0fda72e022258e10e --- shared/scripts/configuration/utility.py (.../utility.py) (revision 025314f84b7e369d579a9e9a689ad065f6772414) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 302953f40b6bbfaf9a0688a0fda72e022258e10e) @@ -143,15 +143,25 @@ ScreenObj = squish.findObject(screen_object) screenHeight = pyInt(ScreenObj.height) screenWidth = pyInt(ScreenObj.width) - 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, 200, squish.Qt.NoModifier) raise LookupError("zone object is not in view to the user after trying 100 times") - +def enter_keypad_value(entry): + """ + Method to enter user desired + value using keypad + @param entry: (int) User expected value + """ + test.startSection("Entering {}".format(entry)) + entry = pyStr(entry) + for value in entry: + squish.mouseClick(squish.waitForObject(keypad_input(value))) + test.endSection() + def erase_entered_value(input_field): """ Method to erase the entered value @@ -386,7 +396,6 @@ "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) test.endSection() - def scroll_to_value_on_pop_up(value=None, container=None): """ scroll to the to the value if object is hidden @@ -948,17 +957,6 @@ test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) test.compare(bullet_border_color,config.INCOMPLETE_COLOR, " the bullet border color must be " + str(config.INCOMPLETE_COLOR)) test.endSection() - - -def enter_keypad_value_bphr(entry): - """ - Method to enter user desired - value using keypad - @param entry: (str) User expected value - """ - test.startSection("Entering {}".format(entry)) - entry = pyStr(entry) #type casted into string format - for value in entry: - squish.mouseClick(squish.waitForObject(keypad_input(value))) - test.endSection() - + + + \ No newline at end of file Index: tst_main_treatment_vitals/test.py =================================================================== diff -u -rba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438 -r302953f40b6bbfaf9a0688a0fda72e022258e10e --- tst_main_treatment_vitals/test.py (.../test.py) (revision ba1474dc5c7f4efa5eaca5a840ab8d51a1c5c438) +++ tst_main_treatment_vitals/test.py (.../test.py) (revision 302953f40b6bbfaf9a0688a0fda72e022258e10e) @@ -536,7 +536,7 @@ test.startSection("Verify the entered systolic, diastolic and heart rate value updated in main-treatement screen") mouseClick(waitForObject(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry)) utility.erase_entered_value(names.o_PreTreatmentBase_input_TextInput_2) - utility.enter_keypad_value_bphr(sys_val) + utility.enter_keypad_value(sys_val) test.verify(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).enabled, "systolic combo box should be enabled.") test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureSystolic_TextEntry).text, str(sys_val), "systolic value should be : "+str(sys_val)) @@ -545,7 +545,7 @@ mouseClick(waitForObject(names.o_PreTreatmentBase_input_TextInput_3)) utility.erase_entered_value(names.o_PreTreatmentBase_input_TextInput_3) - utility.enter_keypad_value_bphr(dia_val) + utility.enter_keypad_value(dia_val) test.verify(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureDiastolic_TextEntry).enabled, "diastolic value should be enabled.") test.compare(waitForObjectExists(names.o_PreTreatmentBase_bloodPressureDiastolic_TextEntry).text, str(dia_val), "diastolic value should be : "+str(dia_val)) @@ -554,7 +554,7 @@ mouseClick(waitForObject(names.o_PreTreatmentBase_input_TextInput_4)) utility.erase_entered_value(names.o_PreTreatmentBase_input_TextInput_4) - utility.enter_keypad_value_bphr(heart_rate) + utility.enter_keypad_value(heart_rate) test.verify(waitForObjectExists(names.o_PreTreatmentBase_heartRate_TextEntry).enabled, "diastolic value should be enabled.") test.compare(waitForObjectExists(names.o_PreTreatmentBase_heartRate_TextEntry).text, str(heart_rate), "diastolic value should be : "+str(dia_val))