Ensure by.xpath
locator is not used.
According to the Protractor's style guide, using by.xpath
is considered a bad practice.
👎 The following patterns are considered warnings:
element(by.xpath("//a[starts-with(@href, 'something')]"));
element.all(by.xpath("//a[starts-with(@href, 'something')]"));
👍 The following patterns are not warnings:
element(by.css("a[href^=something]"));
element.all(by.css("a[href^=something]"));