aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster/tests/browser/selenium_helpers_base.py
diff options
context:
space:
mode:
authorMarlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>2023-10-03 13:26:23 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-03 22:53:42 +0100
commit868c88a249ef4b9fe5a891e76e25e054e4fcd994 (patch)
treeb6c52f11c862694a319e6a5a25500a6af6b4e0f7 /lib/toaster/tests/browser/selenium_helpers_base.py
parentf3ba9c3726ec7b38b557100d8a2d4b6a1446a968 (diff)
downloadbitbake-contrib-868c88a249ef4b9fe5a891e76e25e054e4fcd994.tar.gz
toaster: update selenium version and code syntax
Updated selenium version to latest 4.13.0, changed selenum specific version syntax elements to accomplish test success Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/tests/browser/selenium_helpers_base.py')
-rw-r--r--lib/toaster/tests/browser/selenium_helpers_base.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/toaster/tests/browser/selenium_helpers_base.py b/lib/toaster/tests/browser/selenium_helpers_base.py
index 644d45fe5..9a4e27a3b 100644
--- a/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -21,6 +21,7 @@ import unittest
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
+from selenium.webdriver.common.by import By
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.common.exceptions import NoSuchElementException, \
StaleElementReferenceException, TimeoutException
@@ -32,9 +33,7 @@ def create_selenium_driver(cls,browser='chrome'):
browser = env_browser
if browser == 'chrome':
- return webdriver.Chrome(
- service_args=["--verbose", "--log-path=selenium.log"]
- )
+ return webdriver.Chrome()
elif browser == 'firefox':
return webdriver.Firefox()
elif browser == 'marionette':
@@ -153,11 +152,11 @@ class SeleniumTestCaseBase(unittest.TestCase):
def find(self, selector):
""" Find single element by CSS selector """
- return self.driver.find_element_by_css_selector(selector)
+ return self.driver.find_element(By.CSS_SELECTOR, selector)
def find_all(self, selector):
""" Find all elements matching CSS selector """
- return self.driver.find_elements_by_css_selector(selector)
+ return self.driver.find_elements(By.CSS_SELECTOR, selector)
def element_exists(self, selector):
"""