异步Web驱动程序
arsenic的Python项目详细描述
异步Webdriver
异步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慷慨地提供。