I'm using Selenium 2.53.1. I'm trying to select several elements that have the same xpath, but I keep getting a stale element reference error. I read in other posts that adding a wait would work, but I'm still getting this error.
browser.findElements(by.xpath("//a[@title='Run Test Suite']")).then(function(all_tests){
// console.log(all_tests.length);
for (var i = 0; i < all_tests.length; i++) {
console.log(all_tests.length);
all_tests[i].click();
// browser.manage().timeouts().implicitlyWait(300000);
browser.findElements(by.xpath("//a[@title='Run Test Suite']"));
console.log("got to my wait");
browser.manage().timeouts().implicitlyWait(10000);
}
});
Do you have any suggestions on what I did wrong?