Skip to content

Commit 9329fb6

Browse files
renovate-botgcf-owl-bot[bot]parthea
authored
chore(deps): update all dependencies (#275)
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert * test: find_element_by_id->find_element * test: add import from selenium.webdriver.common.by import By Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 48cb626 commit 9329fb6

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
selenium==4.2.0
2-
Flask==2.1.2
1+
selenium==4.3.0
2+
Flask==2.1.3
33
pytest==7.1.2
44
pytest-flask==1.2.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-recaptcha-enterprise==1.7.1
1+
google-cloud-recaptcha-enterprise==1.8.0

recaptcha_enterprise/snippets/test_create_assessment.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import pytest
2525
from selenium import webdriver
2626
from selenium.webdriver.chrome.webdriver import WebDriver
27+
from selenium.webdriver.common.by import By
2728

2829
from annotate_assessment import annotate_assessment
2930
from create_assessment import create_assessment
@@ -102,14 +103,14 @@ def get_token(recaptcha_site_key: str, browser: WebDriver) -> typing.Tuple:
102103
browser.get(url_for("assess", site_key=recaptcha_site_key, _external=True))
103104
time.sleep(5)
104105

105-
browser.find_element_by_id("username").send_keys("username")
106-
browser.find_element_by_id("password").send_keys("password")
107-
browser.find_element_by_id("recaptchabutton").click()
106+
browser.find_element(By.ID, "username").send_keys("username")
107+
browser.find_element(By.ID, "password").send_keys("password")
108+
browser.find_element(By.ID, "recaptchabutton").click()
108109

109110
# Timeout of 5 seconds
110111
time.sleep(5)
111112

112-
element = browser.find_element_by_css_selector("#assessment")
113+
element = browser.find_element(By.CSS_SELECTOR, "#assessment")
113114
token = element.get_attribute("data-token")
114115
action = element.get_attribute("data-action")
115116
return token, action
@@ -125,4 +126,4 @@ def assess_token(recaptcha_site_key: str, token: str, action: str) -> Assessment
125126

126127

127128
def set_score(browser: WebDriver, score: str) -> None:
128-
browser.find_element_by_css_selector("#assessment").send_keys(score)
129+
browser.find_element(By.CSS_SELECTOR, "#assessment").send_keys(score)

0 commit comments

Comments
 (0)