https://github.com/easonhan007/webdriver_guide 乙醇的github
http://selenium.googlecode.com/git/docs/api/py/api.html#webdriver-common webdriver python api
http://blog.163.com/yang_jianli/blog/static/161990006201281831228222/ selenium API
http://www.cnblogs.com/fnng/p/3183777.html 学习应用网站
http://blog.163.com/ly676830315@126/blog/static/10173372220131022113452843/ 弹出新的窗口的识别
http://blog.csdn.net/nbkhic/article/details/6897070
http://www.51testing.com/html/34/n-848334-2.html 应用
内容总结为:
def test_baidu_yinyue(self):
driver = self.driver
driver.get(self.base_url + " ")
time.sleep(3)
driver.find_element_by_link_text("音 乐").click()
if driver.current_url == 'http://music.baidu.com/':
print '不错'
print driver.title
time.sleep(3)
driver.find_element_by_link_text("新闻").click()
print driver.current_url
driver.maximize_window()
time.sleep(2)
driver.back()
print driver.current_url
time.sleep(2)
driver.forward()
time.sleep(2)
print driver.current_url
注:
#-*- coding:utf-8 -*- 如果不认识link 则需要加上这个。
==================================
=====================