Hot answers tagged

1

I used a helper function to see if at least one element still exists. Because I'm finding a new element each loop, StaleElementException doesn't occur anymore. while(isElementVisible(d, (By.ClassName("search-choice-close")))) { d.FindElement(By.ClassName("search-choice-close")).Click(); ...



Only top voted, non community-wiki answers of a minimum length are eligible