Protractor: sendKeys to TEXTAREA loses '/' and reverts string chunks

Created on 2 Dec 2014  路  6Comments  路  Source: angular/protractor

Running Protractor 1.4.0 on Ubuntu 14, Chrome 37 (Jenkins job).

When I send URL into <textarea></textarea> it seems like every 1st forward slash / encountered is causing the cursor to jump to the beginning of the line:

myElement.sendKeys("http://google.com");
myElement.getAttribute("value").then(function(val) {
  console.log(val);
});

I see in log:

 $ /google.comhttp:

I tried to sendKeys one by one while replacing the '/' with protractor.Key.DIVIDE:

$ http:google.com

It does not occur on <input type="text"/>, only on <textarea></textarea>.

Thank you.

Update 1

It is working correctly in Firefox (v31)

chrome external bug needs to be filed

Most helpful comment

The bug also exists on chromedriver 2.26 on CentOS. The bug does not exist on Mac Sierra.

All 6 comments

Sounds like a ChromeDriver bug. Let's make a reduced test case and send to them - I wonder if this is related to https://code.google.com/p/chromedriver/issues/detail?id=894

@juliemr, thank you for the response.

It does look like ChromeDriver for Linux problem. In my case the effect is a little different from the one you referenced: the string gets scrambled, the cursor seems to jump to the beginning of the field for each / and continues typing from there. Also the <input type="text"/> is OK.

Not sure I get what you mean by _make a reduced test case and send it to them_.

Basically we have to have a <textarea></textarea> and sendKeys() to it containing /(s).

<textarea id="my-text-area"></textarea>

somewhere in spec file:

// ...
var myElement = element(by.id("my-text-area"));
myElement.sendKeys("https://github.com/angular/protractor");
// ...

at this point text area has:
protractorangular/github.comhttps:

Thank you.

@juliemr I think this issue is the same as mine:
https://code.google.com/p/chromedriver/issues/detail?id=707

I'm going to close this as it It looks like this was fixed in Chromedriver 2.16, and protractor is on 2.20.

Please feel free to reopen if this is still an issue.

This issue still exists on chromedriver 2.32.

The bug also exists on chromedriver 2.26 on CentOS. The bug does not exist on Mac Sierra.

Was this page helpful?
0 / 5 - 0 ratings