w3c / w3c/webdriver

Switch order of matching conditions in Element Send Keys

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

Nobody has claimed this yet.

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

Description

In chapter 12. Elements, section 12.4 Interaction:

Below is an excerpt of step 8 of Element Send Keys where we must pick the "first matching" case. If, for example, the user attempts to send keys to a contenteditable p element, if the spec is followed precisely it will never reach the "Element is content editable" case as the above case always qualifies as "something other than a text input control"

The user agent renders element as something other than a text input control (for example an input element in the color state being presented as a colorwheel):

  1. If element does not have an own property named value return an error with error code element not interactable
  1. If element is not mutable return an error with error code element not interactable.
  1. Set a property value to text on element.
  1. If element is suffering from bad input return an error with error code invalid argument.
  1. Return success with data null.

Element is content editable

  1. Set the text insertion caret after any child content.

I believe the problem would be fixed if the two cases below have their order switched.

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 step 8 of Element Send Keys in section 12.4 Interaction of the linked WebDriver specification and review the two quoted matching cases. Update their order so the intended contenteditable behavior is reachable, then check the surrounding normative text for consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.