Selenium Webdriver 学习:css
http://jarvi.iteye.com/category/203994html
https://github.com/easonhan007/webdriver_guidejava
Selenium WebDriver经验杂记:
http://blog.csdn.net/ant_yan/article/details/8185899
http://blog.csdn.net/aerchi/article/category/936247git
1. Selenium Webdriver java 浏览器中前进,后退,刷新操做。github
System.setProperty("webdriver.firefox.bin","D:/Mozilla Firefox/firefox.exe"); WebDriver driver = new FirefoxDriver(); driver.manage().window().maximize(); driver.get("http://www.google.com.hk"); driver.navigate().forward(); // 前进 driver.navigate().back(); // 后退 driver.navigate().refresh(); // 刷新
2. TestNG实例:web
http://blog.csdn.net/yuxinlong2006/article/details/6765522windows
http://magustest.com/blog/automationtesting/webdriver-testng/浏览器
WebDriver+TestNG+ANT 实现多浏览器兼容性测试安全
http://www.51testing.com/?uid-375957-action-viewspace-itemid-817942session
3. Webdriver 针对iframe中的元素定位
切换主页
用getWindowHandle()方法能够快速的进行切换回主页: String strMainHandler = driver.getWindowHandle(); driver.switchTo().window(strMainHandler);关于iframe中 元素定位和xpath, cssSelector定位可参考: http://blog.csdn.net/dancedan/article/details/74069424. Webdriver中操做下拉列表
5. Webdriver 利用Actions类模拟鼠标和键盘的操做
6. webdriver 中 层级定位
参见:http://jarvi.iteye.com/blog/1448025
7. webdriver 执行js脚本
http://jarvi.iteye.com/blog/1447755
8. webdriver 等待页面加载完成
http://jarvi.iteye.com/blog/1453662
9. Webdriver 经过调用JavascriptExecutor 使对象隐藏对象出现,操做对象。
http://blog.sina.com.cn/s/blog_539a70d30101ajsg.html
10.Selenium中webdriver的quit()和close()区别