第10周4月26日;主题:Selenium 2自动化测试
Part I:回顾及提问
===========================
1.自动化测试的优势?
2.阅读以下代码,说出其功能。
public static void StartFireFoxLoadPlugin(){ 2 System.out.println("start firefox browser..."); 3 System.setProperty("webdriver.firefox.bin", 4 "D:/Program Files/Mozilla Firefox/firefox.exe"); 5 File file = new File("files/firebug-2.0.7-fx.xpi"); 6 FirefoxProfile profile = new FirefoxProfile(); 7 try { 8 profile.addExtension(file); 9 } catch (IOException e) { 10 e.printStackTrace(); 11 } 12 profile.setPreference("extensions.firebug.currentVersion", "2.0.7"); 13 //active firebug extensions 14 profile.setPreference("extensions.firebug.allPagesActivation", "on"); 15 WebDriver driver = new FirefoxDriver(profile); 16 driver.get("http://www.baidu.com"); 17 System.out.println("start firefox browser succeed..."); 18 }
Part II:目标练习说明
===========================
Part III:知识点学习
===========================
第5章 Selenium2自动化测试
学习目标:能够对B/S系统的模块功能进行自动化测试。
5.5 Selenium2中的元素定位
Part IV:完成目标练习
===========================
1.完成目标练习后,将类文件压缩打包,压缩包名为“学号+姓名+实验7”,提交到ftp服务器(ftp://192.168.42.254:22)上自己的文件夹内。

浙公网安备 33010602011771号