Print a colored result at the end of autotest.py.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4758 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
f4979c841a
commit
59ac0b5f20
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user