summaryrefslogtreecommitdiffstats
path: root/tests/auto/wasm/selenium/qwasmwindow.py
diff options
context:
space:
mode:
authorPiotr Wiercinski <[email protected]>2024-02-26 16:15:23 +0100
committerPiotr Wierciński <[email protected]>2024-03-13 09:19:48 +0000
commit05f4a77e17df50818a5dcce7f0af228d6ed33d02 (patch)
treeaff194f02e1280b7b2e69768f7d2b4de83d3e39a /tests/auto/wasm/selenium/qwasmwindow.py
parent9e214cbcdd138d2363b836c005450d27c0191f74 (diff)
wasm tests: Use WebDriverManager to install chromedriver
Use WebDriverManager to install the correct version of chromedriver. This will help avoiding mismatch of Chrome/chromedriver versions, which sometimes happen in CI. Fixes: QTBUG-122729 Change-Id: I40cf62c02c2cb6f57b031cc83b9fa38f6ed2610e Reviewed-by: Simo Fält <[email protected]>
Diffstat (limited to 'tests/auto/wasm/selenium/qwasmwindow.py')
-rw-r--r--tests/auto/wasm/selenium/qwasmwindow.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/wasm/selenium/qwasmwindow.py b/tests/auto/wasm/selenium/qwasmwindow.py
index eaad7c4e00c..69934b1db51 100644
--- a/tests/auto/wasm/selenium/qwasmwindow.py
+++ b/tests/auto/wasm/selenium/qwasmwindow.py
@@ -2,6 +2,8 @@
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
from selenium.webdriver import Chrome
+from selenium.webdriver.chrome.service import Service as ChromeService
+from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.actions.action_builder import ActionBuilder
from selenium.webdriver.common.actions.pointer_actions import PointerActions
from selenium.webdriver.common.actions.interaction import POINTER_TOUCH
@@ -9,16 +11,14 @@ from selenium.webdriver.common.actions.pointer_input import PointerInput
from selenium.webdriver.common.by import By
from selenium.webdriver.support.expected_conditions import presence_of_element_located
from selenium.webdriver.support.ui import WebDriverWait
-from selenium.webdriver.common.action_chains import ActionChains
+from webdriver_manager.chrome import ChromeDriverManager
import unittest
from enum import Enum, auto
-import time
-
class WidgetTestCase(unittest.TestCase):
def setUp(self):
- self._driver = Chrome()
+ self._driver = Chrome(service=ChromeService(ChromeDriverManager().install()))
self._driver.get(
'http://localhost:8001/tst_qwasmwindow_harness.html')
self._test_sandbox_element = WebDriverWait(self._driver, 30).until(