Phase Discovery
BrowseGenius transforms five key screens into a comprehensive evaluation with testable phases. This page explains how screen capture works, what the LLM sees, and how to guide it toward accurate phase identification.
Capture overlay
- The popup controls capture. Each click of Capture screen:
- Triggers
chrome.tabs.captureVisibleTabto save a PNG snapshot. - Calls the content script to serialize a DOM snapshot with semantic annotations.
- Stores URL, title, timestamp, notes, and DOM in the
testPlannerstore.
- Triggers
- Captures are capped at five to keep prompts short and targeted. The most recent five are retained automatically.
Notes & metadata
LLM prompts include:
- URL and document title.
- Analyst notes you enter per screen.
- A templatized DOM tree that highlights interactive elements, labeled inputs, roles, and relevant text.
Tips for better output:
- Mention critical data setup: e.g., "user with unpaid invoice", "sandbox mode"
- Flag risky workflows: "delete customer", "bulk import"
- Add references to expected integrations: "stripe webhook appears", "email should trigger"
GPT-4 prompt structure
The DiscoveryService composes a JSON-focused instruction:
- System message identifies BrowseGenius as an elite QA manager.
- User message includes each captured screen block with DOM markup.
- The model must respond with discovered phases and test cases per phase:
appOverview- Application descriptionuserActors- User roles (Guest, Registered, Admin, etc.)phases- Array of navigation phases with:phaseName- Name of the navigation section (Dashboard, Settings, etc.)description- What this phase representspriority(P0/P1/P2)selected- Whether phase is selected for testing- Up to 10
testCasesper phase containing:titlenarrativepriority(P0/P1/P2)- An ordered array of
{ action, expectation }steps
Automatic safeguards:
- Empty or malformed responses bubble a clear error.
- Phases with zero test cases are discarded.
- The planner provides actionable toasts for missing keys or low context.
Editing and regenerating
- Remove individual captures to declutter context.
- Update notes inline by selecting the pencil icon.
- Regenerate the discovery after modifying captures or notes. Each regeneration resets phase selection and test cases while preserving your capture set.
Quality heuristics
Consider capturing a balanced mix of:
- Authentication or onboarding screens.
- High-value dashboards with navigation menus.
- Settings or configuration pages.
- User management or admin panels.
- Core feature sections (e.g., Projects, Tasks, Reports).
The more diverse your five screens, the more accurately AI can identify distinct navigation phases.
Phase-Based Organization
Phases represent navigation sections of your application:
- Dashboard: Main overview and home screen
- Settings: Configuration and preferences
- User Management: User, roles, permissions
- Profile: User profile and account settings
- Reports: Analytics and reporting sections
Each phase can contain up to 10 test cases that validate functionality within that section.