Get all immediate children and nothing deeper August 15, 2023 by Tarik ("*") gives all the child elements of the context node. So use: body.findElement(By.xpath("*"));