Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
/ pyasli Public archive

Yet Another Selenium Instruments for python

License

Notifications You must be signed in to change notification settings

outcatcher/pyasli

Repository files navigation

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