Skip to main content

Niobium extends the Python Selenium client with nice features

Project description

Niobium

Niobium extends the Python Selenium client with nice features.

Why Niobium

Selenium is probably the better tool for web automation. But sometimes it's hard to write a clean automation script.

With Niobium you can keep using Selenium and simplify your scripts. For example, Niobium adds a new element locator, find_element_by_image, which adds image recognition capacity in order to find an element in the webpage.

The goal of Niobium is not to replace Selenium. We only want to add to Selenium the functions we will love to see in Selenium natively.

Niobium philosophy is to keep as simple as possible.

Installation

Niobium is available on Pypi, so simply use pip.

pip install niobium

Getting Started

In order to use Niobium, you just need to import it in your script. Selenium will be automatically extended.

# -*- coding: utf-8 -*-
from selenium import webdriver
import niobium

driver = webdriver.Firefox()
driver.implicitly_wait(10)
driver.get("https://www.python.org/")

driver.find_element_by_image("logo_python.png")

driver.quit()

In order to avoid warning with your linter, you can import selenium from niobium.

# -*- coding: utf-8 -*-
from niobium import selenium

driver = selenium.webdriver.Firefox()
...

or simply disable the warning, like in this example for flake8

# -*- coding: utf-8 -*-
from selenium import webdriver
import niobium  # noqa: F401

driver = webdriver.Firefox()
...

If you use pytest and especially pytest-selenium, just import niobium in your conftest.py.

Documentation

https://niobium.readthedocs.io/

Warnings

Some features implemented in Niobium are here only to help you when there is no other easy solution. If you do a bad usage of Niobium features, it can result to a bad performance in your script, or it will be difficult to maintain it. Please read the documentation in order to know the special warnings for the use of these features.

Niobium do not modify the Selenium library package. The patches are only applied at runtime.

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

niobium-0.3.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

niobium-0.3.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file niobium-0.3.1.tar.gz.

File metadata

  • Download URL: niobium-0.3.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for niobium-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a3f674917db28940fc76a6c343cd4e47cca19146e0d6d2870ce5454c7b79f54d
MD5 5ed7c4b9e40f1a4eddebe542ccdc6bc0
BLAKE2b-256 e5d34594cbab428669d1d2b32c4a501a4b7f68687de1d0e65fc6a72f376ba43c

See more details on using hashes here.

File details

Details for the file niobium-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: niobium-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for niobium-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6eb93136fd43a6b37b550d57ad42eef6a5cf62b6a765581d41a1d0db9b80176
MD5 178f156d1b03376055bae4e56079cfff
BLAKE2b-256 8b8f0bfa13ea5087c287a5ed70d10bfd8101730e4ea9d86f55453f9b7c2caedc

See more details on using hashes here.

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