The following is the snippet of WebDriver code using Java:
WebDriver driver = new FirefoxDriver();
driver.get(\"http://www.google.pl/\");
Your xpath expression:
WebElement query = driver.findElement(By.xpath("//html/body/div[2]/span/center/form/table/tbody/tr/td[2]/div/div/input"));
looks correct but if you still are facing the issue please check the correctness of xpath again. If it fails again increase the time for Wait as:
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
or you can use explicit wait for the specific element as below:
WebDriverWait wait = new WebDriverWait(driver, 20);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//html/body/div[2]/span/center/form/table/tbody/tr/td[2]/div/div/input")));