Commit fc3d58ca authored by Henrik Skupin's avatar Henrik Skupin
Browse files

Bug 1822466 - [wdspec] Correct stale element errors for cross-origin...

Bug 1822466 - [wdspec] Correct stale element errors for cross-origin navigations #39646 r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D177489
parent 37c6686b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -164,6 +164,6 @@ def test_cross_origin(session, url):

    assert session.url == first_page

    with pytest.raises(error.NoSuchElementException):
    with pytest.raises(error.StaleElementReferenceException):
        elem.click()
    elem = session.find.css("#delete", all=False)
+5 −4
Original line number Diff line number Diff line
import pytest

from webdriver.error import NoSuchElementException
from webdriver import error

from tests.support.asserts import assert_success
from tests.support.helpers import wait_for_new_handle
@@ -121,7 +120,7 @@ def test_link_from_toplevel_context_with_target(session, inline, target):
    wait = Poll(
        session,
        timeout=5,
        ignored_exceptions=NoSuchElementException,
        ignored_exceptions=error.NoSuchElementException,
        message="Expected element has not been found")
    wait.until(lambda s: s.find.css("#foo"))

@@ -160,7 +159,7 @@ def test_link_from_nested_context_with_target(session, inline, iframe, target):
    wait = Poll(
        session,
        timeout=5,
        ignored_exceptions=NoSuchElementException,
        ignored_exceptions=error.NoSuchElementException,
        message="Expected element has not been found")
    wait.until(lambda s: s.find.css("#foo"))

@@ -180,6 +179,8 @@ def test_link_cross_origin(session, inline, url):
    assert_success(response)

    assert session.url == target_page
    with pytest.raises(error.StaleElementReferenceException):
        link.click()

    session.find.css("#delete", all=False)

+1 −1
Original line number Diff line number Diff line
@@ -190,6 +190,6 @@ def test_cross_origin(session, url):

    assert session.url == second_page

    with pytest.raises(error.NoSuchElementException):
    with pytest.raises(error.StaleElementReferenceException):
        elem.click()
    elem = session.find.css("#delete", all=False)
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ def test_cross_origin(session, inline, url):
    assert_success(response)

    assert session.url == second_page
    with pytest.raises(error.NoSuchElementException):
    with pytest.raises(error.StaleElementReferenceException):
        elem.click()

    session.find.css("#delete", all=False)