AutoPilot
Heuristic automation — no selectors needed.
AutoPilot uses heuristics to interact with pages without writing selectors. It figures out what to click, where to type, and how to navigate.
Basic Usage
const session = await strike({ humor: true });
const ap = session.autoPilot();Sign In
await ap.signIn({
email: "user@example.com",
password: "secret",
});AutoPilot finds the email/password fields and submit button automatically.
Search
await ap.search("cykani stealth");Finds the search input, types the query, and submits.
Pagination
await ap.paginate("next");
await ap.paginate("previous");
await ap.paginate(3); // page 3Form Filling
await ap.fillForm({
email: "user@example.com",
password: "secret",
name: "John Doe",
phone: "+1234567890",
});Maps field names to inputs automatically.
Find and Interact
await ap.findAndFill("email", "user@example.com");
await ap.findAndClick("submit");
await ap.findAndSelect("country", "United States");How It Works
AutoPilot analyzes the page structure:
- Page type detection — login, signup, search, form, listing, article
- Element discovery — finds inputs, buttons, links by context
- Action planning — determines the right sequence of actions
- Execution — performs actions with human-like timing
Page Types
| Type | Detection |
|---|---|
login | Email/password fields + submit |
signup | Registration form fields |
search | Search input + submit |
form | Multiple input fields |
listing | Grid/list of items |
article | Long-form content |
captcha | CAPTCHA challenge detected |
generic | Unknown page type |
Limitations
AutoPilot works best with standard page layouts. For complex or custom UIs, use DOM-first methods:
// DOM-first (explicit selectors)
await session.click("#my-button");
await session.fill("#my-input", "value");
// AutoPilot (heuristic)
await ap.findAndClick("submit");
await ap.findAndFill("email", "value");