Skip to main content

Query using Jquery on selenium driver.

Project description

BrowserQuery

Use JQuery on selenium drivers.

A simple, yet powerful package to execute Jquery while working on selenium drivers. It also comes built in with some utility methods built in.

Install

pip install browserjquery

Usage

    import time

    from selenium.webdriver import Chrome
    from browserjquery import BrowserJQuery

    driver = Chrome()

    driver.get("https://www.yahoo.com")

    time.sleep(10)

    # create Jquery object
    jquery = BrowserJQuery(driver)

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

    # call the object as a method to find/select items
    stream = jquery(".stream-item")

    # call methods/attributes off of the object
    print(jquery.document)

    print(jquery.find(".stream-item a"))

    print(jquery.find_elements_with_text("Hello"))
    print(jquery.find_elements_with_text("Hello", element=stream[0]))

    print(jquery.parent(stream[0]))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browserjquery-0.1.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

browserjquery-0.1.0-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file browserjquery-0.1.0.tar.gz.

File metadata

  • Download URL: browserjquery-0.1.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1011-azure

File hashes

Hashes for browserjquery-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8757a515ebce403bf6d1b83f657203288c2552118c541f27e1c1e61d9e16c8a1
MD5 920fa626e8fc22daa291ddb7f7793ed5
BLAKE2b-256 2b41623597f94b853174ad3075d600a31c71a5ee38f73d098f64bd041a623367

See more details on using hashes here.

File details

Details for the file browserjquery-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: browserjquery-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.13 Linux/6.2.0-1011-azure

File hashes

Hashes for browserjquery-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5ac00acd7182ecdd907297219591b78774885ee87e8bc95614d081086be9829
MD5 6886470c8c82a23172625d3df22db549
BLAKE2b-256 e61f48102ada8e0845f1dd0af95c0e395fb053ad7aac915d80be4494d51854b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page