package Mail;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Login {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver = new FirefoxDriver();
String url = "www.126.com";
driver.get(url);
}
}
报错信息:Caused by: org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
原因:url地址不完成,例如www.126.com。
解决方法:修改为String url=”http://www.126.com”。