Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
SenZmaKi committed Jun 29, 2024
1 parent da3a509 commit dc52e75
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions senpwai/common/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ def setup_options(options: ArgOptions):
if isinstance(options, ChromiumOptions):
# HACK: https://github.com/SeleniumHQ/selenium/issues/13095#issuecomment-1793310460
# options.add_experimental_option("excludeSwitches", ["enable-logging"])
chrome_path = os.getenv("CHROME_PATH", None)
print("Chrome path:", chrome_path)
options.binary_location = chrome_path
if headless:
pass
options.add_argument("--headless=new")
return options

def helper(browser_name: BrowserName):
Expand All @@ -93,7 +90,6 @@ def helper(browser_name: BrowserName):
chrome_driver_path = os.getenv("CHROME_DRIVER_PATH", None)
print("Chrome driver path:", chrome_driver_path)
service_chrome = ChromeService(
executable_path=chrome_driver_path
)
options = cast(ChromeOptions, setup_options(ChromeOptions()))
self.driver = Chrome(service=service_chrome, options=options)
Expand Down

0 comments on commit dc52e75

Please sign in to comment.