我的代碼是網址無法打開與webdriver的
package mentor.qa.selenium;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class WDDemo1 {
public static void main(String[] args){
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
}
}
我使用的是最新的Java jar文件2.47.1和Firefox 41.0.1。它啓動Firefox,但不會去鏈接。我該如何解決這個問題?
你有任何額外的錯誤消息,堆棧跟蹤或日誌? – Sebastian
問題中有5個警告。構建路徑指定執行環境javaSE-1.7。工作區中沒有安裝與此環境嚴格兼容的JRE。 –
[Selenium WebDriver.get(url)可能的重複不會打開URL](http://stackoverflow.com/questions/7347494/selenium-webdriver-geturl-does-not-open-the-url) – Lucky