easy-chrome


Nameeasy-chrome JSON
Version 2.0.3 PyPI version JSON
download
home_page
Summaryselenium chrome extension with shortcuts to control driver and element
upload_time2023-11-08 04:37:03
maintainer
docs_urlNone
authorVanCuong
requires_python>=3.9
licenseMIT
keywords easy chrome chrome_driver selenium chromedriver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Easy Chrome

## Description

This package is used as an extension to selenium chrome WebDriver. It contains shortcuts to control driver more easily.

## Features

1. Auto download chromedriver by webdriver_manager with custom cache.
2. Shortcuts to control driver and element.


## Examples

- init chrome driver.

```
from easy_chrome import Driver
driver = Driver.set_chrome(detach_mode=True)
```

- wait an element located by XPATH to be visible in DOM.

```
// bare usage
WebDriverWait(driver, wait_time).until(EC.visibility_of_element_located((By.XPATH, xpath))

// with easy-chrome
driver.wait_visible(xpath)
```

- get local storage.

```
// bare usage
driver.execute_script("return window.sessionStorage.getItem(arguments[0]);", key)

// with easy-chrome
driver.get_local_storage(key)
```

- wait username input field to be visible in DOM, clear the content and write username to it.

```
input_xpath = "//input[@id='username']

// bare usage
WebDriverWait(driver, wait_time).until(EC.visibility_of_element_located((By.XPATH, input_xpath)).clear()
sleep(0.2)
WebDriverWait(driver, wait_time).until(EC.visibility_of_element_located((By.XPATH, input_xpath)).sendkeys(username)

// with easy-chrome
driver.wait_visible(input_xpath).clear_and_type(user_name)
```

## Source Code

The source code is currently hosted on GitHub at: https://github.com/wcuong/easy-chrome


## Release

The package is currently hosted on Pypi at: https://pypi.org/project/easy-chrome/


## ChangeLog
### 2.0.1 2023-11-04
- Init project
    
### 2.0.2 2023-11-06
- Change headless mode to --headless=new
- Ignore DownloadBubble Feature, which enforces an download popup in incognito mode.

### 2.0.3 2023-11-08
- add custom windows chrome detect method because sometimes webdriver_manager fails to detect.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "easy-chrome",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "easy chrome chrome_driver selenium chromedriver",
    "author": "VanCuong",
    "author_email": "vuvancuong94@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/28/37/c760c33316e993fe93e5fd7ab0f98e3fcc3dc02b93695037ef7737d55ce1/easy-chrome-2.0.3.tar.gz",
    "platform": null,
    "description": "# Easy Chrome\r\n\r\n## Description\r\n\r\nThis package is used as an extension to selenium chrome WebDriver. It contains shortcuts to control driver more easily.\r\n\r\n## Features\r\n\r\n1. Auto download chromedriver by webdriver_manager with custom cache.\r\n2. Shortcuts to control driver and element.\r\n\r\n\r\n## Examples\r\n\r\n- init chrome driver.\r\n\r\n```\r\nfrom easy_chrome import Driver\r\ndriver = Driver.set_chrome(detach_mode=True)\r\n```\r\n\r\n- wait an element located by XPATH to be visible in DOM.\r\n\r\n```\r\n// bare usage\r\nWebDriverWait(driver, wait_time).until(EC.visibility_of_element_located((By.XPATH, xpath))\r\n\r\n// with easy-chrome\r\ndriver.wait_visible(xpath)\r\n```\r\n\r\n- get local storage.\r\n\r\n```\r\n// bare usage\r\ndriver.execute_script(\"return window.sessionStorage.getItem(arguments[0]);\", key)\r\n\r\n// with easy-chrome\r\ndriver.get_local_storage(key)\r\n```\r\n\r\n- wait username input field to be visible in DOM, clear the content and write username to it.\r\n\r\n```\r\ninput_xpath = \"//input[@id='username']\r\n\r\n// bare usage\r\nWebDriverWait(driver, wait_time).until(EC.visibility_of_element_located((By.XPATH, input_xpath)).clear()\r\nsleep(0.2)\r\nWebDriverWait(driver, wait_time).until(EC.visibility_of_element_located((By.XPATH, input_xpath)).sendkeys(username)\r\n\r\n// with easy-chrome\r\ndriver.wait_visible(input_xpath).clear_and_type(user_name)\r\n```\r\n\r\n## Source Code\r\n\r\nThe source code is currently hosted on GitHub at: https://github.com/wcuong/easy-chrome\r\n\r\n\r\n## Release\r\n\r\nThe package is currently hosted on Pypi at: https://pypi.org/project/easy-chrome/\r\n\r\n\r\n## ChangeLog\r\n### 2.0.1 2023-11-04\r\n- Init project\r\n    \r\n### 2.0.2 2023-11-06\r\n- Change headless mode to --headless=new\r\n- Ignore DownloadBubble Feature, which enforces an download popup in incognito mode.\r\n\r\n### 2.0.3 2023-11-08\r\n- add custom windows chrome detect method because sometimes webdriver_manager fails to detect.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "selenium chrome extension with shortcuts to control driver and element",
    "version": "2.0.3",
    "project_urls": {
        "Source": "https://github.com/wcuong/easy-chrome"
    },
    "split_keywords": [
        "easy",
        "chrome",
        "chrome_driver",
        "selenium",
        "chromedriver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e5d2c1b0c8240ebd38669c4667ae81103b1a70f70eff4d09cb2b3782c320fea",
                "md5": "aa45c26022bb7e23def89044a90f5c64",
                "sha256": "14f85febdaa572074c8e17a9d98d11ef60bba9b308eb6752bcb02829427b241e"
            },
            "downloads": -1,
            "filename": "easy_chrome-2.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa45c26022bb7e23def89044a90f5c64",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8729,
            "upload_time": "2023-11-08T04:37:00",
            "upload_time_iso_8601": "2023-11-08T04:37:00.467705Z",
            "url": "https://files.pythonhosted.org/packages/6e/5d/2c1b0c8240ebd38669c4667ae81103b1a70f70eff4d09cb2b3782c320fea/easy_chrome-2.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2837c760c33316e993fe93e5fd7ab0f98e3fcc3dc02b93695037ef7737d55ce1",
                "md5": "b5ec8417ee4677b22a0f20e25d7e2ef2",
                "sha256": "9ac6205f45f5838d306a7837fd89ac99aa3013230bfae6ec595e8b36cd8fa7f7"
            },
            "downloads": -1,
            "filename": "easy-chrome-2.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b5ec8417ee4677b22a0f20e25d7e2ef2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 8430,
            "upload_time": "2023-11-08T04:37:03",
            "upload_time_iso_8601": "2023-11-08T04:37:03.676968Z",
            "url": "https://files.pythonhosted.org/packages/28/37/c760c33316e993fe93e5fd7ab0f98e3fcc3dc02b93695037ef7737d55ce1/easy-chrome-2.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-08 04:37:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wcuong",
    "github_project": "easy-chrome",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "easy-chrome"
}
        
Elapsed time: 0.13139s