Browser Testing

Gemini Skill: Browser Testing for Local Files

IzzyFresh Updated

File contents

Gemini Skill: Browser Testing for Local Files

This skill documents the rule for testing local HTML files using the browser agent in a remote environment.

Rule

Do not use file:/// URLs with the browser agent. They often fail due to access restrictions in remote or containerized environments.

Recommended Workflow

To allow the browser agent to view local HTML files:

  1. Start a local web server in the directory containing the files. Example using Python:

    python3 -m http.server 8000
    

    Note: Ensure the port is available. If not, try 8001, 8080, etc.

  2. Access via localhost using the browser agent. URL: http://localhost:8000/ (or specific filename like index.html).

This allows the browser agent to render the page and take screenshots successfully.

Remember to Cleanup

Always kill the background server task when finished testing to free up the port!

IzzyFresh/gemini-skills/tree/main/skills/browser-testing commit da451631a6

Frequently asked questions

npx skillmds@latest add izzyfresh/browser-testing