Tutorial by Examples

Apart from CSS, model, and binding selectors, protractor can also locate elements using xpath View <ul> <li><a href='http://www.google.com'>Go to google</a></li> </ul> Code var googleLink= element(by.xpath('//ul/li/a')); expect(element.getText()).to.event...
XPath selectors can be used to select elements with specific attributes, such as class, id, title etc. By Class View: <div class="HakunaMatata"> Hakuna Matata </div> Code: var theLionKing= element(by.xpath('//div[@class="HakunaMatata"]')); expect(theLionKing.g...

Page 1 of 1