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()區別