Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WebElement ul = driver.findElementByXPath(prop.getProperty("category"));
- List<WebElement> options = ul.findElements(By.tagName("li"));
- for(WebElement sample: options)
- {
- if(sample.getText().equals(data)){
- sample.click();
- }
- }
- Exception in thread "main"
- org.openqa.selenium.StaleElementReferenceException: stale element
- reference: element is not attached to the page document
Add Comment
Please, Sign In to add comment