为什么我不能使用Selenium Chrome驱动程序

aldhafera.h

我尝试使用ChromeDrive,但出现错误或无法正常运行。

我用于测试的简单Java代码是:

@Test
public void testGoogleSearch() {
  System.setProperty("webdriver.chrome.driver", "lib\\chromedriver.exe");

  WebDriver driver = new ChromeDriver();
  driver.get("http://www.google.com/xhtml");
  Thread.sleep(5000);  // Let the user actually see something!
  WebElement searchBox = driver.findElement(By.name("q"));
  searchBox.sendKeys("ChromeDriver");
  searchBox.submit();
  Thread.sleep(5000);  // Let the user actually see something!
  driver.quit();
}

遵循本教程:https : //sites.google.com/a/chromium.org/chromedriver/getting-started

在此处输入图片说明

aldhafera.h

解决了

我需要更新ChromeDrive并替换以前的ChromeDrive。在我的项目目录/ lib下

在此处下载:https : //sites.google.com/a/chromium.org/chromedriver/downloads

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Python Selenium Chrome Web驱动程序

Selenium Chrome驱动程序74.0.3729.6问题

为什么 selenium 找不到 chrome 驱动程序?

使用Chrome驱动程序查找元素

Selenium Webdriver和Chrome驱动程序-无法运行Chrome驱动程序

不能将chrome驱动程序用于Selenium

让Selenium Chrome驱动程序启动“真正的” Chrome

检测到带有chrome驱动程序的Python Selenium Web驱动程序

为什么我不能使用下载的引导程序

Selenium Webdriver不会退出Chrome驱动程序

Selenium Chrome驱动程序无法选择或输入登录

如何设置Selenium Chrome驱动程序的键入速度?

如何允许chrome驱动程序下载多个文件 - selenium

Java Selenium Chrome驱动程序-禁用图像加载

Rails:Capyabra / Selenium Chrome驱动程序设置

Python Selenium Chrome 驱动程序找不到元素

在 element selenium python chrome 驱动程序中查找元素

如何强制Chrome使用WebSA的Mesa软件驱动程序

Selenium Chrome驱动程序和Travis CI不能一起使用

为什么我们需要下载浏览器(IE,Chrome)驱动程序

将PHP升级到版本7后,为什么不能使用mongodb驱动程序?

将PHP升级到版本7后,为什么不能使用mongodb驱动程序?

Ubuntu 16.04“ Nvidia GPU驱动程序”不能使用专有驱动程序

如何在使用chrome驱动程序/ firefox驱动程序时更改Webdriver中的文件下载位置

为什么内核使用默认的块驱动程序而不是我的驱动程序代码?

为什么我不能使用rclone访问我的NAS驱动器?

为什么不能使用python和Chrome Webdriver单击Selenium中的一个元素?

为什么我不能使用systemd停止我的Mojo应用程序?

我无法删除驱动程序的驱动程序软件