Skip to main content

Elemental

Elemental makes Selenium automation faster and easier.

Adds common use-cases

Common use-cases missing from Selenium are built into Elemental. Get an input by its label or placeholder? Can do. Get a button by its text or type? Sure. Get an element’s parent? Yep. Get the fourth element in a list? No problem.

Automatic waiting

Elemental has built-in automatic waiting so that your automation is less flaky. It has a sensible default which can be overriden when necessary.

The full power of Selenium

For complex operations which require the full power of the Selenium, Elemental gives you easy access to 100% of Selenium’s API.

Terse, clean API

Write less code than you would if you were using Selenium directly. The Elemental API is terse and internally consistent while still being explicit and unambiguous.

The power of Elemental

import elemental

# Set up.
browser = elemental.Browser()

# Search PyPI for Elemental.
browser.visit("https://www.pypi.org")
browser.get_input(placeholder="Search projects").fill("elemental")
browser.get_button(type="submit").click()

# Click the first search result.
browser.get_element(partial_text="elemental").click()

# Confirm that Elemental's PyPI page was found.
assert browser.title == "elemental · PyPI"

# Tear down.
browser.quit()

Installation

$ pip install elemental

Development

Get set up, preferably in a virtualenv:

$ make init
$ make install

Lint the code:

$ make lint

Run the tests:

$ make test

Build the docs:

$ cd docs
$ make html

Releasing

  1. Check out the main branch.

  2. Ensure CHANGELOG.rst includes everything to go in the release and is committed.

  3. Ensure everything to go in the release is committed.

  4. Increment the version in elemental/__init__.py and docs/source/conf.py.

  5. Shift everything in the Unreleased section of CHANGELOG.rst to a new section named with the new version number and the current date.

  6. Ensure CI runs without warnings or errors:

    $ make ci
  7. Make and tag the release commit:

    $ make release
  8. Build the package:

    $ make package
  9. Publish the package to PyPI:

    $ make publish
  10. Push to the repo and clean up packaging artifacts:

    $ make push
    $ make clean
  11. Create a GitHub release.

Code style

  1. Only modules are imported. Classes, functions and variables are not imported directly.

  2. A module’s functions are ordered alphabetically.

  3. A module’s private functions are placed alphabetically at the bottom of the module.

  4. Docstrings follow the NumPy docstring guide.

  5. Strings are enclosed with double quotes.

  6. The last item of a multi-line dictionary or list has a trailing comma.

Changes

For what has changed in each version, see CHANGELOG.rst.

Metadata

Release files for elemental 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elemental 0.4.0
File Size Uploaded Provenance
elemental-0.4.0.tar.gz 19.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for elemental 0.4.0
File Interpreter ABI Platform
elemental-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.0 kB

Release files / elemental-0.4.0.tar.gz

Download URL elemental-0.4.0.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cbee48f864f0faac170479060f8af013ace632851c8c20086f02fb2296d3a498
BLAKE2b-256 checksum
How to use checksums
99a39485ca7e38dc56a86211244ce30babf7e6f7a7cd2d931bee15ef4ea4102f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

Release files / elemental-0.4.0-py3-none-any.whl

Download URL elemental-0.4.0-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c60f71cdbd8a112fd193025cb98572d44b854f2d8dace889472bbac582eacd9c
BLAKE2b-256 checksum
How to use checksums
555bbba9a7f723cfa22b5c5b410dfd443ee324d053ad44872143c3a19bcf4288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

Security for elemental 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page