测试运行时间

Selenium -- ActionChains().move_by_offset() 卡顿的解决方法 Python 第1张


运行时间

Selenium -- ActionChains().move_by_offset() 卡顿的解决方法 Python 第2张


SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

发现每次0.5秒,此时需要修改默认的时间

打开Python安装目录下的Lib\site-packages\selenium\webdriver\common\actions\pointer_input.py

修改 DEFAULT_MOVE_DURATION 的值即可,默认为250,=_=||

Selenium -- ActionChains().move_by_offset() 卡顿的解决方法 Python 第3张


修改为6,速度已有明显提升

Selenium -- ActionChains().move_by_offset() 卡顿的解决方法 Python 第4张
Selenium -- ActionChains().move_by_offset() 卡顿的解决方法 Python 第5张




扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄