Skip to content

Latest version Python 3.11 | 3.12 | 3.13+ Apache 2.0 license Codecov CodeQL Test Downloads

Browserist – Python Extension for Selenium 👨‍💻#

What is Browserist?#

browserist 1. The belief that web browsers account for differences in websites or web applications in all of their ability and that a particular web browser is superior to others. 2. Discrimination or prejudice based on web browser.

Despite the urban definition, Browserist is a Python extension of the Selenium web driver that makes it even easier to use different browsers for testing and automation.

Key Features#

With Browserist as an extension to Selenium, you get:

✅   Improved stability and speed

✅   Simple syntax and less code

✅   Hassle-free setup across browsers: Chrome, Firefox, Edge, Safari, Internet Explorer

✅   Extensive framework of functions that makes browser automation easy

✅   Efficient development workflow with IntelliSense and type hints

Example#

Imagine you want to fill out a form on a website. Here's how easy it is with Browserist: We open an automated browser session, access the website, fill out the form, and then submit it. The browser will hereafter close automatically:

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
from browserist import Browser

with Browser() as browser:
    browser.open.url("https://example.com")

    browser.input.value("//xpath/to/name_field", "My Name")
    browser.input.value("//xpath/to/email_field", "contact@example.com")
    browser.input.value("//xpath/to/phone_field", "123-456-7890")
    browser.input.value("//xpath/to/address_field", "123 Main St, Anytown USA")

    browser.click.button("//xpath/to/submit_button")

If you're new to XPath — a powerful query language used to target elements of a web page — don't worry. You can find out more in the XPath basics tutorial.

Next Steps#

Ready to try? Let's get started.

For Selenium users, learn more about how Browserist is different from Selenium.

Support the Project#

If you have already downloaded and tried the package – maybe even used it in a production environment – perhaps you would like to support its development?

Become a Sponsor

If you find this project helpful, please consider supporting its development. Your donations will help keep it alive and growing. Every contribution, no matter the size, makes a difference.

Donate on GitHub Sponsors

Thank you for your support! 🙌