Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Chrome cannot focus on div for sending keys #2258

Closed
bcherny opened this issue Jun 16, 2015 · 3 comments
Closed

Chrome cannot focus on div for sending keys #2258

bcherny opened this issue Jun 16, 2015 · 3 comments

Comments

@bcherny
Copy link

bcherny commented Jun 16, 2015

I have a <div> that I am trying to send a backspace key to.

// crashes Chrome
$('#myDiv').sendKeys(protractor.Key.BACK_SPACE)

// crashes Chrome
$('#myDiv').click().sendKeys(protractor.Key.BACK_SPACE)

// works!
browser.actions().sendKeys(protractor.Key.BACK_SPACE).perform()

Related to:

@sjelin
Copy link
Contributor

sjelin commented Jun 29, 2015

Not sure what's wrong with the first one. What error message are you getting?

$('#myDiv').click().sendKeys(protractor.Key.BACK_SPACE) is wrong. You can't chain those commands together like that.

@juliemr
Copy link
Member

juliemr commented Jun 29, 2015

@sjelin You should be able to chain commands, the commands seem fine.

When executing the first and second commands, the error is cannot focus element. The third command works because it isn't sending the keypress to a specific element, just to the browser.

This looks like a recurring issue with chromedriver. See code.google.com/p/chromedriver/issues/detail?id=870, and https://code.google.com/p/chromedriver/issues/detail?id=35, and https://code.google.com/p/chromedriver/issues/detail?id=999

@juliemr juliemr added this to the Pending milestone Jun 29, 2015
@juliemr juliemr changed the title Browser crashes when I send keys to a non-<input> Chrome cannot focus on div for sending keys Jun 29, 2015
@sjelin sjelin removed their assignment Nov 16, 2015
@juliemr
Copy link
Member

juliemr commented Jul 14, 2016

External bugs are closed, so I'm going to close this issue as well - please open up an issue with ChromeDriver if you are still seeing this with the latest version.

@juliemr juliemr closed this as completed Jul 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants