Reputation: 35
I'm using protractor with Javascript. SendKeys(protractor.Key.TAB)
is not tabbing out from the input field.
Below is the html tag input tag:
<td>
<input class="ng-pristine ng-untouched ng-valid" type="text" placeholder="Add a new member" ng-blur="addMember()" ng-model="newMemberText"/>
</td>
Below is the protractor code snippet i wrote:
this.When(/^add member to registration$/, function () {
var abc= element(by.model('newMemberText'));
abc.sendKeys('print');
abc.sendKeys(protractor.Key.TAB);
});
I have even tried abc.sendKeys(KeyboardEvent.TAB)
. Both of them are not working.
Upvotes: 1
Views: 3542
Reputation: 586
I think you must send the desired key to the browser object, like this:
browser.actions().sendKeys(protractor.Key.TAB).perform();
Upvotes: 1
Reputation: 473853
This sounds related to Keys.ENTER, Keys.TAB, Keys.SPACE are not working on Chrome 44.
What you need to do:
chromedriver
to the latest versionOr, if that does not solve your issue, you can always switch to Firefox.
Upvotes: 0