Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guoriyue/automouser
AutoMouser automatically generates browser automation code from your mouse movements, capturing every click, drag, and hover to streamline your workflow and build robust, repeatable tests.
https://github.com/guoriyue/automouser
ai chatgpt gpt-4 selenium web
Last synced: about 23 hours ago
JSON representation
AutoMouser automatically generates browser automation code from your mouse movements, capturing every click, drag, and hover to streamline your workflow and build robust, repeatable tests.
- Host: GitHub
- URL: https://github.com/guoriyue/automouser
- Owner: guoriyue
- Created: 2024-12-28T00:40:39.000Z (25 days ago)
- Default Branch: main
- Last Pushed: 2025-01-14T03:50:17.000Z (8 days ago)
- Last Synced: 2025-01-21T05:05:52.316Z (about 23 hours ago)
- Topics: ai, chatgpt, gpt-4, selenium, web
- Language: JavaScript
- Homepage:
- Size: 571 KB
- Stars: 202
- Watchers: 5
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# AutoMouser
AutoMouser is a Chrome extension that intelligently tracks user interactions and automatically generates Selenium test code using OpenAI's GPT model. It simplifies the process of creating automated tests by recording your browser actions and converting them into robust, maintainable Python Selenium scripts. This project is built upon the work in [bitmarte/selenium-rfc-chrome-extension](https://github.com/bitmarte/selenium-rfc-chrome-extension).
## Features
- 🎯 Real-time interaction tracking (clicks, inputs, scrolls)
- 🤖 Automatic Selenium Python code generation
- 📝 Smart input consolidation
- 🔄 Window resize detection
- 💾 JSON action log export
- ✨ Multiple XPath generation strategies
- 🎨 Clean, well-structured code output## Installation
1. Clone this repository or download the source code
2. Create a `.env` file in the root directory and add your OpenAI API key:
```
OPENAI_API_KEY=your_openai_api_key
```
3. Replace or edit `SELENIUM_PROMPT` with your desired prompt template in `prompt.js` if needed
4. Open Chrome and navigate to `chrome://extensions/`
5. Enable "Developer mode" in the top right
6. Click "Load unpacked" and select the extension directory## Usage
1. Click the AutoMouser icon in your Chrome toolbar to start recording
2. Perform the actions you want to automate
3. Click the icon again to stop recording and generate code
4. Two files will be downloaded:
- `tracking_log.json`: Raw interaction data
- `selenium_test.py`: Generated Selenium test script
5. Check and run the generated Selenium code in your Python environment!## Contributing
Contributions are welcome! Please feel free to submit pull requests, create issues, or suggest improvements.
For any questions, please create an issue in the repository.