Selenium IDE - sendKeys fails on <input type="email">
OS: OSX Selenium Version: Selenium IDE 2.9.1 Browser: Firefox Browser Version: 53.0.3 (64-bit)
Expected Behavior -
sendKeys should send keypresses to an input of type email.
Actual Behavior -
sendKeys fails to send the keypresses to an input of type email. (It works fine with type="tel" or "password". And type works.)
Steps to reproduce -
- Open https://jsfiddle.net and put
<input id="query" type="email">in the html block and run it. - In Selenium IDE enter
<tr>
<td>sendKeys</td>
<td>id=query</td>
<td>[email protected]</td>
</tr>
<tr>
<td>type</td>
<td>id=query</td>
<td>[email protected]</td>
</tr>
And run the two lines individually.
Note that sendKeys fails, but type works fine.
Is there a workaround for this?
I ran into this issue recently as well. The work around was simple - use the Type method to send the value to the field you'd like to populate, then perform a FireEvent on the field's input event.
<tr>
<td>type</td>
<td>id=myEmailInputField</td>
<td>[email protected]</td>
</tr>
<tr>
<td>fireEvent</td>
<td>id=myEmailInputField</td>
<td>input</td>
</tr>
Duplicate of #4361 that provides more details.