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 26743 - 14.3.3 - Clarify behavior when typing into non-interactable elements
Summary: 14.3.3 - Clarify behavior when typing into non-interactable elements
Status: RESOLVED INVALID
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC Linux
: 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-09-06 03:33 UTC by juangj
Modified: 2016-09-19 16:23 UTC (History)
3 users (show)

See Also:


Attachments
Example HTML (1.10 KB, text/html)
2014-09-06 03:38 UTC, juangj
Details

Description juangj 2014-09-06 03:33:23 UTC
Section 14.3.3 says:
"A requirement for key-based interaction with an element is that it is interactable. Typing into an element is permitted if one of the following conditions is met:"
(and then a list of conditions)

No behavior is specified when the element is not interactable. I think the language implies that an error should be thrown (because the "requirement" is not fulfilled), but the spec should specify which error.


Different drivers currently behave differently in this case. For example:
* ChromeDriver (2.10) throws an error ("unknown error: cannot focus element")
* FirefoxDriver (as of https://code.google.com/p/selenium/source/detail?r=afde40cbbf5c5cd71aa2bdf20c5ded55fae9e786) seems to type into some other element entirely -- the <BODY> element, in my testing
* IEDriver seems to do the same thing as FirefoxDriver
Comment 1 juangj 2014-09-06 03:38:58 UTC
Created attachment 1511 [details]
Example HTML

Maybe a useful example?

In Firefox, sending keys to the non-editable <span>, e.g.,
  WebDriver.findElement(By.id("s")).sendKeys("z");
results in the <BODY> element receiving the key events.

In Chrome, the same action results in an error.