I am trying to get xpath by index and i am not making an progress. protractor says "that the element has more than one element is found for locator choosing the 1st one". however I want to make sure that the 1st one is selected intentionally screen shot below:
My code: that is not working: I tried the following site nothing works: https://devhints.io/xpath xpath get element by index Any help would be appreciated.
var payroll = element.all(by.xpath('//*[text()="Payroll"]')).first();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.