所以这就是问题:基本上我正试图用selenium调用Firefox浏览器 .
package basics;
import org.openqa.selenium.WebDriver;
public class BrowserInvocation {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe");
WebDriver driver=new FirefoxDriver();
// There is no import option displaying when mouse over FirefoxDriver such as **import org.openqa.selenium.firefox.FirefoxDriver;**
控制台输出:
线程“main”中的异常java.lang.Error:未解决的编译问题:FirefoxDriver无法解析为basics.firefox.main中的类型(firefox.java:19)
我正在使用所有软件的最新版本(截至2017年5月15日),如firefox,java,eclipse和selenium . 我使用32位版本和64位版本 . 尝试删除所有内容并重新设置环境,但没有运气 .
我尝试在Chrome驱动程序的相同环境中调用chrome,至少我可以调用浏览器 .