WebElement body = browser.findElement(By.xpath(\"//body\")); body.findElement(By.xpath(\"\")); // I want to get all child elements // i
Here's another way to get the direct children of an element:
element.findElement(By.xpath("./*"));