Skip to main content

Selenium shortcut functions

Project description

selenium-shortcuts

Shortcut functions for Python selenium

Installation: pip install selenium-shortcuts

Usage:

from selenium_shortcuts import setup_shortcuts

helper = setup_shortcuts(browser='uc') # Start a browser on port 9222 or reconnect to existing browser on port 9222 with undetected-chromedriver
driver, find, finds, click, text, send, get, check = helper.driver, helper.find, helper.finds, helper.click, helper.text, helper.send, helper.get, helper.check

info = text('#info')
print(info)

click('#submit')

info = find('#info')
print(info.text)
info.click()

items = finds('.items')
for item in items:
	print(item.text)

info, classes = find('#info', attribute='class')
print(classes)

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

selenium-shortcuts-2.8.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file selenium-shortcuts-2.8.tar.gz.

File metadata

  • Download URL: selenium-shortcuts-2.8.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.0.0 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.9.13

File hashes

Hashes for selenium-shortcuts-2.8.tar.gz
Algorithm Hash digest
SHA256 b29e4b63e37b5336e2ebbbeb4438931cfb7e1cf25f8898d655cafe31f15394b4
MD5 33fbf5535bdf9141c24dbde614b36a28
BLAKE2b-256 99e42223ed19d98f97fff51d9934ab14876ce3011439bea560798af8480aec22

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