Skip to content

Commit bca3af7

Browse files
authored
Merge pull request #88 from umihico/fix/deprecated-method
fix
2 parents b137c26 + 3f5908f commit bca3af7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from selenium import webdriver
22
from tempfile import mkdtemp
3+
from selenium.webdriver.common.by import By
34

45

56
def handler(event=None, context=None):
@@ -20,4 +21,4 @@ def handler(event=None, context=None):
2021
chrome = webdriver.Chrome("/opt/chromedriver",
2122
options=options)
2223
chrome.get("https://example.com/")
23-
return chrome.find_element_by_xpath("//html").text
24+
return chrome.find_element(by=By.XPATH, value="//html").text

0 commit comments

Comments
 (0)