mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Black tests
This commit is contained in:
parent
4de05c4f69
commit
3c91818e66
@ -25,13 +25,14 @@ def docker_compose_command() -> str:
|
|||||||
|
|
||||||
def is_responsive(port):
|
def is_responsive(port):
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
result = sock.connect_ex(('127.0.0.1',port))
|
result = sock.connect_ex(("127.0.0.1", port))
|
||||||
if result == 0:
|
if result == 0:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
sock.close()
|
sock.close()
|
||||||
except Exception:
|
except Exception:
|
||||||
return False
|
return False
|
||||||
@ -50,7 +51,7 @@ def selenium_drivers(docker_ip, docker_services):
|
|||||||
|
|
||||||
options = webdriver.FirefoxOptions()
|
options = webdriver.FirefoxOptions()
|
||||||
drivers[browser] = webdriver.Remote(
|
drivers[browser] = webdriver.Remote(
|
||||||
command_executor=f'http://localhost:4444/wd/hub',
|
command_executor=f"http://localhost:4444/wd/hub",
|
||||||
options=options,
|
options=options,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -79,9 +79,7 @@ def test_multi_page(selenium_drivers):
|
|||||||
|
|
||||||
selenium.switch_to.frame("zundler-iframe")
|
selenium.switch_to.frame("zundler-iframe")
|
||||||
|
|
||||||
third_link = selenium.find_element(
|
third_link = selenium.find_element(By.CSS_SELECTOR, "#second a.internal")
|
||||||
By.CSS_SELECTOR, "#second a.internal"
|
|
||||||
)
|
|
||||||
|
|
||||||
third_link.click()
|
third_link.click()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user