Skip to content

Commit b58b4cd

Browse files
committed
Skip setting the "w3c" option in browser_launcher
1 parent 205ebc9 commit b58b4cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ def _set_chrome_options(
320320
if external_pdf:
321321
prefs["plugins.always_open_pdf_externally"] = True
322322
chrome_options.add_experimental_option("prefs", prefs)
323-
chrome_options.add_experimental_option("w3c", True)
323+
if not selenium4_or_newer:
324+
chrome_options.add_experimental_option("w3c", True)
324325
if enable_sync:
325326
chrome_options.add_experimental_option(
326327
"excludeSwitches",
@@ -1740,7 +1741,8 @@ def get_local_driver(
17401741
if external_pdf:
17411742
prefs["plugins.always_open_pdf_externally"] = True
17421743
edge_options.add_experimental_option("prefs", prefs)
1743-
edge_options.add_experimental_option("w3c", True)
1744+
if not selenium4_or_newer:
1745+
edge_options.add_experimental_option("w3c", True)
17441746
edge_options.add_argument(
17451747
"--disable-blink-features=AutomationControlled"
17461748
)

0 commit comments

Comments
 (0)