Thank you for your interest in contributing to LocatorPro! We welcome contributions from the community and are excited to see what you'll bring to the project.
- Node.js 18+ or 20+
- npm or yarn
- Git
-
Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/locatorpro-playwright.git cd locatorpro-playwright -
Install dependencies
npm install
-
Start the local test server
npm start # Server runs on http://localhost:3000 -
Run tests to ensure everything works
npm test npm run test:headed # Run with browser UI
-
Build the project
npm run build
npm test- Run all Playwright testsnpm run test:headed- Run tests with browser visiblenpm run test:ui- Interactive test runnernpm run build- TypeScript compilation
tests/core-functionality.spec.ts- Core SmartLocator methodstests/related-text.spec.ts- Revolutionary findByRelatedText featurestests/self-healing.spec.ts- Self-healing and pattern analysistest-site/- Local test site with comprehensive scenarios
When adding new features, please include tests that cover:
- Happy path scenarios
- Edge cases and error conditions
- Cross-browser compatibility
- Performance considerations
- Use strict TypeScript with proper type definitions
- Follow existing code patterns and naming conventions
- Add JSDoc comments for public methods
- Use meaningful variable and function names
We use standard TypeScript formatting. The project will auto-format on build.
Please use the GitHub issue template and include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Browser and environment details
- Minimal code example
For new features, please:
- Check existing issues first
- Describe the use case and benefit
- Provide examples of how it would work
- Consider backward compatibility
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style
- Add/update tests as needed
- Update documentation if necessary
-
Test your changes
npm test npm run build -
Commit with clear messages
git commit -m "feat: add smart pattern recognition for form inputs" # or git commit -m "fix: handle timeout errors in generateStrategies"
-
Push and create PR
git push origin feature/your-feature-name
We follow conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changestest:- Adding or updating testsrefactor:- Code refactoringperf:- Performance improvementschore:- Maintenance tasks
- New locator strategies - Additional ways to find elements
- Performance optimizations - Faster strategy generation
- Cross-browser testing - Ensure compatibility
- Documentation improvements - Examples and guides
- Framework integrations - Jest, Cucumber, etc.
- Visual regression detection - Image-based locators
- Machine learning patterns - Smarter pattern recognition
- Accessibility improvements - Better ARIA support
- Bug fixes - Small, well-defined issues
- Documentation updates - README improvements
- Test coverage - Additional test scenarios
- Code examples - Real-world usage examples
src/
├── index.ts # Main exports
├── smart-locator.ts # Core SmartLocator class
├── locator-engine.ts # Strategy generation engine
└── types.ts # TypeScript type definitions
- SmartLocator - Main class with public API
- LocatorEngine - Strategy generation and DOM analysis
- Strategy System - Prioritized fallback mechanisms
- Pattern Analysis - Broken selector intelligence
- Update types in
src/types.ts - Implement logic in appropriate files
- Add public methods to
SmartLocatorclass - Write comprehensive tests
- Update documentation
- Be respectful and inclusive
- Provide constructive feedback
- Help newcomers get started
- Maintain professional communication
- GitHub Discussions - General questions and ideas
- GitHub Issues - Bug reports and feature requests
- Discord/Slack - Real-time community chat (if available)
- Code quality - Clean, readable, maintainable code
- Test coverage - Comprehensive test scenarios
- Documentation - Clear explanations and examples
- Backward compatibility - Don't break existing functionality
- Performance - Consider impact on execution speed
- Initial response: 2-3 business days
- Code review: 3-5 business days
- Final approval: 1-2 business days
Contributors will be:
- Added to the contributors list
- Mentioned in release notes
- Invited to become maintainers (for significant contributions)
Feel free to reach out:
- GitHub Issues - For bug reports and feature requests
- GitHub Discussions - For general questions
- Email - [maintainer email if available]
Thank you for contributing to LocatorPro! Together, we're making Playwright automation more reliable and accessible for everyone. 🚀
By contributing to LocatorPro, you agree that your contributions will be licensed under the MIT License.