diff --git a/tools/autotest.py b/tools/autotest.py index 7087f178..f61559f7 100755 --- a/tools/autotest.py +++ b/tools/autotest.py @@ -20,6 +20,7 @@ tf = subprocess.Popen(['out/debug/tildefriends', 'run', '-d', 'out/selenium.sqli def exists_in_shadow_root(shadow_root, by, value): return lambda driver: shadow_root.find_element(by, value) +success = False try: options = webdriver.FirefoxOptions() #options.add_argument('--headless') @@ -159,9 +160,14 @@ try: driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'loginButton').click() wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))) - print('SUCCESS.') + success = True finally: driver.close() driver.quit() tf.terminate() + +if success: + print('\033[92mTEST SUCCEEDED.\033[0m') +else: + print('\033[91mTEST FAILED.\033[0m')