Unable to find the XPath for google home page - Search box.
- Open the Chrome Browser
- Inspect the default Google Search box on chrome browser Reference Image
Refer the image, we have to write the Xpath for Google textarea or search box
driver.findElement(By.Xpath(//input[@id='input'])).sendkeys("testing");
Once we type the text in the search area, google will provide the suggestion based on text, we have to print the console suggested text.
I tried multiple ways to find the XPath but Match element not showing even element presence on webpage.
By.Id('input');
By.Xpath("//input[@id='input']");
By.cssSelector("input#input");
By.Xpath("/html/body/ntp-app//div/div[1]/ntp-realbox//div/inputb");
But Element not finding.