This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27103 - Allow nested dictionaries in capabilities
Summary: Allow nested dictionaries in capabilities
Status: RESOLVED FIXED
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2014-10-19 20:56 UTC by seva
Modified: 2015-05-30 19:44 UTC (History)
3 users (show)

See Also:


Attachments

Description seva 2014-10-19 20:56:23 UTC
Section "3.1.2 Methods" specifies for method get():
"Return type: (DOMString or boolean or long), nullable".

https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#methods

"capabilities" dictionary also is specified to only be allowed DOMString or boolean or long values, too.

Some existing drivers - to not name names - don't comply with that, e.g. browserXOptions' value below is not a DOMString or boolean or long:
{
   "desiredCapabilities": {
      "browserName": "browserX",
      "platform": "platformY",
      "browserXOptions": {
         "browserXSetting": "customValue"
      }
   }
}

Should the spec change to allow the nested dictionaries (and effectively arbitrary JSON) in the capabilities? Or do we want to change existing implementations that aren't currently compliant?
Comment 1 seva 2014-10-19 21:29:18 UTC
"proxy" capability* is also likely to be specified as a nested dictionary.

* Proxy is not yet specified; https://www.w3.org/Bugs/Public/show_bug.cgi?id=26391
Comment 2 Andreas Tolfsen 2014-10-20 12:21:33 UTC
The spec currently advises the use of the "-BROWSER-" (-webkit-, -moz-) prefix when introducing remote specific capabilities.

And I think the current prose assumes that the capabilities is a flat one dimensional key-value map although that's not explicit in the current wording.

This was done to avoid clashes with current and future capabilities (for the role interfaces) introduced by the spec.

If we decide to allow nested objects, it really makes a lot more sense to allow any JSON structure including arrays.
Comment 3 David Burns :automatedtester 2015-05-30 19:43:50 UTC
This has been fixed in https://github.com/w3c/webdriver/commit/f05cbd4f94c05d17d1adef698dff319972bcbcee