All:
Does Google some how prevent searching of elements by id using Xpath?
WebDriver wbdriver = new HtmlUnitDriver();
wbdriver.get("https://www.google.co.in/?gfe_rd=cr&ei=oB5BVNXnOKzV8gePnYDQBA");
WebElement element = wbdriver.findElement(By.xpath("//form[@id='gbqf']"));
I found other tags by name or tagname. However, I've been trying for a really long time to find by Xpath using id.
Does google have restrictions that prevents the aforementioned code from working?
Thanks in advance
Update with Answer
I used FirefoxDriver instead of HtmlUnitDriver
WebDriver driver= new FirefoxDriver();