[Webkit-unassigned] [Bug 180413] New: WebDriver: differentiate between no suh element and stale element errors
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 5 03:19:52 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=180413
Bug ID: 180413
Summary: WebDriver: differentiate between no suh element and
stale element errors
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebDriver
Assignee: webkit-unassigned at lists.webkit.org
Reporter: cgarcia at igalia.com
CC: bburg at apple.com
Currently we always fail with stale element error when we fail to find a node. There are two options in the spec: get a known element and get a known connected element:
To get a known element with argument reference, run the following steps:
1. Let element be the item in the current browsing context's list of known elements for which the web element reference matches reference, if such an element exists. Otherwise return error with error code no such element.
2. If element is stale, return error with error code stale element reference.
Return success with element.
To get a known connected element with argument reference, run the following steps:
1. Let element be the result of trying to get a known element with argument reference.
2. If element is not connected return error with error code stale element reference.
3. Return success with element.
This is causing several tests to fail:
imported/w3c/webdriver/tests/state/get_element_property.py::test_element_not_found
imported/w3c/webdriver/tests/state/get_element_attribute.py::test_element_not_found
imported/w3c/webdriver/tests/state/get_element_tag_name.py::test_element_not_found
with similat backtrace in all the cases:
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>, error_code = 'no such element'
def assert_error(response, error_code):
"""
Verify that the provided webdriver.Response instance described
a valid error response as defined by `dfn-send-an-error` and
the provided error code.
:param response: ``webdriver.Response`` instance.
:param error_code: String value of the expected error code
"""
assert response.status == errors[error_code]
assert "value" in response.body
> assert response.body["value"]["error"] == error_code
E AssertionError
error_code = 'no such element'
response = <Response status=404 error=<StaleElementReferenceException http_status=404>>
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171205/b90fba58/attachment.html>
More information about the webkit-unassigned
mailing list