使用 Firefox 的 Selenium Webdriver
System.setProperty("webdriver.firefox.marionette", "c:\\geckodriver-0.24.0-win64.exe");
WebDrier driver = new FirefoxDriver();
driver.get("http://localhost/index.html");
浏览器已打开,但无法加载页面。错误: 造成原因:
org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:45855/hub/status] to be available after 45002 ms
Caused by:
java.util.concurrent.TimeoutException
最佳答案
如下更改第一行。
System.setProperty("webdriver.gecko.driver","c:\geckodriver-0.24.0-win64.exe");
关于java - Selenium 火狐无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55957023/