Guides browser automation via botcore's CDP (Chrome DevTools Protocol) command suite. Covers session management (launch/attach/close), navigation and waiting, element interaction (click/type/fill/drag), DOM inspection with Shadow DOM traversal, diagnostics (screenshot/console/network/eval), form filling, multi-page management, and device emulation. Use when automating browsers, scraping web pages, testing web UIs, filling forms, taking screenshots, debugging frontend issues, or working with Shadow DOM components. Triggers: CDP, browser, Chrome, Chromium, automation, screenshot, click, fill form, Shadow DOM, console log, navigate, scrape, headless.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Guides browser automation via botcore's CDP (Chrome DevTools Protocol) command suite. Covers session management (launch/attach/close), navigation and waiting, element interaction (click/type/fill/drag), DOM inspection with Shadow DOM traversal, diagnostics (screenshot/console/network/eval), form filling, multi-page management, and device emulation. Use when automating browsers, scraping web pages, testing web UIs, filling forms, taking screenshots, debugging frontend issues, or working with Shadow DOM components. Triggers: CDP, browser, Chrome, Chromium, automation, screenshot, click, fill form, Shadow DOM, console log, navigate, scrape, headless.
Always launch or attach before any other CDP command.
Always close when done to avoid orphaned Chrome processes.
The workflow is: launch → interact → close.
Sessions are persisted to .botcore/cdp-session.json. If a session file exists, commands connect to the existing session automatically.
2. Selectors and Shadow DOM
Use CSS selectors for element targeting.
Set `deep=True` to traverse Shadow DOM boundaries automatically.
Use `::shadow` syntax for explicit shadow root traversal: `host-element::shadow .inner`.
Most modern web components use Shadow DOM. If a selector doesn't match, try deep=True before assuming the element doesn't exist.
3. Wait Before Interacting
After navigation, wait for the target element before interacting with it.
Use `cdp_wait(selector=...)` for elements, `cdp_wait(text=...)` for content, or `cdp_wait(ms=...)` for timed delays.
4. Console Logs Are Accumulated
Console messages are captured throughout the session and saved to the session file.
Use `cdp_console()` to review them. Use `cdp_console(clear=True)` to reset.