WebElement body = browser.findElement(By.xpath(\"//body\")); body.findElement(By.xpath(\"\")); // I want to get all child elements // i
("*") gives all the child elements of the context node. So use:
("*")
body.findElement(By.xpath("*"));