Back to Docs
Interaction

click

Click an element by CSS selector. Auto-waits up to 5 seconds for the element to appear, then scrolls it into view.

Usage

$ cdpilot click <selector>

Arguments

NameRequiredDescription
selectorrequiredCSS selector of the element to click

Examples

Click a submit button

$ npx cdpilot click "button.submit"

Click an element by ID

$ npx cdpilot click "#login-btn"