开源测试工具 Selenium 暴力插件 - Violent-Webdriver

泰斯特 · 2019年11月02日 · 最后由 simple 回复于 2019年11月10日 · 1754 次阅读

violent-webdriver

violent-webdriver 诞生于二次封装 selenium webdriver,内部封装了许多方法来确保浏览器操作的执行性,你不需要去担心定位到的元素是否存在于当前页面或者元素是否在当前时刻处于可点击状态,报错重试机制可以帮你自动解决这些不必要的麻烦。

开源地址 : https://github.com/amazingTest/violent-webdriver

安装

The last stable release is available on PyPI and can be installed with pip.
make sure that Chrome has been installed and match the selenium version

pip install selenium

pip install violent-webdriver

最佳实践

Firstly, create a python file: c:\folder\mytest.py

# c:\folder\mytest.py
from violent_webdriver import Chrome

dr = Chrome.violent_chromedriver(executable_path=[CHROMEDRIVER_PATH], use_mobile_emulation=True)
dr.get('http://www.baidu.com')
dr.v_send_keys(locate_rule={'css selector': 'input[name=\'word\']'}, message='test')
dr.v_click(locate_rule={'css selector': 'button[class=\'se-bn\']'})

then use your IDE to run this script or

python c:\folder\mytest.py

if successful, you will see the search result of 'test' by a mobile emulated browser

For more code examples, please refer to the examples folder in source distribution or
visit https://github.com/amazingTest/violent-webdriver/tree/master/examples

使用教程

点击进入简易使用教程

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 6 条回复 时间 点赞

我感觉你在开车,但是我没有证据

尚酷米 回复

别乱说,我没有。😂

java 的有吗

Guan 回复

java 的没做,但实现理念是一样的可以自行改造一波

这个还是挺有意思的

希望持续的维护下去,支持一下

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册