Seleasy
A simplified Selenium wrapper library with a clean, chainable API for common browser automation tasks. Built on top of Selenium WebDriver and BeautifulSoup4.
Installation
pip install seleasy
Quick Start
from seleasy import Seleasy
# Initialize with your preferred browser
es = Seleasy(browser='edge') # or 'chrome', 'firefox', 'safari'
# Navigate to a URL
es.get('https://www.example.com')
# Wait for and click an element
es.click_element('button', 'text', 'Login', delay=10)
# Type text into an input
es.input_text('input', 'id', 'username', text='myuser')
# Use JavaScript mode when the normal input/click path is intercepted
es.input_text('input', 'id', 'username', text='myuser', use_js=True)
es.click_element('button', 'text', 'Login', use_js=True)
# Scroll the page in fixed increments
es.roll_move('div', 'class', 'content-area', delta_y=400)
# Move the wheel to a target element, including elements far below the viewport
es.roll_to_element('button', 'id', 'submit')
# Get page source
html = es.get_html_source('page.html')
# Parse with BeautifulSoup
soup = es.get_soup()
# Clean up
es.quit()
Features
- Multi-browser support: Edge, Chrome, Firefox, Safari
- Smart element location: Find elements by tag + attribute + value
- Auto-wait: Built-in
WebDriverWaitwith configurable timeout - Optional JS interactions: Click or enter text via JavaScript to bypass interception
- Scroll & hover: Wheel scrolling, wheel-to-element, smooth scrollIntoView, hover actions
- iframe management: Switch into/out of frames with simple API
- BeautifulSoup integration: Parse page HTML directly
- Screenshots & page source: Save screenshots and HTML with one line
JavaScript Interaction Mode
use_js defaults to False, so calls use Selenium's normal browser
interactions unless JavaScript is explicitly requested.
# Normal Selenium click and text input
es.click_element('button', 'id', 'submit')
es.input_text('input', 'id', 'username', text='myuser')
# JavaScript mode
es.click_element('button', 'id', 'submit', use_js=True)
es.input_text('input', 'id', 'username', text='myuser', use_js=True)
JavaScript text input uses the native input value setter and dispatches
input and change events so React, Vue, and other listeners can observe
the new value. It cannot bypass websites that explicitly require trusted
keyboard events.
Supported Browsers
| Browser | Argument |
|---|---|
| Edge | 'edge' |
| Chrome | 'chrome' |
| Firefox | 'firefox' |
| Safari | 'safari' |
Requirements
- Python 3.8+
- selenium >= 4.0.0
- beautifulsoup4 >= 4.9.0
- A matching WebDriver for your browser (managed automatically by Selenium Manager)
License
MIT
Release files for seleasy 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seleasy-1.1.0.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seleasy-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.9 kB
Release files / seleasy-1.1.0.tar.gz
| Download URL | seleasy-1.1.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3728d68d9f0b1ff056bfa51cdb0ec6261a0f6f44cb5f1d271fbcede209fa1b69
|
|
BLAKE2b-256 checksum How to use checksums |
ff98455ea6364ce8f84a7ed05ea8512bc14ecd186060630bbed4bed33e469388
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / seleasy-1.1.0-py3-none-any.whl
| Download URL | seleasy-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
154f0059a5778e87b0bd6d55c6a6de4ed3b22aeed0faa998df51715c061b2ef6
|
|
BLAKE2b-256 checksum How to use checksums |
a53f7b40465af88260da23134b75d6efa111b0d011cf128c205b95f5aaee32cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|