发布时间:2019-07-04 10:04:51编辑:auto阅读(2243)

例:
from selenium import webdriver
b = webdriver.Firefox()
b.get("http://edu.51cto.com/courselist/index.html")
ele = b.find_element_by_link_text("找课程")  #定位找课程元素
from selenium.webdriver.common.actiton_chains import ActionChains
ActionChains(b).move_to_element(ele).perform()         #模拟鼠标停在"找课程"上 出现下拉菜单
ele1 = b.find_element_by_link_text("人工智能")          #在下拉菜单中定位"人工智能"
ele1.click()

上一篇: 自己动手写struts3
下一篇: ceilmeter使用keystone
 51197
 50616
 41238
 38053
 32516
 29423
 28283
 23141
 23098
 21436
 1493°
 2206°
 1830°
 1759°
 2067°
 1817°
 2501°
 4200°
 4062°
 2899°