Use following generic method to get list of descendent elements using XPath
public List<WebElement> FindDescendentsXPath(WebElement objectName)
{
List<WebElement> descendents = objectName.findElements(By.XPath(".//*"));
return descendents;
}
public List<WebElement> FindDescendentsXPath(WebElement objectName)
{
List<WebElement> descendents = objectName.findElements(By.XPath(".//*"));
return descendents;
}
Content is very clear and easily explained it is very interesting as well. I hope you post again soon.
ReplyDeletePYTHON Training in Chennai