File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,8 @@ def _set_chrome_options(
320
320
if external_pdf :
321
321
prefs ["plugins.always_open_pdf_externally" ] = True
322
322
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 )
324
325
if enable_sync :
325
326
chrome_options .add_experimental_option (
326
327
"excludeSwitches" ,
@@ -1740,7 +1741,8 @@ def get_local_driver(
1740
1741
if external_pdf :
1741
1742
prefs ["plugins.always_open_pdf_externally" ] = True
1742
1743
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 )
1744
1746
edge_options .add_argument (
1745
1747
"--disable-blink-features=AutomationControlled"
1746
1748
)
You can’t perform that action at this time.
0 commit comments