Skip to content
Sections
>> Trisquel >> Pakete >> ecne (12.0LTS) >> python >> python3-arsenic
[  ecne  ] [  xolotl  ]
[ Quellcode: arsenic  ]

Paket: python3-arsenic (21.8-2)

Asynchronous WebDriver client

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())

Alternatively also other drivers can be run, e.g. Chromedriver or MSEdgeDriver

Andere Pakete mit Bezug zu python3-arsenic

  • hängt ab von
  • empfiehlt
  • schlägt vor
  • dep: python3
    interactive high-level object-oriented language (default python3 version)
  • dep: python3-aiohttp
    http client/server for asyncio
  • dep: python3-attr
    Attributes without boilerplate (Python 3)
  • dep: python3-structlog
    structured logging for Python (3.x)

python3-arsenic herunterladen

Download für alle verfügbaren Architekturen
Architektur Paketgröße Größe (installiert) Dateien
all 15,6 kB78 kB [Liste der Dateien]