https://github.com/xjxckk/selenium-shortcuts
Shortcut functions for Python selenium
https://github.com/xjxckk/selenium-shortcuts
python selenium
Last synced: about 2 months ago
JSON representation
Shortcut functions for Python selenium
- Host: GitHub
- URL: https://github.com/xjxckk/selenium-shortcuts
- Owner: xjxckk
- Created: 2022-03-23T14:17:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2026-02-02T12:57:09.000Z (5 months ago)
- Last Synced: 2026-02-03T01:57:48.170Z (5 months ago)
- Topics: python, selenium
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 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)
```