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

Bug#1118200: ITP: wapiti-arsenic -- Asynchronous webdriver client built on asyncio.



Package: wnpp
X-Debbugs-Cc: debian-devel@lists.debian.org
Owner: Gianfranco Costamagna <locutusofborg@debian.org>
Severity: wishlist

* Package name    : wapiti-arsenic
  Version         : 28.2
  Upstream Contact: HDE Inc
* URL             : https://github.com/HENNGE/arsenic
* License         : Apache-2.0
  Programming Lang: Python
  Description     : Asynchronous webdriver client built on asyncio.

Needed for wapiti

 Let's run a local Firefox instance.
 .
 from wapiti_arsenic import get_session
 from wapiti_arsenic.browsers import Firefox
 from wapiti_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())


Reply to: