Skip to content

Commit 35c66c6

Browse files
committed
Revert "Using new Service object instead of deprecated execution_path"
This reverts commit 40bda19.
1 parent 6c75106 commit 35c66c6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

main.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
def handler(event=None, context=None):
77
options = webdriver.ChromeOptions()
8-
service = webdriver.ChromeService("/opt/chromedriver")
9-
108
options.binary_location = '/opt/chrome/chrome'
119
options.add_argument('--headless')
1210
options.add_argument('--no-sandbox')
@@ -20,8 +18,7 @@ def handler(event=None, context=None):
2018
options.add_argument(f"--data-path={mkdtemp()}")
2119
options.add_argument(f"--disk-cache-dir={mkdtemp()}")
2220
options.add_argument("--remote-debugging-port=9222")
23-
24-
chrome = webdriver.Chrome(options=options, service=service)
21+
chrome = webdriver.Chrome("/opt/chromedriver",
22+
options=options)
2523
chrome.get("https://example.com/")
26-
2724
return chrome.find_element(by=By.XPATH, value="//html").text

0 commit comments

Comments
 (0)