第三步:在eclipse中添加以下语句,运行脚本就可以了
注意:这里添加的路径就是你利用%APPDATA%\Mozilla\Firefox\Profiles找到的文件
查看源代码打印帮助1 FirefoxProfile profile = new FirefoxProfile(new File("C:\\Users\\qinfei\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\z7vfso1m.default"));
2 driver = new FirefoxDriver(profile);
提示:大家请不要使用23.0版本的firefox,因为这个版本问题多多,会让你纠结到底代码错了还是浏览器出问题了~~所以最好使用22.0版本的