agentleFS
bhaumikmaanbhaumikmaan/claude-code-master-skills/skills/browser-testing/SKILL.md

browser-testing

Skill3 starsChanged 7 months agoMITView on GitHub

Browser automation for testing web applications. Covers tab management, element interaction, console log filtering, screenshot capture, and failure escalation. Use when testing web UI, verifying frontend changes, automating browser interactions, or when asked to check a web page.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use receiving-code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CloudflareSkill

    receiving-code-review

    Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

25 rules. 0 are common, 18 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check for browser tools: Verify that browser automation MCP tools are available.

    line 13
  2. Distinctive:

    Get tab context: Call the tabs/context tool to see what's currently open.

    line 14
  3. Distinctive:

    After navigation, wait for the page to load before snapshotting.

    line 21
  4. Distinctive:

    Always snapshot before clicking, typing, or selecting.

    line 25
  5. Very specific:

    Use fill to replace input contents (clears first), type to append text.

    line 27
  6. Very specific:

    Use fill_form for multi-field forms — it's more reliable than filling fields one at a time.

    line 31
  7. Distinctive:

    After submitting a form, wait for the response and snapshot to verify the result.

    line 32
  8. Distinctive:

    Use element-scoped screenshots for focused verification (e.g., a specific component).

    line 36
  9. Distinctive:

    Use full-page screenshots sparingly — they're large and often not necessary.

    line 37
  10. Distinctive:

    Check console messages after page loads and interactions to catch JavaScript errors.

    line 41
  11. Very specific:

    Default: confirm() returns true, prompt() returns the default value.

    line 53
  12. Distinctive:

    2-3 failures on the same action: Stop retrying. Report what's failing and ask the user for guidance.

    line 58
  13. Distinctive:

    Navigation timeout: Check if the server is running.

    line 60
  14. Distinctive:

    Never retry infinitely: If something doesn't work after 2-3 attempts, investigate why rather than retrying the same action.

    line 61
  15. Distinctive:

    When verifying frontend changes:

    line 65
  16. Distinctive:

    Start the dev server if not already running (check first).

    line 67
  17. Distinctive:

    Check console for errors after each interaction.

    line 71
  18. Distinctive:

    Test edge cases: empty inputs, boundary values, rapid clicks.

    line 73
  19. Distinctive:

    Check network requests to verify API calls are being made correctly.

    line 78
  20. Distinctive:

    Look for failed requests (4xx, 5xx status codes).

    line 79
  21. Distinctive:

    Verify request payloads and response shapes match expectations.

    line 80
  22. Very specific:

    Use code-verification patterns for the structured PASS/FAIL verdict after browser testing.

    line 87
  23. Very specific:

    After finding UI bugs, apply systematic-debugging patterns to trace the root cause.

    line 88
  24. Very specific:

    Use effective-tool-use patterns when starting dev servers and running build commands.

    line 89
  25. Very specific:

    If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above.

    line 93

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Browser Testing

CRITICAL: Always snapshot browser state before interacting. Never assume tabs or elements from a previous session still exist.

Before Any Interaction

  1. Check for browser tools: Verify that browser automation MCP tools are available. If not, tell the user and stop — don't attempt workarounds.
  2. Get tab context: Call the tabs/context tool to see what's currently open. Never assume a tab exists from a prior session.
  3. Snapshot the page: Capture the page structure and element references before clicking, typing, or hovering. Element refs are ephemeral — re-snapshot after any navigation or significant DOM change.

Core Interaction Patterns

Navigation

  • Open new pages in new tabs within the user's existing browser session.
  • After navigation, wait for the page to load before snapshotting. Use short incremental waits (1-2 seconds) with snapshot checks, not a single long wait.
  • Track tab IDs during the session. Never reuse tab IDs from a previous session — they're invalid after the browser restarts.

Element Interaction

  • Always snapshot before clicking, typing, or selecting. Use the element ref from the most recent snapshot.
  • For elements inside scroll containers, scroll the element into view before clicking.
  • Use fill to replace input contents (clears first), type to append text.
  • For contenteditable elements, use fill as well.

Forms

  • Use fill_form for multi-field forms — it's more reliable than filling fields one at a time.
  • After submitting a form, wait for the response and snapshot to verify the result.

Screenshots

  • Take screenshots to verify visual state, capture bugs, or document behavior.
  • Use element-scoped screenshots for focused verification (e.g., a specific component).
  • Use full-page screenshots sparingly — they're large and often not necessary.

Console Log Monitoring

  • Check console messages after page loads and interactions to catch JavaScript errors.
  • Filter console output for relevant patterns — don't dump the entire console.
  • Common patterns to watch for:
    • Error, TypeError, ReferenceError — runtime JS failures
    • Failed to load resource — missing assets, broken API calls
    • CORS — cross-origin issues
    • Warning — React/framework warnings that may indicate bugs

Modal and Dialog Handling

  • Native browser dialogs (alert, confirm, prompt) are non-blocking in automation — they return immediately.
  • Configure dialog handling BEFORE triggering the action that shows the dialog.
  • Default: confirm() returns true, prompt() returns the default value.
  • To test different responses, call the dialog handler with your desired values before clicking the trigger.

Failure Escalation

  • 2-3 failures on the same action: Stop retrying. Report what's failing and ask the user for guidance.
  • Element not found: Re-snapshot the page. If still not found, the DOM may have changed — search for the element by text or role instead of stale refs.
  • Navigation timeout: Check if the server is running. Report the URL and timeout to the user.
  • Never retry infinitely. If something doesn't work after 2-3 attempts, investigate why rather than retrying the same action.

Verification Workflow

When verifying frontend changes:

  1. Start the dev server if not already running (check first).
  2. Navigate to the relevant page.
  3. Snapshot and verify the expected UI elements are present.
  4. Interact with the feature: click buttons, fill forms, navigate.
  5. Check console for errors after each interaction.
  6. Take screenshots of key states for evidence.
  7. Test edge cases: empty inputs, boundary values, rapid clicks.
  8. Report findings with screenshots as evidence.

Network Request Monitoring

  • Check network requests to verify API calls are being made correctly.
  • Look for failed requests (4xx, 5xx status codes).
  • Verify request payloads and response shapes match expectations.
  • Monitor for unnecessary duplicate requests.

CRITICAL REMINDER: Snapshot before every interaction. Track tab IDs per session only. Stop after 2-3 failures and ask the user — don't retry infinitely.

Related Skills

  • Use code-verification patterns for the structured PASS/FAIL verdict after browser testing.
  • After finding UI bugs, apply systematic-debugging patterns to trace the root cause.
  • Use effective-tool-use patterns when starting dev servers and running build commands.

Project Customization

If user-config.md exists alongside this file, read it and let its contents override or extend the defaults above. Common customizations:

  • Dev server URL and start command
  • Authentication steps required before testing
  • Browser-specific test patterns for the project's framework
  • Common UI components and their expected behavior

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.