This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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
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.