Skip to content

Commit

Permalink
chore(deps): update all dependencies (#275)
Browse files Browse the repository at this point in the history
* 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 <partheniou@google.com>
  • Loading branch information
3 people authored Aug 2, 2022
1 parent 48cb626 commit 9329fb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions recaptcha_enterprise/snippets/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
selenium==4.2.0
Flask==2.1.2
selenium==4.3.0
Flask==2.1.3
pytest==7.1.2
pytest-flask==1.2.0
2 changes: 1 addition & 1 deletion recaptcha_enterprise/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
google-cloud-recaptcha-enterprise==1.7.1
google-cloud-recaptcha-enterprise==1.8.0
11 changes: 6 additions & 5 deletions recaptcha_enterprise/snippets/test_create_assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import pytest
from selenium import webdriver
from selenium.webdriver.chrome.webdriver import WebDriver
from selenium.webdriver.common.by import By

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

browser.find_element_by_id("username").send_keys("username")
browser.find_element_by_id("password").send_keys("password")
browser.find_element_by_id("recaptchabutton").click()
browser.find_element(By.ID, "username").send_keys("username")
browser.find_element(By.ID, "password").send_keys("password")
browser.find_element(By.ID, "recaptchabutton").click()

# Timeout of 5 seconds
time.sleep(5)

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


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

0 comments on commit 9329fb6

Please sign in to comment.