Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melv-narrow/playwright-predictor
https://github.com/melv-narrow/playwright-predictor
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/melv-narrow/playwright-predictor
- Owner: melv-narrow
- License: mit
- Created: 2025-01-02T17:48:32.000Z (7 days ago)
- Default Branch: master
- Last Pushed: 2025-01-02T17:56:39.000Z (7 days ago)
- Last Synced: 2025-01-02T18:40:15.174Z (7 days ago)
- Language: Python
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AI-Powered Playwright Test Generator
An intelligent test automation framework that analyzes websites and automatically generates Playwright test suites using machine learning.
## Features
- Website analysis and data collection
- ML-powered element identification and classification
- Semantic role detection for web elements
- Automated Playwright test generation
- Configurable test strategies
- Comprehensive logging and error handling## Recent Updates
- Implemented GPU-accelerated model training with PyTorch
- Added mixed precision training for better performance
- Created element analysis pipeline for live websites
- Improved model architecture for multi-task learning
- Added support for semantic role classification
- Implemented confidence scoring for predictions## Model Performance
The model achieves strong performance in classifying web elements:
- Element Type Classification: 92.98% accuracy
- Semantic Role Classification: 89.25% accuracy
- Interactive Element Detection: >99% confidence
- Navigation Element Detection: >94% confidence## Project Structure
```
playwright-ai/
├── src/
│ ├── ai/ # AI/ML components
│ │ ├── models/ # ML model definitions
│ │ ├── training/ # Training scripts
│ │ └── inference/ # Inference engine
│ ├── scraper/ # Web scraping components
│ ├── test_generator/ # Test generation logic
│ └── utils/ # Shared utilities
├── tests/ # Framework tests
├── config/ # Configuration files
├── examples/ # Usage examples
└── generated_tests/ # Output directory for generated tests
```## Requirements
- Python 3.9+
- Node.js 16+
- TypeScript 4.8+
- Playwright
- PyTorch
- transformers
- Beautiful Soup 4## Installation
1. Clone the repository
2. Install Python dependencies:
```bash
pip install -r requirements.txt
```
3. Install Node.js dependencies:
```bash
npm install
```## Usage
1. Configure your target website in `config/sites.yaml`
2. Run the test generator:
```bash
python src/main.py generate --config config/sites.yaml
```
3. Execute generated tests:
```bash
npx playwright test
```## Documentation
Detailed documentation is available in the `docs/` directory:
- [Architecture Overview](docs/architecture.md)
- [ML Model Details](docs/ml-model.md)
- [Configuration Guide](docs/configuration.md)
- [API Reference](docs/api-reference.md)## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.
## License
MIT License - see [LICENSE](LICENSE) for details.