Skip to main content

agents based on pyautogui

Project description

WebLair Async:

Browser Control Functions

start_chromium(url=None, headless=False, **kwargs)

Starts a Chromium browser instance Returns a Page object Optional URL to navigate to Configurable headless mode and additional options

start_firefox(url=None, headless=False, **kwargs)

Starts a Firefox browser instance Similar to start_chromium but for Firefox

go_to(url, page=None)

Navigates to a specified URL Automatically adds 'http://' if protocol not specified

kill_browser(page=None)

Closes the browser and cleans up resources Resets browser manager state

Interaction Functions

write(text, page=None, into=None)

Types text into fields Can target specific field by label or placeholder Works with focused element if no target specified

click(element, page=None)

Clicks on elements identified by text, Point, or element reference Works with buttons, links, and any clickable elements

press(key, page=None)

Simulates keyboard key press Works with Keys class constants (ENTER, TAB, etc.)

hover(element, page=None)

Moves mouse over specified element Accepts text, element handle, or locator

scroll_to(element, page=None)

Scrolls element into view Works with text or element references

Element Classes

Button(text=None, page=None)

Methods:

exists(): Checks if button exists is_enabled(): Checks if button is enabled

TextField(label=None, page=None)

Methods:

exists(): Checks if field exists value(): Gets current text value type(text): Types text into field

Link(text=None, page=None)

Methods:

exists(): Checks if link exists href(): Gets link URL

Alert(page=None)

Methods:

accept(): Accepts dialog dismiss(): Dismisses dialog text(): Gets alert message

Helper Classes

Point(x, y)

Represents screen coordinates Supports addition/subtraction for offset calculations

Keys

Constants for keyboard keys Examples: ENTER, TAB, ESCAPE, etc.

Config

Configuration settings Properties:

implicit_wait_secs browser_type default_timeout screenshot_dir viewport_size

Utility Functions

find_all(element_type, page=None)

Finds all elements of specified type (Button, TextField, Link) Returns list of elements

wait_until(condition_fn, timeout=None, page=None)

Waits for condition to be true Supports both sync and async conditions Configurable timeout

attach_file(file_path, to=None, page=None)

Handles file uploads Can target specific file input

get_text(element, page=None)

Gets text content of element Works with various element types

take_screenshot(path, full_page=False, page=None)

Captures screenshot Optional full page capture

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

weblair-0.0.6.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weblair-0.0.6-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file weblair-0.0.6.tar.gz.

File metadata

  • Download URL: weblair-0.0.6.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.0rc1 Linux/6.8.0-52-generic

File hashes

Hashes for weblair-0.0.6.tar.gz
Algorithm Hash digest
SHA256 174b248a9f8c41cef62507d67742bd9dd5e9d53ac5ab8cba9fb9b8f42cbc61af
MD5 14ba194eae5681325042d4cd0f6ff3b8
BLAKE2b-256 9258fb56b45ca7ed98f7f8c5cbbaf196f46a3bdc6b7402dc9295c9870ff78c01

See more details on using hashes here.

File details

Details for the file weblair-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: weblair-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.0rc1 Linux/6.8.0-52-generic

File hashes

Hashes for weblair-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8822cc5b7a677466fe7726484e3d78f72c4af2273d9e947a786f55b10e0fb7f8
MD5 3dd9a397747fba42a3ed107b6f24a2ac
BLAKE2b-256 2c267ae45d4456eafd27c40215588f906798ecd13a077008a16ff65ca0604028

See more details on using hashes here.

Supported by

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