From 9329fb6eca52bc733617093e65034835a7dab669 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 17:13:18 +0200 Subject: [PATCH] chore(deps): update all dependencies (#275) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: Anthonios Partheniou --- recaptcha_enterprise/snippets/requirements-test.txt | 4 ++-- recaptcha_enterprise/snippets/requirements.txt | 2 +- .../snippets/test_create_assessment.py | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/recaptcha_enterprise/snippets/requirements-test.txt b/recaptcha_enterprise/snippets/requirements-test.txt index bd22f05d3932..0ebdb19548a7 100644 --- a/recaptcha_enterprise/snippets/requirements-test.txt +++ b/recaptcha_enterprise/snippets/requirements-test.txt @@ -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 diff --git a/recaptcha_enterprise/snippets/requirements.txt b/recaptcha_enterprise/snippets/requirements.txt index efdd33604324..7d4a79222755 100644 --- a/recaptcha_enterprise/snippets/requirements.txt +++ b/recaptcha_enterprise/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-recaptcha-enterprise==1.7.1 \ No newline at end of file +google-cloud-recaptcha-enterprise==1.8.0 \ No newline at end of file diff --git a/recaptcha_enterprise/snippets/test_create_assessment.py b/recaptcha_enterprise/snippets/test_create_assessment.py index 70293b3f79c1..b1aa0f4e9d0a 100644 --- a/recaptcha_enterprise/snippets/test_create_assessment.py +++ b/recaptcha_enterprise/snippets/test_create_assessment.py @@ -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 @@ -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 @@ -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)