[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1031139: ITP: arsenic -- Asynchronous WebDriver client



Package: wnpp
Severity: wishlist
Owner: Gianfranco Costamagna <locutusofborg@debian.org>

* Package name    : arsenic
  Version         : 21.8
  Upstream Author : Jonas Obrist <jonas.obrist@hennge.com>
* URL             : https://github.com/HDE/arsenic
* License         : Apache-2.0
  Programming Lang: Python
  Description     : Asynchronous WebDriver client

Binary package names: python3-arsenic
 Asynchronous webdriver client built on asyncio.
 .
 Let's run a local Firefox instance.
 .
 from arsenic import get_session
 from arsenic.browsers import Firefox
 from arsenic.services import Geckodriver
 .
 .
 async def example():
     # Runs geckodriver and starts a firefox session
     async with get_session(Geckodriver(), Firefox()) as session:
           # go to example.com
           await session.get('http://example.com')
           # wait up to 5 seconds to get the h1 element from the page
           h1 = await session.wait_for_element(5, 'h1')
           # print the text of the h1 element
           print(await h1.get_text())

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: