Skip to content

Commit c810e48

Browse files
fixed merge conflicts and cleaned up
1 parent 1cf45a3 commit c810e48

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
@@ -26,7 +26,6 @@
2626
from test.selenium.webdriver.common.network import get_lan_ip
2727
from test.selenium.webdriver.common.webserver import SimpleWebServer
2828

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

459421

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

0 commit comments

Comments
 (0)