I am using Selenium WebDriver to automate my web application. I am able to find tags using By.xpath.
But I find lots of child nodes within the main node.
I tried the following:
WebElement div1 = driver.findElement( By.xpath( "//div[@id='id_1']" ) )
But I want to find the input, then I tried the following:
driver.findElement(By.xpath( "//div[@id='id_1']//input" ) )
Now I only have div1 and not having its XPath. I want to do the following:
WebElement findInput = driver.findElement(div1, By.xpath("//input"));
But I can see that no such method exists. How to solve this issue?