Skip to main content

Ignores all ChromeDriver Exceptions, returns the Exception(s) as string

# Tested with:
# https://github.com/ultrafunkamsterdam/undetected-chromedriver
# Python 3.9.13
# Windows 10


$pip install a-selenium-errorhandler

from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By

from a_selenium_errorhandler import add_ignore_exception


if __name__ == "__main__":
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(
        folder_path_for_exe=folderchromedriver, undetected=True
    )
    driver = uc.Chrome(driver_executable_path=path)
    driver = add_ignore_exception(driver)

    # You can check if an executed command threw an Exception
    e1 = driver.find_element(By.CSS_SELECTOR, "not existing")
    if isinstance(e1, str):
        print("failed")
    else:
        print(e1)
        print("success")
    print("------------------")
    e1 = driver.find_element(By.CSS_SELECTOR, "*")
    if isinstance(e1, str):
        print("failed")
    else:
        print(e1)
        print("success")

Metadata

Release files for a-selenium-errorhandler 0.10

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

Source distribution (sdist)

Source distribution for a-selenium-errorhandler 0.10
File Size Uploaded Provenance Actions
a_selenium_errorhandler-0.10.tar.gz 3.5 kB Without provenance Details for a_selenium_errorhandler-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for a-selenium-errorhandler 0.10
File Interpreter ABI Platform Actions
a_selenium_errorhandler-0.10-py3-none-any.whl Python 3 none any Details for a_selenium_errorhandler-0.10-py3-none-any.whl

Total release size: 8.6 kB

Release files / a_selenium_errorhandler-0.10.tar.gz

Download URL a_selenium_errorhandler-0.10.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4cb7c97a80ba0d3367dac3f383947846b9d386b2329abe82f000f7ed98fb99ee
BLAKE2b-256 checksum
How to use checksums
d17f6f62148da0e73c8589c93f48c6de32ae714d98e4b9c3b05c16f1e20e26a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / a_selenium_errorhandler-0.10-py3-none-any.whl

Download URL a_selenium_errorhandler-0.10-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d0bb644fbfb66125f5464d65d5a2e00765ef3de8578260917ce2563351b4b13
BLAKE2b-256 checksum
How to use checksums
b195aafed1d6651d7aa09b8dcab059f8167024245a979802c2b875d8363ef553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for a-selenium-errorhandler 0.10

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.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

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