I ran into the error "Cannot focus element" when using protractor and tried several solutions offered by the Protractor docs as well as from other questions on S.O. Some of these include:
1)This ignores the send.sendKeys(protractor.Key.ENTER) line:
browser.actions().mouseMove(element)
.click()
.sendKeys("admin")
.sendKeys(protractor.Key.ENTER)
.perform()
2) Gives "cannot focus element" error
browser.actions().mouseMove(element)
.click()
.sendKeys("admin")
.perform();
element.sendKeys(protractor.Key.ENTER);
3) Gives "cannot focus element" error
element.sendKeys('admin');
element.sendKeys(protractor.Key.ENTER);