There is this element which has child elements, those child elements again have child elements and so on. I would like to get all elements that are descendants of the element. Thanks.
Try this one:
(Java)
List<WebElement> childs = rootWebElement.findElements(By.xpath(".//*"));
(C#)
IReadOnlyList<IWebElement> childs = rootWebElement.FindElements(By.XPath(".//*"));