Skip to content

Instantly share code, notes, and snippets.

@4M01
Last active May 9, 2016 07:58
Show Gist options
  • Save 4M01/6a074e31d7fd82524da7846f4b8821d5 to your computer and use it in GitHub Desktop.
Save 4M01/6a074e31d7fd82524da7846f4b8821d5 to your computer and use it in GitHub Desktop.
Finding Parent Element of Known Element in Selenium/WebDriver
protected WebElement getParentElement(WebElement element){
WebElement parentElement=null;
if(element !=null){
parentElement=element.findElement(By.xpath(".."));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment