DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("marionette", true);
String baseUrl = "https://www.google.co.in/?gfe_rd=cr&dcr=0&ei=SiwuWq0Rx5xfj9ug2Aw";
System.setProperty("webdriver.gecko.driver", "D:\\Geco\\geckodriver\\geckodriver.exe");
driver=new ChromeDriver(capabilities);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get(baseUrl);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
//driver.findElement(By.id("lst-ib")).sendKeys("test");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
尝试使用selenium网络驱动程序搜索谷歌搜索按钮,但它无法正常工作。