auto-browse
Test Automation using AI Agents. A Python package for AI-powered Test automation using Playwright.
Website and Documentation
Installation
With pip:
pip install auto-browse
Install playwright:
playwright install --with-deps
Add your API keys to your .env file:
OPENAI_API_KEY=your_api_key_here
GEMINI_API_KEY=your_api_key_here
ANTHROPIC_API_KEY=your_api_key_here
Set the following environment variables:
AUTOBROWSE_ANONYMIZED_TELEMETRY=true
ANONYMIZED_TELEMETRY=false
BROWSER_USE_LOGGING_LEVEL=info
Features
- AI-powered browser automation
- Supports OpenAI, Gemini, Ollama, Groq, Mistral, Anthropic Claude
- Built on top of Playwright
- Support for common browser actions like:
- Google search
- Navigation
- Clicking elements
- Form input
- Tab management
- Content extraction
- Scrolling
- Keyboard input
- Dropdown interaction
Usage
import asyncio
from playwright.async_api import async_playwright
from browser_use.browser.browser import Browser, BrowserConfig
from auto_browse.browse.browse import AutoBrowse
async def main():
async with async_playwright() as p:
browser = Browser(config=BrowserConfig(headless=False))
# To use other models, replace the model name with the desired model
# e.g., "openai:gpt-4o-mini", "ollama:llama3.1", "google-gla:gemini-1.5-flash", groq:gemma2-9b-it, mistral:mistral-large-latest
auto_browse = AutoBrowse(browser=browser, model="openai:gpt-4o-mini")
page = await auto_browse.get_current_page()
await asyncio.sleep(1)
# This can run one specific step, not like two steps combined
await auto_browse.ai("Search for 'Python automation' on Google")
await auto_browse.ai("Click on the first search result")
await browser.close()
if __name__ == "__main__":
asyncio.run(main())
Save the above code in a file (e.g., example.py) and run it:
python example.py
Jupyter Notebook Usage
You can also use auto-browse in a Jupyter notebook:
# Cell 1: Setup
import nest_asyncio
import asyncio
nest_asyncio.apply()
from browser_use.browser.browser import Browser, BrowserConfig
from browser_use.browser.context import BrowserContextConfig
from auto_browse.browse.browse import AutoBrowse
browser = Browser(config=BrowserConfig(headless=False))
auto_browse = AutoBrowse(browser=browser, model="openai:gpt-4o-mini")
page = await auto_browse.get_current_page()
await asyncio.sleep(1)
# Cell 2: Search
await auto_browse.ai("Search for 'Python automation' on Google")
# Cell 3: Click result
await auto_browse.ai("Click on the first search result")
# Cell 4: Cleanup
await browser.close()
Requirements
- Python 3.11+
- Playwright
- browser-use
- Other dependencies as specified in pyproject.toml
License
MIT License
Metadata
Release files for auto-browse 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auto_browse-0.0.5.tar.gz | 144.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auto_browse-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 155.8 kB
Release files / auto_browse-0.0.5.tar.gz
| Download URL | auto_browse-0.0.5.tar.gz |
|---|---|
| Size | 144.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79370719e008e1a87088e34d2e2b294bf2a628a374f69b845871561e011358fa
|
|
BLAKE2b-256 checksum How to use checksums |
32a7dbfe637e1f398932e12c10d00c4071a14349b26bc1e28db298437d566d08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.3
|
Release files / auto_browse-0.0.5-py3-none-any.whl
| Download URL | auto_browse-0.0.5-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccc52c7a1f9da3b9259532c8609bb223c6af24d6cd41eac156804ee6864c6b3f
|
|
BLAKE2b-256 checksum How to use checksums |
519e538a3adbf15eb9d714a427d4795c82c6c6b74462264fee000ddffb1a212c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.3
|