A lightweight DOM-based UI automation framework using Chrome DevTools Protocol. Perfect for web testing, form automation, and UI validation.
# Create a new automation project
npx super-pancake-automation@latest init my-automation-project
# Navigate to the project
cd my-automation-project
# Run tests
npm test# Interactive project setup
npx super-pancake-automation setup# Launch interactive web UI
npx super-pancake-automation-ui# Install in existing project
npm install super-pancake-automation
# Import in your test files
import {
createTestEnvironment,
navigateTo,
getText,
assertContainsText
} from 'super-pancake-automation';# Project Management
npx super-pancake-automation init <project-name> # Create new project
npx super-pancake-automation setup # Interactive setup
npx super-pancake-automation-ui # Launch UI interface
# Testing & Diagnostics
npx super-pancake-automation browsers # Check browser compatibility
npx super-pancake-automation check # Health check
npx super-pancake-automation --version # Show versionWhen you create a new project with npx super-pancake-automation init, you get:
my-automation-project/
βββ tests/
β βββ sample.test.js # Basic UI functionality test
β βββ ui-website.test.js # Website UI test
β βββ api.test.js # API testing examples
βββ screenshots/ # Auto-generated screenshots
βββ super-pancake.config.js # Configuration file
βββ package.json # Project dependencies
βββ README.md # Project documentation
# Run all tests
npm test
# Run with visible browser (for debugging)
npm run test:headed
# Run with UI interface
npm run test:ui
# Run specific test files
npm test tests/sample.test.jsEdit super-pancake.config.js in your generated project:
export default {
headless: true, // Browser mode
port: 9222, // Chrome DevTools port
screenshots: {
enabled: true, // Enable screenshots
onFailure: true, // Capture on test failure
directory: './screenshots' // Screenshot directory
},
execution: {
sequential: true, // Prevent Chrome port conflicts
timeout: 30000 // Test timeout
}
};- β Sequential Test Execution - Prevents Chrome port conflicts
- π― Chrome DevTools Protocol - Fast and reliable browser automation
- πΈ Automatic Screenshots - Capture on success and failure
- π HTML Test Reports - Beautiful, detailed test reports
- π Advanced Element Selection - CSS, XPath, and custom selectors
- π Custom Test Runner - Optimized for UI automation
- π¨ Interactive UI - Visual test runner interface
- π§ Environment Variables - Flexible configuration
import { describe, it, beforeAll, afterAll } from 'vitest';
import {
createTestEnvironment,
cleanupTestEnvironment,
enableDOM,
navigateTo,
getText,
assertContainsText
} from 'super-pancake-automation';
describe('Website UI Tests', () => {
let testEnv;
beforeAll(async () => {
testEnv = await createTestEnvironment({ headed: false });
await enableDOM();
});
afterAll(async () => {
await cleanupTestEnvironment(testEnv);
});
it('should load homepage and verify content', async () => {
await navigateTo('https://example.com');
const title = await getText('h1');
assertContainsText(title, 'Welcome');
});
});it('should fill and submit a form', async () => {
await navigateTo('https://example.com/form');
await fillInput('#name', 'John Doe');
await fillInput('#email', 'john@example.com');
await clickButton('#submit');
await waitForSelector('.success-message');
const message = await getText('.success-message');
assertContainsText(message, 'Form submitted successfully');
});For contributors and developers:
# Clone the repository
git clone https://github.com/pradapjackie/super-pancake.git
cd super-pancake
# Install dependencies
npm install
# Run tests
npm test
# Run with UI
npm run test:uiWe welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE file for details.
- π§ Email: pradapjackie@gmail.com
- π Issues: GitHub Issues
- π Documentation: GitHub Wiki
Happy Testing! π₯β¨