Marionette should not return unhandled extension capabilities
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
See discussion in Bug 1713775 for additional context.
Per spec, vendors or third parties can define additional/extension capabilities, which can be differentiated from regular capabilities because they contain a ":" in the capability name. For instance "pageLoadStrategy" is a regular capability, while "moz:debuggerAddress" is an additional capability.
When an extension/additional capability is not implemented be an endpoint node, the capability should not be returned:
Otherwise, if name is the key of an extension capability, let match value be
the result of trying implementation-specific steps to match on name with value.
If the match is not successful, return success with data null.
From https://www.w3.org/TR/webdriver/#processing-capabilities
Currently Marionette will return the passed capability in the new session response. We should filter it out.
This behavior could be validated with a wdspec test similar to:
import pytest
from tests.support.asserts import assert_success
def test_unhandled_extension_capability(new_session, add_browser_capabilities):
response, _ = new_session({"capabilities": {
"alwaysMatch": add_browser_capabilities({"test:unhandledCapability": True})}})
value = assert_success(response)
assert "test:unhandledCapability" not in value["capabilities"]
(currently passes with chrome but fails with firefox)
Updated•5 years ago
|
Updated•3 years ago
|
Description
•