Index: tst_settings_date_and_time/test.py =================================================================== diff -u -re722325d02c51abd72e9215a56f4623f3b1334c5 -r6f9555a5c09047dd070e7d6c6820e212f2199a55 --- tst_settings_date_and_time/test.py (.../test.py) (revision e722325d02c51abd72e9215a56f4623f3b1334c5) +++ tst_settings_date_and_time/test.py (.../test.py) (revision 6f9555a5c09047dd070e7d6c6820e212f2199a55) @@ -17,8 +17,8 @@ from dialin.ui.hd_simulator import HDSimulator from dialin.common.hd_defs import HDOpModes from dialin.ui import utils +from configuration.config import SERVICE_CONF_LOCATION - hd_simulator = HDSimulator() SERVICES_TITLE_TEXT = "Please Enter The Service Password" @@ -80,11 +80,19 @@ utils.waitForGUI(0.3) mouseClick(waitForObjectExists(names.o_switch_keyboard_to_keypad)) mouseClick(waitForObjectExists(names.o_password_text_field)) - utility.enter_keyboard_numeric_value(entry=str(config.PASSWORD)) + with open(SERVICE_CONF_LOCATION, "r") as file: + lines = file.readlines() + for index, line in enumerate(lines): + if "Service Password" in line: + services_password = lines[index+1][:-1] + break + else: + continue + utility.enter_keyboard_numeric_value(entry=str(services_password)) mouseClick(waitForObjectExists(names.o_show_password)) test.log("Verifying the entered password") password = str((waitForObjectExists(names.o_password_text_field)).text) - test.compare(password, str(config.PASSWORD), "Entered password should be {}".format(config.PASSWORD)) + test.compare(password, str(services_password), "Entered password should be {}".format(str(services_password))) mouseClick(waitForObjectExists(services_screen_text_obj(config.CONFIRM_TEXT))) test.endSection()