Examples & Use Cases
Automation patterns and use cases for InSite platform.
Quick Start
npx insite-mcp
MCP Configuration
{
"mcpServers": {
"insite": {
"command": "npx",
"args": ["insite-mcp"]
}
}
}
Page Control & Element Interaction
E-commerce Checkout Flow
Automated testing of shopping cart and checkout process with multiple payment methods.
[
{
"name": "load_page",
"arguments": {
"url": "https://shop.example.com",
"waitUntil": "networkidle"
}
},
{
"name": "click_element",
"arguments": {
"selector": ".product-card:first-child .add-to-cart"
}
},
{
"name": "wait_for_element",
"arguments": {
"selector": ".cart-notification",
"state": "visible"
}
},
{
"name": "click_element",
"arguments": {
"selector": ".cart-icon"
}
},
{
"name": "click_element",
"arguments": {
"selector": ".checkout-button"
}
},
{
"name": "type_text",
"arguments": {
"selector": "#email",
"text": "test@example.com"
}
},
{
"name": "type_text",
"arguments": {
"selector": "#card-number",
"text": "4111111111111111"
}
},
{
"name": "screenshot",
"arguments": {
"fullPage": true
}
}
]
Form Validation Testing
Form validation testing with error handling and user feedback verification.
[
{
"name": "load_page",
"arguments": {
"url": "https://forms.example.com/contact"
}
},
{
"name": "click_element",
"arguments": {
"selector": "#submit-button"
}
},
{
"name": "wait_for_element",
"arguments": {
"selector": ".validation-error",
"state": "visible",
"timeout": 5000
}
},
{
"name": "get_element_info",
"arguments": {
"selector": ".validation-error"
}
},
{
"name": "type_text",
"arguments": {
"selector": "#name",
"text": "John Doe"
}
},
{
"name": "type_text",
"arguments": {
"selector": "#email",
"text": "invalid-email"
}
},
{
"name": "click_element",
"arguments": {
"selector": "#submit-button"
}
},
{
"name": "screenshot",
"arguments": {
"fullPage": false
}
}
]
Monitoring & Console/Network Analysis
Page Load Performance Analysis
Monitor and analyze page load performance with Web Vitals metrics.
[
{
"name": "performance_monitoring",
"arguments": {
"action": "start_monitoring",
"metrics": [
"pageLoadTime",
"firstContentfulPaint",
"largestContentfulPaint",
"cumulativeLayoutShift"
]
}
},
{
"name": "load_page",
"arguments": {
"url": "https://example.com/heavy-page",
"waitUntil": "networkidle"
}
},
{
"name": "performance_monitoring",
"arguments": {
"action": "get_metrics"
}
},
{
"name": "capture_performance_timeline",
"arguments": {
"action": "get_metrics"
}
}
]
Network Request Monitoring
Track and analyze network requests for API performance and error detection.
[
{
"name": "get_network_logs",
"arguments": {
"method": "POST",
"url_pattern": "/api/",
"limit": 50
}
},
{
"name": "load_page",
"arguments": {
"url": "https://api-heavy-app.example.com"
}
},
{
"name": "click_element",
"arguments": {
"selector": "#load-data-button"
}
},
{
"name": "wait_for_element",
"arguments": {
"selector": ".data-loaded",
"state": "visible",
"timeout": 10000
}
},
{
"name": "get_network_logs",
"arguments": {
"status": 200,
"limit": 20
}
}
]
Visual Testing & Multi-Browser
Cross-Browser Visual Regression
Automated visual regression testing across multiple browser engines.
[
{
"name": "visual_regression_testing",
"arguments": {
"action": "initialize",
"config": {
"threshold": 0.1,
"engines": ["chromium", "firefox", "webkit"]
}
}
},
{
"name": "load_page",
"arguments": {
"url": "https://example.com/homepage"
}
},
{
"name": "screenshot_compare",
"arguments": {
"action": "capture_baseline",
"name": "homepage-desktop"
}
},
{
"name": "switch_browser",
"arguments": {
"engine": "firefox"
}
},
{
"name": "load_page",
"arguments": {
"url": "https://example.com/homepage"
}
},
{
"name": "screenshot_compare",
"arguments": {
"action": "compare",
"name": "homepage-desktop",
"threshold": 5
}
},
{
"name": "visual_test_reporting",
"arguments": {
"action": "generate_report",
"format": "html"
}
}
]
Test Integration & Reporting
Playwright Test Integration
Integration with Playwright Test runner for test suites.
[
{
"name": "playwright_test_adapter",
"arguments": {
"action": "initialize"
}
},
{
"name": "playwright_test_adapter",
"arguments": {
"action": "configure",
"config": {
"testDir": "./tests/e2e",
"workers": 4,
"retries": 2,
"projects": [
{
"name": "desktop-chrome",
"browser": "chromium",
"viewport": {"width": 1280, "height": 720}
},
{
"name": "desktop-firefox",
"browser": "firefox",
"viewport": {"width": 1280, "height": 720}
},
{
"name": "mobile-safari",
"browser": "webkit",
"viewport": {"width": 375, "height": 667}
}
]
}
}
},
{
"name": "playwright_test_adapter",
"arguments": {
"action": "run_test",
"testPath": "./tests/e2e/critical-user-flows.spec.js",
"outputDir": "./test-results"
}
},
{
"name": "test_reporter",
"arguments": {
"action": "generate_report",
"outputFormat": "html",
"analytics": {
"trends": true,
"performance": true,
"flakiness": true
}
}
}
]
Advanced Test Reporting
Test result aggregation and analytics across multiple frameworks.
[
{
"name": "test_reporter",
"arguments": {
"action": "aggregate_results",
"sources": [
{
"framework": "playwright",
"resultsPath": "./playwright-results.json",
"format": "json"
},
{
"framework": "jest",
"resultsPath": "./jest-results.json",
"format": "json"
},
{
"framework": "mocha",
"resultsPath": "./mocha-results.xml",
"format": "junit"
}
]
}
},
{
"name": "test_reporter",
"arguments": {
"action": "get_analytics",
"analytics": {
"trends": true,
"performance": true,
"flakiness": true,
"coverage": true
}
}
},
{
"name": "test_reporter",
"arguments": {
"action": "compare_runs",
"compareWith": "./previous-results.json",
"threshold": {
"passRate": 95,
"performance": 30000
}
}
}
]
Security & Debugging
Security Validation Workflow
Security scanning and validation for web applications.
[
{
"name": "load_page",
"arguments": {
"url": "https://secure-app.example.com"
}
},
{
"name": "validate_security",
"arguments": {
"checks": [
"https_redirect",
"secure_headers",
"mixed_content",
"csp_validation"
],
"reportLevel": "comprehensive"
}
},
{
"name": "manage_certificates",
"arguments": {
"action": "validate"
}
},
{
"name": "handle_csp",
"arguments": {
"action": "report"
}
},
{
"name": "debug_mode",
"arguments": {
"action": "enable",
"features": ["security", "network", "console"]
}
}
]
Advanced Debugging Session
Debugging with element highlighting and execution tracing.
[
{
"name": "debug_mode",
"arguments": {
"action": "enable"
}
},
{
"name": "trace_execution",
"arguments": {
"action": "start",
"options": {
"screenshots": true,
"snapshots": true
}
}
},
{
"name": "load_page",
"arguments": {
"url": "https://problematic-page.example.com"
}
},
{
"name": "highlight_element",
"arguments": {
"selector": "#problematic-element",
"style": {
"border": "3px solid red"
},
"tooltip": "Element causing issues"
}
},
{
"name": "get_console_logs",
"arguments": {
"level": "error"
}
},
{
"name": "trace_execution",
"arguments": {
"action": "stop"
}
}
]
Automation Patterns
Continuous Testing Pipeline
Integrate InSite into CI/CD pipelines for automated testing across environments.
- Multi-browser testing automation
- Visual regression detection
- Performance monitoring integration
- Security validation in deployment
Quality Assurance Dashboard
Real-time monitoring and reporting for quality assurance teams.
- Test result aggregation
- Performance trend analysis
- Flakiness detection and reporting
- Cross-browser compatibility tracking
Security Compliance Automation
Security validation and compliance checking for applications.
- SSL certificate validation
- CSP policy enforcement
- Security header validation
- Vulnerability scanning integration
Performance Optimization
Performance monitoring and optimization recommendations.
- Web Vitals tracking
- Performance timeline analysis
- Network request optimization
- Resource loading analysis