Guest User

Untitled

a guest
Jun 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. WebElement ul = driver.findElementByXPath(prop.getProperty("category"));
  2. List<WebElement> options = ul.findElements(By.tagName("li"));
  3. for(WebElement sample: options)
  4. {
  5. if(sample.getText().equals(data)){
  6. sample.click();
  7. }
  8. }
  9.  
  10. Exception in thread "main"
  11. org.openqa.selenium.StaleElementReferenceException: stale element
  12. reference: element is not attached to the page document
Add Comment
Please, Sign In to add comment