A Chrome extension that helps developers generate testing queries for UI elements by simply inspecting them. Perfect for creating tests with Testing Library, Cypress, Playwright, and other testing frameworks.
getByRole
and getByLabelText
The extension generates queries in order of priority:
This extension is currently under review for the Chrome Web Store.
git clone https://github.com/abdelhak-ajbouni/ui-test-helper.git
cd ui-test-helper
chrome://extensions/
extension/
directoryWhen you click on a button element, you might see:
getByRole('button', { name: 'Submit Form' })
getByText('Submit Form')
getByTestId('submit-btn')
ui-test-helper/
βββ extension/ # Chrome extension files
β βββ manifest.json # Extension configuration (Manifest V3)
β βββ popup.html # Extension popup interface
β βββ popup.css # Popup styles
β βββ popup.js # Popup functionality
β βββ inspector.js # Main content script
β βββ inspector.css # Inspector UI styles
β βββ background.js # Service worker
β βββ query-generator.js # Query generation logic
β βββ icons/ # Extension icons (PNG format)
βββ tests/ # Test suite
β βββ unit/ # Unit tests (Vitest)
β βββ e2e/ # End-to-end tests (Playwright)
β βββ test.html # Test page for development
β βββ setup.js # Test configuration
βββ package.json # Dependencies and scripts
βββ vitest.config.js # Vitest configuration
βββ playwright.config.js # Playwright configuration
βββ privacy-policy.md # Privacy policy
βββ README.md # This file
extension/
directorychrome://extensions/
For testing the extension, you can use the included test pages:
extension/test.html
in your browser```bash
npm install
npm test
npm run test:e2e
π Privacy-First Design
activeTab
and scripting
permissionsRead our full Privacy Policy
Note: Built with Chrome Manifest V3 for modern security standards.
MIT License - feel free to use this extension in your projects!
Found a bug or have a feature request? Please open an issue on the repository or contact the development team.
Happy Testing! π§ͺβ¨