为了账号安全,请及时绑定邮箱和手机立即绑定

我无法使用 Selenium WebBrowser Java 打开任何东西

我无法使用 Selenium WebBrowser Java 打开任何东西

达令说 2021-10-13 12:42:07
我正在尝试使用 Selenium 打开本地文件。使用下面的代码,Firefox 正在打开,但出现错误org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start..    File gecko = new File("resources/geckodriver64.exe");    System.setProperty("webdriver.gecko.driver", gecko.getAbsolutePath());    FirefoxOptions capabilities = new FirefoxOptions();    capabilities.setCapability("marionette", false);    WebDriver driver = new FirefoxDriver(capabilities);    driver.get("file:///C:/example/myfile.pdf");有人能帮我吗 ?我在互联网上找不到任何东西。
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 108 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信