selench


Nameselench JSON
Version 2024.5.2 PyPI version JSON
download
home_pagehttps://github.com/dsymbol/selench
SummarySelenium wrapper for Python
upload_time2024-05-01 21:24:42
maintainerNone
docs_urlNone
authordsymbol
requires_pythonNone
licenseOSI Approved :: MIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Selench

Selench is a wrapper that simplifies the use of the Selenium library. 
It provides a more concise syntax that makes the code more readable and easier to understand.

### Key Features

- Concise syntax
- Less imports
- Elements have an explicit wait time by default
- Simple expected_conditions implementation as expect
- Element type detection ( CSS & XPATH )

## Installation

To install the library, use pip:

```bash
pip install selench
```

Alternatively, install the latest directly from the GitHub repository:
```bash
pip install git+https://github.com/dsymbol/selench.git
```

## Examples

Navigate to DuckDuckGo and search for 'Hello World!'

```py
from selench import Selench, Keys

driver = Selench()
driver.get('https://duckduckgo.com')
driver.element('[name=q]').send_keys('Hello World!', Keys.ENTER)
driver.quit()
```

Using PyTest: navigate to DuckDuckGo and search for 'github' assert titles contain 'github'

```py
from selench import Selench, Keys
import pytest

@pytest.fixture
def driver():
    driver = Selench()
    yield driver
    driver.quit()

def test_ddg_search_query(driver):
    keyword = 'github'
    driver.get('https://duckduckgo.com/')
    driver.element('[name=q]').send_keys(keyword, Keys.ENTER)
    driver.expect.title_to_contain(keyword)
    titles = driver.elements('a[data-testid=result-title-a] span')

    for title in titles:
        assert keyword in title.text.lower()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dsymbol/selench",
    "name": "selench",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "dsymbol",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/1a/56/0a11053847e18285f0f4e7a9a407b199bffcdd1510d352c698b6817512ff/selench-2024.5.2.tar.gz",
    "platform": null,
    "description": "# Selench\n\nSelench is a wrapper that simplifies the use of the Selenium library. \nIt provides a more concise syntax that makes the code more readable and easier to understand.\n\n### Key Features\n\n- Concise syntax\n- Less imports\n- Elements have an explicit wait time by default\n- Simple expected_conditions implementation as expect\n- Element type detection ( CSS & XPATH )\n\n## Installation\n\nTo install the library, use pip:\n\n```bash\npip install selench\n```\n\nAlternatively, install the latest directly from the GitHub repository:\n```bash\npip install git+https://github.com/dsymbol/selench.git\n```\n\n## Examples\n\nNavigate to DuckDuckGo and search for 'Hello World!'\n\n```py\nfrom selench import Selench, Keys\n\ndriver = Selench()\ndriver.get('https://duckduckgo.com')\ndriver.element('[name=q]').send_keys('Hello World!', Keys.ENTER)\ndriver.quit()\n```\n\nUsing PyTest: navigate to DuckDuckGo and search for 'github' assert titles contain 'github'\n\n```py\nfrom selench import Selench, Keys\nimport pytest\n\n@pytest.fixture\ndef driver():\n    driver = Selench()\n    yield driver\n    driver.quit()\n\ndef test_ddg_search_query(driver):\n    keyword = 'github'\n    driver.get('https://duckduckgo.com/')\n    driver.element('[name=q]').send_keys(keyword, Keys.ENTER)\n    driver.expect.title_to_contain(keyword)\n    titles = driver.elements('a[data-testid=result-title-a] span')\n\n    for title in titles:\n        assert keyword in title.text.lower()\n```\n",
    "bugtrack_url": null,
    "license": "OSI Approved :: MIT License",
    "summary": "Selenium wrapper for Python",
    "version": "2024.5.2",
    "project_urls": {
        "Homepage": "https://github.com/dsymbol/selench"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6faebd106e1c72cdb49aa11e3f818009adfb7963e3c7985de2210a55b937590c",
                "md5": "5220908ea351ac1d16d765904f9cbf6c",
                "sha256": "5d9e97710a5509f48dfd166a3ab89ce7b11cb73b88af20ab7c6a1e84b20064ad"
            },
            "downloads": -1,
            "filename": "selench-2024.5.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5220908ea351ac1d16d765904f9cbf6c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10723,
            "upload_time": "2024-05-01T21:24:40",
            "upload_time_iso_8601": "2024-05-01T21:24:40.398125Z",
            "url": "https://files.pythonhosted.org/packages/6f/ae/bd106e1c72cdb49aa11e3f818009adfb7963e3c7985de2210a55b937590c/selench-2024.5.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a560a11053847e18285f0f4e7a9a407b199bffcdd1510d352c698b6817512ff",
                "md5": "192ce13db694c170ab6889ae3be18ece",
                "sha256": "50d2afefddbb0637f2e5661ca2afd1b2b2072f9d776aa21c78c48b237b17c44c"
            },
            "downloads": -1,
            "filename": "selench-2024.5.2.tar.gz",
            "has_sig": false,
            "md5_digest": "192ce13db694c170ab6889ae3be18ece",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11784,
            "upload_time": "2024-05-01T21:24:42",
            "upload_time_iso_8601": "2024-05-01T21:24:42.059422Z",
            "url": "https://files.pythonhosted.org/packages/1a/56/0a11053847e18285f0f4e7a9a407b199bffcdd1510d352c698b6817512ff/selench-2024.5.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-01 21:24:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dsymbol",
    "github_project": "selench",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "selench"
}
        
Elapsed time: 0.41795s