Python 官方文档:入门教程 => 点击学习
例:from selenium import WEBdriverb = webdriver.Firefox()b.get("Http://edu.51cto.com/courselist/index.html")ele = b.find_e
例:
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()
--结束END--
本文标题: selenium-3 鼠标事件
本文链接: https://www.lsjlt.com/news/183356.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0