Skip to content

Commit 862ac27

Browse files
committed
Fix issues with Edge version 115 on Linux
1 parent cf02fdf commit 862ac27

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

seleniumbase/console_scripts/sb_install.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,12 @@ def main(override=None, intel_for_uc=None):
500500
url_request = requests_get_with_retry(use_version)
501501
if url_request.ok:
502502
use_version = url_request.text.split("\r")[0].split("\n")[0]
503+
if (
504+
int(use_version.split(".")[0]) == 115
505+
and use_version.startswith("115.0")
506+
and use_version != "115.0.1901.183"
507+
):
508+
use_version = "115.0.1901.183"
503509
download_url = "https://msedgedriver.azureedge.net/%s/%s" % (
504510
use_version,
505511
file_name,

seleniumbase/core/browser_launcher.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,6 +2177,7 @@ def get_local_driver(
21772177
if major_edge_version:
21782178
use_version = major_edge_version
21792179
driver_version = None
2180+
edgedriver_upgrade_needed = False
21802181
if os.path.exists(LOCAL_EDGEDRIVER):
21812182
try:
21822183
output = subprocess.check_output(
@@ -2191,14 +2192,18 @@ def get_local_driver(
21912192
output = output.split(" ")[1].split(".")[0]
21922193
elif output.split(" ")[0] == "Microsoft":
21932194
# Microsoft Edge WebDriver VERSION
2195+
if (
2196+
"WebDriver 115.0" in output
2197+
and "115.0.1901.183" not in output
2198+
):
2199+
edgedriver_upgrade_needed = True
21942200
output = output.split(" ")[3].split(".")[0]
21952201
else:
21962202
output = 0
21972203
if int(output) >= 2:
21982204
driver_version = output
21992205
except Exception:
22002206
pass
2201-
edgedriver_upgrade_needed = False
22022207
local_edgedriver_exists = False
22032208
if LOCAL_EDGEDRIVER and os.path.exists(LOCAL_EDGEDRIVER):
22042209
local_edgedriver_exists = True
@@ -2477,7 +2482,9 @@ def get_local_driver(
24772482
if selenium4_or_newer:
24782483
try:
24792484
service = EdgeService(
2480-
executable_path=LOCAL_EDGEDRIVER, log_path=os.devnull
2485+
executable_path=LOCAL_EDGEDRIVER,
2486+
log_path=os.devnull,
2487+
service_args=["--disable-build-check"],
24812488
)
24822489
driver = Edge(service=service, options=edge_options)
24832490
except Exception as e:
@@ -2503,6 +2510,7 @@ def get_local_driver(
25032510
service = EdgeService(
25042511
executable_path=LOCAL_EDGEDRIVER,
25052512
log_path=os.devnull,
2513+
service_args=["--disable-build-check"],
25062514
)
25072515
# https://stackoverflow.com/a/56638103/7058266
25082516
sys_argv = sys.argv
@@ -2576,6 +2584,7 @@ def get_local_driver(
25762584
service = EdgeService(
25772585
executable_path=LOCAL_EDGEDRIVER,
25782586
log_path=os.devnull,
2587+
service_args=["--disable-build-check"],
25792588
)
25802589
# https://stackoverflow.com/a/56638103/7058266
25812590
sys_argv = sys.argv

0 commit comments

Comments
 (0)