diff --git a/py/test/selenium/webdriver/support/relative_by_tests.py b/py/test/selenium/webdriver/support/relative_by_tests.py index 6fbd1e0344cf4..1be31f729ce6f 100644 --- a/py/test/selenium/webdriver/support/relative_by_tests.py +++ b/py/test/selenium/webdriver/support/relative_by_tests.py @@ -89,6 +89,13 @@ def test_no_such_element_is_raised_rather_than_index_error(driver, pages): assert "Cannot locate relative element with: {'id': 'nonexistentid'}" in exc.value.msg +# this test will fail with InvalidArgumentException +def test_near_locator_should_accept_single_int(driver, pages): + pages.load("relative_locators.html") + + driver.find_element(locate_with(By.ID, "rect2").near(123)) + + def test_near_locator_should_find_near_elements(driver, pages): pages.load("relative_locators.html") rect1 = driver.find_element(By.ID, "rect1")