gpt4 book ai didi

java - chrome 无法在 Selenium Webdriver 中运行。我正在使用 selenium 3.0.1 chrome v-54.0

转载 作者:搜寻专家 更新时间:2023-11-01 03:47:40 24 4
gpt4 key购买 nike

public class sikuli {

public static void main(String[] args) throws Exception {
//Screen screen=new Screen();
//screen.click("//home//exeter//Pictures//googlechrome.png");
System.setProperty("webdriver.chrome.driver","//home//exeter//Documents//chromedriver");
WebDriver driver=new ChromeDriver();
driver.get("https://mail.google.com");

Starting ChromeDriver 2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3) on port 11320 Only local connections are allowed. Oct 19, 2016 10:07:22 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end Oct 19, 2016 10:08:22 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: OSS Exception in thread "main" org.openqa.selenium.NoSuchSessionException: no such session (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.0-43-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 9 milliseconds Build info: version: 'unknown', revision: '350cf60', time: '2016-10-13 10:43:56 -0700' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{message=unknown error: Chrome failed to start: exited abnormally

最佳答案

看起来您是在 Linux 机器上运行,所以“chromedriver”(没有 .exe)应该没问题。只需确保您拥有最新的 chrome 和最新的 chrome 驱动程序版本,并且您拥有正确的“chromedriver”文件(64 位版本)。

关于java - chrome 无法在 Selenium Webdriver 中运行。我正在使用 selenium 3.0.1 chrome v-54.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40122423/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com