Get geckodriver.log from 'tildefriends test -t auto' out of the root.

This commit is contained in:
Cory McWilliams 2024-02-21 20:06:25 -05:00
parent 825191c08f
commit c01e00d77d
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,5 +5,4 @@ db.*
deps/ios_toolchain/
deps/openssl/
dist/
geckodriver.log
out

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait
@ -16,8 +17,9 @@ def exists_in_shadow_root(shadow_root, by, value):
success = False
try:
options = webdriver.FirefoxOptions()
service = Service(log_output = 'out/geckodriver.log')
#options.add_argument('--headless')
driver = webdriver.Firefox(options = options)
driver = webdriver.Firefox(options = options, service = service)
wait = WebDriverWait(driver, 10)
driver.get('http://localhost:8888')
driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root.find_element(By.LINK_TEXT, 'login').click()