Index: shared/scripts/configuration/config.py =================================================================== diff -u -r6621e3fa9dada0fbebdce1abf10dbfd5a912011a -reb6b44f678d46f2b0fab047200a020e738d80798 --- shared/scripts/configuration/config.py (.../config.py) (revision 6621e3fa9dada0fbebdce1abf10dbfd5a912011a) +++ shared/scripts/configuration/config.py (.../config.py) (revision eb6b44f678d46f2b0fab047200a020e738d80798) @@ -30,7 +30,7 @@ #patient id CHARACTER_PATIENT_ID = ["qwerty","sampleid","abcdefghijklmnop","patientid", "username"] ALPHANUMERIC_PATIENT_ID = ["sA@MpLE#123", "A@BH&321","5432@qwerty"] -KEYBOARD_SWITCH = ["ABC", "&123"] +KEYBOARD_SWITCH = ["ABC", "A&123"] Index: tst_patient_id/test.py =================================================================== diff -u -rec3e0212cf515ac50e43206f3446ee807e3bd55b -reb6b44f678d46f2b0fab047200a020e738d80798 --- tst_patient_id/test.py (.../test.py) (revision ec3e0212cf515ac50e43206f3446ee807e3bd55b) +++ tst_patient_id/test.py (.../test.py) (revision eb6b44f678d46f2b0fab047200a020e738d80798) @@ -16,12 +16,12 @@ # This test is intended to be used to verify patient id in application. . import names + +from configuration import utility, config from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator -from configuration import utility, config - def keyboard_object_map_helper(text): """ Method for setting custom object property's for keyboard keys @@ -74,7 +74,7 @@ object_status = object.exists(keyboard_value) if object_status is True: return text - object_status = object.exists(names.o_keyboard_switch2) + object_status = object.exists(names.o_keyboard_switch_2) if object_status is True: keyboard_value = waitForObject(names.o_keyboard_switch_2) mouseClick(keyboard_value) @@ -84,7 +84,18 @@ if object_status is True: return text +def verify_patient_id(expected_patient_id): + expected_id = "" + for letter in expected_patient_id: + print(letter) + if letter.isalpha() or letter.isnumeric(): + expected_id += letter + else: + pass + patient_id_input = waitForObject(names.o_input_patient_id) + test.compare(patient_id_input.text, expected_id, "Patient id should be ->" + expected_id) + def user_input_clear_option(): """ Tests to clear retained patient id @@ -116,8 +127,9 @@ mouseClick(waitForObject(keyboard_value)) utils.waitForGUI(.2) - test.compare(expected_value, (patient_id_input.text)) - test.log("Patient id should be -> "+ expected_value) + verify_patient_id(expected_value) +# test.compare(expected_value, (patient_id_input.text)) +# test.log("Patient id should be -> "+ expected_value) verify_confirm_button_based_on_patient_id(expected_value) mouseClick(waitForObject(names.o_confirm_button)) @@ -137,8 +149,9 @@ patient_id_input = waitForObject(names.o_input_patient_id) mouseClick(waitForObject(patient_id_input)) type(waitForObject(names.o_input_patient_id), expected_value) - test.compare(expected_value, (patient_id_input.text)) - test.log("Patient id should be ->" + expected_value) + verify_patient_id(expected_value) +# test.compare(expected_value, (patient_id_input.text)) +# test.log("Patient id should be ->" + expected_value) verify_confirm_button_based_on_patient_id(expected_value) mouseClick(waitForObject(names.o_confirm_button)) @@ -194,10 +207,10 @@ def main(): utils.tstStart(__file__) - startApplication(config.APPLICATION_NAME) - utils.waitForGUI(2) + startApplication(config.AUT_NAME) + utils.waitForGUI(1) - hd = HDSimulator() + hd = HDSimulator() hd.cmd_send_power_on_self_test_version_request() hd.cmd_send_hd_operation_mode(4, 0)