Skip to content

Commit a63148a

Browse files
fixed merge conflicts and cleaned up
1 parent 2e6d407 commit a63148a

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

py/conftest.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from test.selenium.webdriver.common.network import get_lan_ip
2828
from test.selenium.webdriver.common.webserver import SimpleWebServer
2929

30-
3130
drivers = (
3231
"chrome",
3332
"edge",
@@ -420,43 +419,6 @@ def server(request):
420419
server.start()
421420
yield server
422421
server.stop()
423-
_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
424-
url = f"http://{_host}:{_port}/status"
425-
try:
426-
_socket.connect((_host, _port))
427-
print(
428-
"The remote driver server is already running or something else"
429-
"is using port {}, continuing...".format(_port)
430-
)
431-
except Exception:
432-
remote_env = os.environ.copy()
433-
if platform.system() == "Linux":
434-
# There are issues with window size/position when running Firefox
435-
# under Wayland, so we use XWayland instead.
436-
remote_env["MOZ_ENABLE_WAYLAND"] = "0"
437-
print("Starting the Selenium server")
438-
process = subprocess.Popen(
439-
[
440-
"java",
441-
"-jar",
442-
_path,
443-
"standalone",
444-
"--port",
445-
"4444",
446-
"--selenium-manager",
447-
"true",
448-
"--enable-managed-downloads",
449-
"true",
450-
],
451-
env=remote_env,
452-
)
453-
print(f"Selenium server running as process: {process.pid}")
454-
assert wait_for_server(url, 10), f"Timed out waiting for Selenium server at {url}"
455-
print("Selenium server is ready")
456-
yield process
457-
process.terminate()
458-
process.wait()
459-
print("Selenium server has been terminated")
460422

461423

462424
@pytest.fixture(autouse=True, scope="session")

0 commit comments

Comments
 (0)