This is the HTML source of the button:
<input value="Google Search" aria-label="Google Search" name="btnK" type="submit">
This is my code:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class google {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver","C://chromedriver_win32//chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.co.in");
//driver.findElement(By.xpath("//*[@id='TZA4S']/div[1]/div[1]/input")).sendKeys("Kedarnath review");
driver.findElement(By.xpath("//*[@id='tsf']/div[2]/div/div[1]/div/div[1]/input")).sendKeys("kedarnath collection");
//driver.findElement(By.xpath("//@id=(//*[@id='tsf']/div[2]/div[3]/input)")).click();
//driver.findElement(By.xpath("//@id=(//*[@id='tsf']/div[2]/div[1]/div[3]//center/input[1]")).click();
/*Issue in below line able to click on Search Button*/
driver.findElement(By.name("btnK")).click();