browserjquery


Namebrowserjquery JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/inquilabee/BrowserQuery
SummaryQuery using Jquery on selenium driver.
upload_time2023-09-20 11:01:16
maintainer
docs_urlNone
authorVishal Kumar Mishra
requires_python>=3.10,<4.0
licenseMIT
keywords selenium selenium python browserquery browserquery browser automation python jquery
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BrowserJQuery: Streamline Selenium with jQuery

Enhance your Selenium-driven web automation tasks with **BrowserJQuery**, a Python package that empowers you to use jQuery effortlessly. This straightforward yet robust package simplifies the execution of jQuery scripts and includes built-in utility methods.

# Installation

Get started quickly by installing **BrowserJQuery** from PyPI:

```bash
pip install browserjquery
```

# Usage

Here's how you can harness the power of **BrowserJQuery** in your Selenium scripts:

```python
import time
from selenium.webdriver import Chrome
from browserjquery import BrowserJQuery

# Initialize a Selenium driver
driver = Chrome()

# Navigate to a website
driver.get("https://www.yahoo.com")

# Pause to allow page loading (you can adjust the duration)
time.sleep(10)

# Create a jQuery object for the driver
jquery = BrowserJQuery(driver)

# Execute a jQuery script
jquery.execute("""return $("div.stream-item")""")

# Use the jQuery object to find and select items
stream = jquery(".stream-item")

# Access methods and attributes of the jQuery object
print(jquery.document)

# Find elements within the selected items
print(jquery.find(".stream-item a"))

# Find elements with specific text
print(jquery.find_elements_with_text("Hello"))

# Find elements with specific text within a specific element
print(jquery.find_elements_with_text("Hello", element=stream[0]))

# Get the parent element of a selected item
print(jquery.parent(stream[0]))
```

With **BrowserJQuery**, you can effortlessly integrate jQuery into your Selenium workflows, making web automation more efficient and powerful.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/inquilabee/BrowserQuery",
    "name": "browserjquery",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "selenium,selenium python,browserquery,browserquery,browser automation,python jquery",
    "author": "Vishal Kumar Mishra",
    "author_email": "vishal.k.mishra2@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0a/31/6307dc5cc5205a786118ec37ee35ea0ab8d3dc08f6a7b70e8538a8f2ccc0/browserjquery-0.1.1.tar.gz",
    "platform": null,
    "description": "# BrowserJQuery: Streamline Selenium with jQuery\n\nEnhance your Selenium-driven web automation tasks with **BrowserJQuery**, a Python package that empowers you to use jQuery effortlessly. This straightforward yet robust package simplifies the execution of jQuery scripts and includes built-in utility methods.\n\n# Installation\n\nGet started quickly by installing **BrowserJQuery** from PyPI:\n\n```bash\npip install browserjquery\n```\n\n# Usage\n\nHere's how you can harness the power of **BrowserJQuery** in your Selenium scripts:\n\n```python\nimport time\nfrom selenium.webdriver import Chrome\nfrom browserjquery import BrowserJQuery\n\n# Initialize a Selenium driver\ndriver = Chrome()\n\n# Navigate to a website\ndriver.get(\"https://www.yahoo.com\")\n\n# Pause to allow page loading (you can adjust the duration)\ntime.sleep(10)\n\n# Create a jQuery object for the driver\njquery = BrowserJQuery(driver)\n\n# Execute a jQuery script\njquery.execute(\"\"\"return $(\"div.stream-item\")\"\"\")\n\n# Use the jQuery object to find and select items\nstream = jquery(\".stream-item\")\n\n# Access methods and attributes of the jQuery object\nprint(jquery.document)\n\n# Find elements within the selected items\nprint(jquery.find(\".stream-item a\"))\n\n# Find elements with specific text\nprint(jquery.find_elements_with_text(\"Hello\"))\n\n# Find elements with specific text within a specific element\nprint(jquery.find_elements_with_text(\"Hello\", element=stream[0]))\n\n# Get the parent element of a selected item\nprint(jquery.parent(stream[0]))\n```\n\nWith **BrowserJQuery**, you can effortlessly integrate jQuery into your Selenium workflows, making web automation more efficient and powerful.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Query using Jquery on selenium driver.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/inquilabee/BrowserQuery",
        "Repository": "https://github.com/inquilabee/BrowserQuery"
    },
    "split_keywords": [
        "selenium",
        "selenium python",
        "browserquery",
        "browserquery",
        "browser automation",
        "python jquery"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df1ae2a43da95073047be1663ecca3a208d15228bf414c20487e3d05b75d32ea",
                "md5": "20bf2c433715d52f98ceea7920ac80af",
                "sha256": "70f0d1b1f7b93ee3c299f40eb0cfc8ec20794329c5af64af3e6f9983c0b7868b"
            },
            "downloads": -1,
            "filename": "browserjquery-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "20bf2c433715d52f98ceea7920ac80af",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 30818,
            "upload_time": "2023-09-20T11:01:15",
            "upload_time_iso_8601": "2023-09-20T11:01:15.049783Z",
            "url": "https://files.pythonhosted.org/packages/df/1a/e2a43da95073047be1663ecca3a208d15228bf414c20487e3d05b75d32ea/browserjquery-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a316307dc5cc5205a786118ec37ee35ea0ab8d3dc08f6a7b70e8538a8f2ccc0",
                "md5": "a11747b7f4813a0e683391d0465958eb",
                "sha256": "0cb44399d6a96bf5607621d4ddfaa0197a88e4804c223f19f6dfa7ec0a31a7ab"
            },
            "downloads": -1,
            "filename": "browserjquery-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a11747b7f4813a0e683391d0465958eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 30624,
            "upload_time": "2023-09-20T11:01:16",
            "upload_time_iso_8601": "2023-09-20T11:01:16.640475Z",
            "url": "https://files.pythonhosted.org/packages/0a/31/6307dc5cc5205a786118ec37ee35ea0ab8d3dc08f6a7b70e8538a8f2ccc0/browserjquery-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-20 11:01:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "inquilabee",
    "github_project": "BrowserQuery",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "browserjquery"
}
        
Elapsed time: 0.74683s