<li ui-sref="settings.contacts" class="ng-scope active" ui-sref-active="active">
How would I select this element in protractor? I have tried to use element(by.partialLinkText but I'm getting undefined error.
<li ui-sref="settings.contacts" class="ng-scope active" ui-sref-active="active">
How would I select this element in protractor? I have tried to use element(by.partialLinkText but I'm getting undefined error.
Share Improve this question asked Jul 17, 2014 at 14:13 Sakamoto KazumaSakamoto Kazuma 2,5797 gold badges38 silver badges77 bronze badges3 Answers
Reset to default 6If have another solution.
var link = element(by.css('[ui-sref="settings.contacts"]'));
Works well.
You can select the ui-sref using protractor-linkuisref-locator.
Click event not work
var link = element(by.css('[ui-sref="settings.contacts"]'));
link.click();
It will through error,
Failed: unknown error: Element <button class="button button-clear button-stable link ng-binding" type="button" ui-sref="login" href="#/login">...</button> is not clickable at point (179, 559). Other element would receive the click: <div class="loading-container visible active">...</div>