Skip to content

Commit 84bdedf

Browse files
committed
Swap deprecated "log_path" with "log_output"
1 parent 769cfe5 commit 84bdedf

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,7 +2036,7 @@ def get_local_driver(
20362036
if selenium4_or_newer:
20372037
service = FirefoxService(
20382038
executable_path=LOCAL_GECKODRIVER,
2039-
log_path=os.devnull,
2039+
log_output=os.devnull,
20402040
)
20412041
try:
20422042
return webdriver.Firefox(
@@ -2082,7 +2082,7 @@ def get_local_driver(
20822082
)
20832083
else:
20842084
if selenium4_or_newer:
2085-
service = FirefoxService(log_path=os.devnull)
2085+
service = FirefoxService(log_output=os.devnull)
20862086
try:
20872087
return webdriver.Firefox(
20882088
service=service,
@@ -2542,7 +2542,7 @@ def get_local_driver(
25422542
try:
25432543
service = EdgeService(
25442544
executable_path=LOCAL_EDGEDRIVER,
2545-
log_path=os.devnull,
2545+
log_output=os.devnull,
25462546
service_args=["--disable-build-check"],
25472547
)
25482548
driver = Edge(service=service, options=edge_options)
@@ -2568,7 +2568,7 @@ def get_local_driver(
25682568
elif "DevToolsActivePort file doesn't exist" in e.msg:
25692569
service = EdgeService(
25702570
executable_path=LOCAL_EDGEDRIVER,
2571-
log_path=os.devnull,
2571+
log_output=os.devnull,
25722572
service_args=["--disable-build-check"],
25732573
)
25742574
# https://stackoverflow.com/a/56638103/7058266
@@ -2606,7 +2606,7 @@ def get_local_driver(
26062606
pass
26072607
service = EdgeService(
26082608
executable_path=LOCAL_EDGEDRIVER,
2609-
log_path=os.devnull,
2609+
log_output=os.devnull,
26102610
service_args=["--disable-build-check"],
26112611
)
26122612
driver = Edge(service=service, options=edge_options)
@@ -2642,7 +2642,7 @@ def get_local_driver(
26422642
elif "DevToolsActivePort file doesn't exist" in e.msg:
26432643
service = EdgeService(
26442644
executable_path=LOCAL_EDGEDRIVER,
2645-
log_path=os.devnull,
2645+
log_output=os.devnull,
26462646
service_args=["--disable-build-check"],
26472647
)
26482648
# https://stackoverflow.com/a/56638103/7058266
@@ -3187,7 +3187,7 @@ def get_local_driver(
31873187
else:
31883188
service = ChromeService(
31893189
executable_path=LOCAL_CHROMEDRIVER,
3190-
log_path=os.devnull,
3190+
log_output=os.devnull,
31913191
service_args=service_args,
31923192
)
31933193
driver = webdriver.Chrome(
@@ -3204,7 +3204,7 @@ def get_local_driver(
32043204
else:
32053205
if selenium4_or_newer:
32063206
service = ChromeService(
3207-
log_path=os.devnull,
3207+
log_output=os.devnull,
32083208
service_args=service_args,
32093209
)
32103210
driver = webdriver.Chrome(
@@ -3228,7 +3228,7 @@ def get_local_driver(
32283228
elif "Missing or invalid capabilities" in e.msg:
32293229
if selenium4_or_newer:
32303230
chrome_options.add_experimental_option("w3c", True)
3231-
service = ChromeService(log_path=os.devnull)
3231+
service = ChromeService(log_output=os.devnull)
32323232
with warnings.catch_warnings():
32333233
warnings.simplefilter(
32343234
"ignore", category=DeprecationWarning
@@ -3375,7 +3375,7 @@ def get_local_driver(
33753375
elif "Missing or invalid capabilities" in e.msg:
33763376
if selenium4_or_newer:
33773377
chrome_options.add_experimental_option("w3c", True)
3378-
service = ChromeService(log_path=os.devnull)
3378+
service = ChromeService(log_output=os.devnull)
33793379
with warnings.catch_warnings():
33803380
warnings.simplefilter(
33813381
"ignore", category=DeprecationWarning

seleniumbase/undetected/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,14 @@ def __init__(
289289
executable_path=self.patcher.executable_path,
290290
service_args=["--disable-build-check"],
291291
port=port,
292-
log_path=os.devnull,
292+
log_output=os.devnull,
293293
)
294294
else:
295295
service_ = selenium.webdriver.chrome.service.Service(
296296
executable_path=driver_executable_path,
297297
service_args=["--disable-build-check"],
298298
port=port,
299-
log_path=os.devnull,
299+
log_output=os.devnull,
300300
)
301301
if hasattr(service_, "creationflags"):
302302
setattr(service_, "creationflags", creationflags)

0 commit comments

Comments
 (0)