Skip to main content

(Python) Yet Another Selenium Instruments

Project description

Pyasli

codecov Tests Release PyPI version

Simple selenium python wrapper

There are two ways to use browser:

Use default shared driver:
from pyasli.browsers import browser

browser.base_url = "https://the-internet.herokuapp.com"
browser.open("/disappearing_elements")
element1 = browser.element("div.example p")
assert element1.get_actual() is element1.get_actual(), "Element is found 2 times"
Use exact driver (can be used as context manager):
from pyasli.browsers import BrowserSession

with BrowserSession("chrome", base_url="https://the-internet.herokuapp.com") as browser:
    browser.open("/disappearing_elements")
    element1 = browser.element("div.example p")
    assert element1.get_actual() is element1.get_actual(), "Element is found 2 times"

In case browser_instance is used as context manager, all browser windows will be closed at exiting context


There is no documentation currently. For usage please refer to tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyasli-0.2.8.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

pyasli-0.2.8-py3-none-any.whl (14.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page