diff --git a/py/test/selenium/webdriver/common/driver_element_finding_tests.py b/py/test/selenium/webdriver/common/driver_element_finding_tests.py index 1414324d57a08..cfdca06e23ca5 100644 --- a/py/test/selenium/webdriver/common/driver_element_finding_tests.py +++ b/py/test/selenium/webdriver/common/driver_element_finding_tests.py @@ -283,7 +283,7 @@ def test_should_not_find_element_by_class_when_the_name_queried_is_shorter_than_ @pytest.mark.xfail_edge(reason="https://bugs.chromium.org/p/chromedriver/issues/detail?id=4743") def test_finding_asingle_element_by_empty_class_name_should_throw(driver, pages): pages.load("xhtmlTest.html") - msg = r"\/errors#invalid-selector-exception" + msg = r"\/errors#invalidselectorexception" with pytest.raises(InvalidSelectorException, match=msg): driver.find_element(By.CLASS_NAME, "") diff --git a/py/test/selenium/webdriver/common/stale_reference_tests.py b/py/test/selenium/webdriver/common/stale_reference_tests.py index 4d8c585fd4331..65df3b1ab19b8 100644 --- a/py/test/selenium/webdriver/common/stale_reference_tests.py +++ b/py/test/selenium/webdriver/common/stale_reference_tests.py @@ -25,7 +25,7 @@ def test_old_page(driver, pages): pages.load("simpleTest.html") elem = driver.find_element(by=By.ID, value="links") pages.load("xhtmlTest.html") - msg = r"\/errors#stale-element-reference-exception" + msg = r"\/errors#staleelementreferenceexception" with pytest.raises(StaleElementReferenceException, match=msg): elem.click()