webdriver模拟鼠标操作

ActionChains 生成模拟用户操作的对象

from selenium.webdriver.common.action_chains import ActionChains

ActionChains(driver):用于生成模拟用户行为

perform():执行存储行为

鼠标事件:

 模拟鼠标事件例子:

--》

 

--》

 

 

键盘事件:send_keys()

 首先定位输入框

又再次输入了python 

 

可以做搜索测试   

猜你喜欢

转载自www.cnblogs.com/hmm1995/p/10408840.html