异步Web驱动程序

arsenic的Python项目详细描述


异步Webdriver

CircleCIDocumentation StatusBrowserStack StatusAppveyor statusPyPI versionCode style: blackLicense

异步webdriver客户端基于asyncio构建。

快速启动

让我们运行一个本地firefox实例。

fromarsenicimportget_sessionfromarsenic.browsersimportFirefoxfromarsenic.servicesimportGeckodriverasyncdefexample():# Runs geckodriver and starts a firefox sessionasyncwithget_session(Geckodriver(),Firefox())assession:# go to example.comawaitsession.get('http://example.com')# wait up to 5 seconds to get the h1 element from the pageh1=awaitsession.wait_for_element(5,'h1')# print the text of the h1 elementprint(awaith1.get_text())

有关详细信息,请检查the documentation

BrowserStack支持的CI

某些浏览器的持续集成由Browserstack慷慨地提供。

Browserstack

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带Maven的Eclipse Java存储库:缺少工件:compile   java如何以编程方式停止RMI服务器并通知所有客户端   java Roboguice抛出ClassNotFoundException:AnnotationDatabaseImpl   java为什么lucene 4.0删除IndexWriter类的两个构造函数?   nls如何避免java项目上不需要的日志消息?   测试无法在Selenium Webdriver(java)中定位iframe   使用XML的java servlet   java如何使用jxl用****屏蔽单元格   java使用SQLite从数据库中选择“没有这样的列”   导入扫描程序后出现java编译错误   插入查询的java空指针异常   使用创建PostgreSQL数据库。Java应用中的sql脚本   java使用jsoup将HTML解析为格式化的明文