a-selenium-kill


Namea-selenium-kill JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_selenium_kill
SummaryA decorator to kill Chrome if Selenium/ChromeDriver got stuck
upload_time2023-01-01 10:35:12
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords selenium automation kill
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# A decorator to kill Chrome if Selenium/ChromeDriver got stuck


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


$pip install a-selenium-kill

from a_selenium_kill import add_kill_selenium
from auto_download_undetected_chromedriver import download_undetected_chromedriver
import undetected_chromedriver as uc

# You have to create the instance in a function, and use the decorator @add_kill_selenium
@add_kill_selenium
def get_driver():
    folderchromedriver = "f:\\seleniumdriver2"
    path = download_undetected_chromedriver(folder_path_for_exe=folderchromedriver, undetected=True)
    driver = uc.Chrome(driver_executable_path=path)
    return driver

if __name__ == "__main__":
    driver = get_driver()
	
	#Kill Chrome:
	
	driver.die_die_die_selenium()
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_selenium_kill",
    "name": "a-selenium-kill",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Selenium,automation,kill",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/cc/50/bb8d798641defa02114330b139e4ae19c8203603fe32311d4d41b6507916/a_selenium_kill-0.10.tar.gz",
    "platform": null,
    "description": "\n# A decorator to kill Chrome if Selenium/ChromeDriver got stuck\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-kill\n\nfrom a_selenium_kill import add_kill_selenium\nfrom auto_download_undetected_chromedriver import download_undetected_chromedriver\nimport undetected_chromedriver as uc\n\n# You have to create the instance in a function, and use the decorator @add_kill_selenium\n@add_kill_selenium\ndef get_driver():\n    folderchromedriver = \"f:\\\\seleniumdriver2\"\n    path = download_undetected_chromedriver(folder_path_for_exe=folderchromedriver, undetected=True)\n    driver = uc.Chrome(driver_executable_path=path)\n    return driver\n\nif __name__ == \"__main__\":\n    driver = get_driver()\n\t\n\t#Kill Chrome:\n\t\n\tdriver.die_die_die_selenium()\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A decorator to kill Chrome if Selenium/ChromeDriver got stuck",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/a_selenium_kill"
    },
    "split_keywords": [
        "selenium",
        "automation",
        "kill"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c72b797158d2a9fe87df6a954b905f8f9bc78bd047d3a810aff42a10f22be7b",
                "md5": "fa7b5d65d6df19febde661929981e7f8",
                "sha256": "d3a790cbdab8b8c974d62eea4e0b9dc3ca46dee1a1190e4bb0d38017229682d3"
            },
            "downloads": -1,
            "filename": "a_selenium_kill-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa7b5d65d6df19febde661929981e7f8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5457,
            "upload_time": "2023-01-01T10:35:10",
            "upload_time_iso_8601": "2023-01-01T10:35:10.683068Z",
            "url": "https://files.pythonhosted.org/packages/9c/72/b797158d2a9fe87df6a954b905f8f9bc78bd047d3a810aff42a10f22be7b/a_selenium_kill-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc50bb8d798641defa02114330b139e4ae19c8203603fe32311d4d41b6507916",
                "md5": "e5090862ec6b26ae39469b1fae0479b3",
                "sha256": "3d5bdf95dec8147f463c629fa5455aca3653114e7496e2c3463eb0d114523b4e"
            },
            "downloads": -1,
            "filename": "a_selenium_kill-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "e5090862ec6b26ae39469b1fae0479b3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4064,
            "upload_time": "2023-01-01T10:35:12",
            "upload_time_iso_8601": "2023-01-01T10:35:12.839949Z",
            "url": "https://files.pythonhosted.org/packages/cc/50/bb8d798641defa02114330b139e4ae19c8203603fe32311d4d41b6507916/a_selenium_kill-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-01 10:35:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "a_selenium_kill",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "a-selenium-kill"
}
        
Elapsed time: 0.97888s