protractor XPath selectors in Protractor Selecting a DOM element using protractor

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


Apart from CSS, model, and binding selectors, protractor can also locate elements using xpath View

<li><a href=''>Go to google</a></li>


var googleLink= element(by.xpath('//ul/li/a'));
expect(element.getText()).to.eventually.equal('Go to google','The text you mention was not found');

Got any protractor Question?