Bug 323692
| Summary: | REGRESSION(320518@main): WebDriver returns "no such element" instead of "stale element reference" for a node reference from a previous document | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
| Component: | WebDriver | Assignee: | Brent Fulgham <bfulgham> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bburg, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=323694 https://bugs.webkit.org/show_bug.cgi?id=323695 https://bugs.webkit.org/show_bug.cgi?id=323386 |
||
Lauro Moura
320518@main correctly split "no such element" from "stale element reference", fixing almost 100 subtests, but the stale reference map is wiped on page navigation/refresh, as this information is stored by the AutomationSessionProxy JS instance living on the page's global object.
Expected: stale element reference
Actual: no such element — "Node with identifier 'node-…' was not found"
Per the spec, the stale references are associated to a given navigable, surviving navigations on that navigable:
> A WebDriver session has a navigable seen nodes map which is a weak map between a navigable and a set.
Tests affected:
imported/w3c/webdriver/tests/classic/back/back.py::test_seen_nodes[http]
imported/w3c/webdriver/tests/classic/forward/forward.py::test_basic
imported/w3c/webdriver/tests/classic/forward/forward.py::test_seen_nodes[http]
imported/w3c/webdriver/tests/classic/navigate_to/navigate.py::test_seen_nodes[http]
imported/w3c/webdriver/tests/classic/refresh/refresh.py::test_history_pushstate
imported/w3c/webdriver/tests/classic/refresh/refresh.py::test_no_browsing_context
imported/w3c/webdriver/tests/classic/refresh/refresh.py::test_seen_nodes[http]
imported/w3c/webdriver/tests/classic/refresh/refresh.py::test_seen_nodes[https]
imported/w3c/webdriver/tests/classic/refresh/refresh.py::test_seen_nodes[https coop]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_accept[alert]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_accept[beforeunload]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_accept[confirm]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_accept[prompt]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_accept_and_notify[beforeunload-None]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_default[beforeunload-None]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_dismiss[alert]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_dismiss[beforeunload]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_dismiss[confirm]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_dismiss[prompt]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_dismiss_and_notify[beforeunload-None]
imported/w3c/webdriver/tests/classic/refresh/user_prompts.py::test_ignore[beforeunload]
imported/selenium/py/test/selenium/webdriver/common/stale_reference_tests.py::test_old_page
imported/selenium/py/test/selenium/webdriver/common/stale_reference_tests.py::test_should_not_crash_when_calling_get_size_on_an_obsolete_element
imported/selenium/py/test/selenium/webdriver/common/stale_reference_tests.py::test_should_not_crash_when_querying_the_attribute_of_astale_element
I have a WIP patch from a previous attempt at bug230612 (https://github.com/WebKit/WebKit/pull/61870) that keeps the stale reference map in the C++ side, keyed by frame. It could be adjusted to be a follow-up to 320518@main (e.g. using the new StaleNode error, fix conflicts, etc.).
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Lauro Moura
Pull request: https://github.com/WebKit/WebKit/pull/73566
EWS
Test gardening commit 320729@main (741f1cc7772d): <https://commits.webkit.org/320729@main>
Reviewed commits have been landed. Closing PR #73566 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/187042183>
Brent Fulgham
Pull request: https://github.com/WebKit/WebKit/pull/74083
EWS
Committed 321731@main (ff835bfba1ac): <https://commits.webkit.org/321731@main>
Reviewed commits have been landed. Closing PR #74083 and removing active labels.
Brent Fulgham
*** Bug 323694 has been marked as a duplicate of this bug. ***
EWS
Committed 321067.651@safari-7626-branch (3200d473c5bb): <https://commits.webkit.org/321067.651@safari-7626-branch>
Reviewed commits have been landed. Closing PR #7594 and removing active labels.