w3c / w3c/webdriver

The "process capabilities" steps provides an unreferenced "flags" parameter to "validate capabilities"

Open
#1,879 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In the "process capabilities" algorithm, steps 2.2 and 5.1 provide a "flags" parameter to the "validate capabilities" algorithm:

2.2. Let required capabilities be the result of trying to validate capabilities with arguments required capabilities and flag.
5.1. Let validated capabilities be the result of trying to validate capabilities with arguments first match capabilities and flags.

(Note there's also a typo in step 2.2., it says "flag" instead of "flags").

However, the "validate capabilities" algorithm does not mention any flags parameter in its header, nor is it referenced in any of its steps:

When required to validate capabilities with argument capabilities: 

On the other hand, the "matching capabilities" algorithm does need a flags parameter, but "process capabilities" does not provide this parameter in step 8.1:

8.1. Let matched capabilities be the result of trying to match capabilities with capabilities as an argument. 
When matching capabilities given JSON Object capabilities, and a session configuration flags flags, an endpoint node must take the following steps:

Further, the use of "flags" within "matching capabilities" seems strangely written. It is used to conditionally set the "strictFileInteractability" item in step 2:

2. If flags contains "http", add the following entries to matched capabilities:

   "strictFileInteractability"
   Boolean initially set to false, indicating that interactabilty checks will be applied to <input type=file>. 

(There's another typo here, should be "interactability checks").

However, this item is already set in step 1. Should the item in step 1 have been removed?

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

Compare the “process capabilities,” “validate capabilities,” and “matching capabilities” algorithms in the WebDriver specification, focusing on their parameter lists and the strictFileInteractability steps. Resolve the inconsistent flags arguments and noted typos, and document the intended handling of the item duplicated in matching capabilities.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 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.