w3c / w3c/webdriver

Make it possible to create a session using an empty object

Open
#1,306 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

At minimum, the New Session command mandates the presence of a capabilities field with an empty object for creating a new session:

{"capabilities": {}}

This is due to how the processing capabilities algorithm is phrased:

  1. Let capabilities request be the result of getting the property "capabilities" from parameters.
    1. If capabilities request is not a JSON object, return error with error code invalid argument.

The logical consequence of this is that using an empty top-level JSON Object, like this, is illegal:

{}

It was @whimboo who discovered this, and first reported it in https://bugzilla.mozilla.org/show_bug.cgi?id=1470976.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the New Session command and its processing capabilities algorithm in the WebDriver specification, then review the linked Bugzilla report for the intended behavior. The work is done when an empty top-level JSON object is accepted for session creation without violating the capabilities-processing rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.