violent java

编程入门 行业动态 更新时间:2024-10-09 08:26:55

<a href=https://www.elefans.com/category/jswz/34/1763757.html style=violent java"/>

violent java

violent-webdriver

violent-webdriver 诞生于二次封装 selenium 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.pyfrom violent_webdriver import Chrome

dr = Chrome.violent_chromedriver(executable_path=[CHROMEDRIVER_PATH], use_mobile_emulation=True)

dr.get('')

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

使用教程

更多推荐

violent java

本文发布于:2024-02-14 12:59:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1763824.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:violent   java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!