a-selenium-errorhandler


Namea-selenium-errorhandler JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_selenium_errorhandler
SummaryIgnores all ChromeDriver Exceptions, returns the Exception(s) as string
upload_time2023-01-01 11:07:04
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords selenium automation exception
VCS
bugtrack_url
requirements selenium
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Ignores all ChromeDriver Exceptions, returns the Exception(s) as string


```python
# 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")
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_selenium_errorhandler",
    "name": "a-selenium-errorhandler",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Selenium,automation,Exception",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d1/7f/6f62148da0e73c8589c93f48c6de32ae714d98e4b9c3b05c16f1e20e26a7/a_selenium_errorhandler-0.10.tar.gz",
    "platform": null,
    "description": "\n# Ignores all ChromeDriver Exceptions, returns the Exception(s) as string\n\n\n```python\n# Tested with:\n# https://github.com/ultrafunkamsterdam/undetected-chromedriver\n# Python 3.9.13\n# Windows 10\n\n\n$pip install a-selenium-errorhandler\n\nfrom auto_download_undetected_chromedriver import download_undetected_chromedriver\nimport undetected_chromedriver as uc\nfrom selenium.webdriver.common.by import By\n\nfrom a_selenium_errorhandler import add_ignore_exception\n\n\nif __name__ == \"__main__\":\n    folderchromedriver = \"f:\\\\seleniumdriver2\"\n    path = download_undetected_chromedriver(\n        folder_path_for_exe=folderchromedriver, undetected=True\n    )\n    driver = uc.Chrome(driver_executable_path=path)\n    driver = add_ignore_exception(driver)\n\n    # You can check if an executed command threw an Exception\n    e1 = driver.find_element(By.CSS_SELECTOR, \"not existing\")\n    if isinstance(e1, str):\n        print(\"failed\")\n    else:\n        print(e1)\n        print(\"success\")\n    print(\"------------------\")\n    e1 = driver.find_element(By.CSS_SELECTOR, \"*\")\n    if isinstance(e1, str):\n        print(\"failed\")\n    else:\n        print(e1)\n        print(\"success\")\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Ignores all ChromeDriver Exceptions, returns the Exception(s) as string",
    "version": "0.10",
    "split_keywords": [
        "selenium",
        "automation",
        "exception"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "51b470e1fd41959224f6592f77aee61c",
                "sha256": "9d0bb644fbfb66125f5464d65d5a2e00765ef3de8578260917ce2563351b4b13"
            },
            "downloads": -1,
            "filename": "a_selenium_errorhandler-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51b470e1fd41959224f6592f77aee61c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5127,
            "upload_time": "2023-01-01T11:07:03",
            "upload_time_iso_8601": "2023-01-01T11:07:03.400298Z",
            "url": "https://files.pythonhosted.org/packages/b1/95/aafed1d6651d7aa09b8dcab059f8167024245a979802c2b875d8363ef553/a_selenium_errorhandler-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "5069e1b3efbc3d2efe382b55f7eb3e74",
                "sha256": "4cb7c97a80ba0d3367dac3f383947846b9d386b2329abe82f000f7ed98fb99ee"
            },
            "downloads": -1,
            "filename": "a_selenium_errorhandler-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "5069e1b3efbc3d2efe382b55f7eb3e74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3475,
            "upload_time": "2023-01-01T11:07:04",
            "upload_time_iso_8601": "2023-01-01T11:07:04.960184Z",
            "url": "https://files.pythonhosted.org/packages/d1/7f/6f62148da0e73c8589c93f48c6de32ae714d98e4b9c3b05c16f1e20e26a7/a_selenium_errorhandler-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-01 11:07:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "a_selenium_errorhandler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "selenium",
            "specs": []
        }
    ],
    "lcname": "a-selenium-errorhandler"
}
        
Elapsed time: 0.03027s