2014-3-26 00:44| 发布者: tianzc| 查看: 792| 评论: 0
第三步:在eclipse中添加以下语句,运行脚本就可以了 注意:这里添加的路径就是你利用%APPDATA%MozillaFirefoxProfiles找到的文件 查看源代码打印帮助1 FirefoxProfile profile = new FirefoxProfile(new File("C:UsersqinfeiAppDataRoamingMozillaFirefoxProfilesz7vfso1m.default")); 2 driver = new FirefoxDriver(profile); 提示:大家请不要使用23.0版本的firefox,因为这个版本问题多多,会让你纠结到底代码错了还是浏览器出问题了~~所以最好使用22.0版本的 |