I\'m trying to follow the Selenium Webdrive Tutorial
http://www.toolsqa.com/selenium-webdriver/headless-browser-testing-selenium-webdriver/
There is a simple te
Use xpath instead of name.
try to use this code:
WebElement searchBox = unitDriver.findElement(By.xpath("//input[@name='q']"));
For search button click:
// find the search button
WebElement button = unitDriver.findElement(By.xpath("//input[@value='Google Search']"));
// Click the button
button.click();