selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Selenium IDE - sendKeys fails on <input type="email">

Open machtyn opened this issue 9 years ago • 3 comments

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 -

  1. Open https://jsfiddle.net and put <input id="query" type="email"> in the html block and run it.
  2. 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.

machtyn avatar May 30 '17 21:05 machtyn

Is there a workaround for this?

thechairman007 avatar Jun 29 '17 23:06 thechairman007

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>

cryanjohnson avatar Jul 27 '17 18:07 cryanjohnson

Duplicate of #4361 that provides more details.

barancev avatar Aug 04 '17 06:08 barancev