Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Type text into focused input fields
.claude/skills/testdriverai-testdriver-type/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 225% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 135% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 199% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 357% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 207% | 0% |
<!-- Generated from type.mdx. DO NOT EDIT. -->
Type text or numbers into the currently focused input field with optional delay between keystrokes.
javascriptawait testdriver.type(text, options)
<ParamField path="text" type="string | number" required> Text to type (can be a string or number) </ParamField>
<ParamField path="options" type="object | number"> Typing options (or legacy delay number)
<Expandable title="properties"> <ParamField path="delay" type="number" default={250}> Delay between keystrokes in milliseconds </ParamField>
<ParamField path="secret" type="boolean" default={false}> If true, treats text as sensitive data (won't be logged or stored in debug info/dashcam) </ParamField> </Expandable> </ParamField>
Promise<void>
javascript// Type text await testdriver.type('hello@example.com'); // Type numbers await testdriver.type(12345); // Type with custom delay (legacy syntax) await testdriver.type('slow typing', 500); // 500ms between each character // Type with options object await testdriver.type('text', { delay: 500 });
javascript// ✅ SECURE - Mark as secret to prevent logging const passwordField = await testdriver.find('password input'); await passwordField.click(); await testdriver.type('MySecureP@ssw0rd', { secret: true }); // Password NOT logged in dashcam or debug output // ❌ INSECURE - Password will be logged await testdriver.type('MySecureP@ssw0rd'); // Password appears in logs, dashcam replay, and debug info // Use secret for any sensitive data await testdriver.find('api key input').click(); await testdriver.type('sk-1234567890abcdef', { secret: true }); await testdriver.find('credit card input').click(); await testdriver.type('4111111111111111', { secret: true });
<Warning> Always use secret: true for passwords and sensitive data!
Without this option, typed text appears in:
</Warning>
javascript// Focus field and type const emailField = await testdriver.find('email input'); await emailField.click(); await testdriver.type('user@example.com'); // Tab to next field and type await testdriver.pressKeys(['tab']); await testdriver.type('John Doe'); // Type password securely await testdriver.pressKeys(['tab']); await testdriver.type('MySecureP@ssw0rd', { secret: true });
javascriptconst searchBox = await testdriver.find('search input'); await searchBox.click(); // Clear existing text await testdriver.pressKeys(['ctrl', 'a']); // Select all await testdriver.type('new search query');
<Check> Focus the field first
Always click the input field or navigate to it before typing:
javascript const input = await testdriver.find('username input'); await input.click(); await testdriver.type('testuser'); </Check>
<Check> Use Tab for navigation
Navigate between fields using Tab instead of clicking each one:
javascript const firstField = await testdriver.find('first name'); await firstField.click(); await testdriver.type('John');
await testdriver.pressKeys('tab']); await testdriver.type('Doe');
await testdriver.pressKeys('tab']); await testdriver.type('john@example.com'); </Check>
<Check> Clear fields before typing
Clear existing content to avoid appending:
javascript const input = await testdriver.find('search field'); await input.click(); await testdriver.pressKeys(['ctrl', 'a']); // Select all await testdriver.type('new search'); </Check>
<Warning> Field must be focused
Typing will only work if an input field is currently focused. If no field is focused, the text may be lost or trigger unexpected keyboard shortcuts. </Warning>
<AccordionGroup> <Accordion title="Login Forms"> javascript await testdriver.focusApplication('Google Chrome');
const usernameField = await testdriver.find('username input'); await usernameField.click(); await testdriver.type('testuser@example.com');
await testdriver.pressKeys('tab']); await testdriver.type('MyP@ssword123', { secret: true });
await testdriver.pressKeys('enter']); </Accordion>
<Accordion title="Search Fields"> javascript const searchBox = await testdriver.find('search input'); await searchBox.click(); await testdriver.type('laptop computers'); await testdriver.pressKeys('enter']);
// Wait for results await new Promise(r => setTimeout(r, 2000)); </Accordion>
<Accordion title="Multi-Field Forms"> javascript // First field const nameField = await testdriver.find('full name input'); await nameField.click(); await testdriver.type('Jane Smith');
// Navigate with Tab await testdriver.pressKeys('tab']); await testdriver.type('jane.smith@example.com');
await testdriver.pressKeys('tab']); await testdriver.type('+1-555-0123');
await testdriver.pressKeys('tab']); await testdriver.type('123 Main Street'); </Accordion>
<Accordion title="Text Editors"> javascript const editor = await testdriver.find('text editor area'); await editor.click();
await testdriver.type('# My Document', 100); await testdriver.pressKeys('enter', 'enter']); await testdriver.type('This is the first paragraph.', 50); </Accordion>
<Accordion title="Numeric Input"> javascript const quantityField = await testdriver.find('quantity input'); await quantityField.click();
// Clear field await testdriver.pressKeys('ctrl', 'a']);
// Type number await testdriver.type(5); </Accordion> </AccordionGroup>
Adjust the delay parameter based on your needs:
javascript// Fast typing (100ms delay) await testdriver.type('quick entry', 100); // Normal typing (250ms - default) await testdriver.type('standard speed'); // Slow typing (500ms delay) - useful for fields with live validation await testdriver.type('slow and steady', 500); // Very slow (1000ms delay) - for problematic fields await testdriver.type('one by one', 1000);
<Note> Some applications with live validation or autocomplete may require slower typing speeds to avoid race conditions. </Note>
javascript// Email addresses await testdriver.type('user@example.com'); // URLs await testdriver.type('https://example.com/path?query=value'); // Passwords with special characters await testdriver.type('P@ssw0rd!#$%'); // Paths await testdriver.type('C:\\Users\\Documents\\file.txt'); // Multi-line text (use pressKeys for Enter) await testdriver.type('Line 1'); await testdriver.pressKeys(['enter']); await testdriver.type('Line 2');
javascriptimport { beforeAll, afterAll, describe, it, expect } from 'vitest'; import TestDriver from 'testdriverai'; describe('Form Filling with Type', () => { let testdriver; beforeAll(async () => { client = new TestDriver(process.env.TD_API_KEY); await testdriver.auth(); await testdriver.connect(); }); afterAll(async () => { await testdriver.disconnect(); }); it('should fill out registration form', async () => { await testdriver.focusApplication('Google Chrome'); // Email field const emailField = await testdriver.find('email input field'); await emailField.click(); await testdriver.type('john.doe@example.com'); // Tab through form fields await testdriver.pressKeys(['tab']); await testdriver.type('John'); await testdriver.pressKeys(['tab']); await testdriver.type('Doe'); await testdriver.pressKeys(['tab']); await testdriver.type('MySecureP@ssword123'); await testdriver.pressKeys(['tab']); await testdriver.type('MySecureP@ssword123'); // Confirm password // Verify fields were filled const result = await testdriver.assert('all form fields are filled'); expect(result).toBeTruthy(); }); it('should update search query', async () => { const searchBox = await testdriver.find('search input'); await searchBox.click(); // Type initial search await testdriver.type('laptops'); await testdriver.pressKeys(['enter']); await new Promise(r => setTimeout(r, 2000)); // Update search await searchBox.click(); await testdriver.pressKeys(['ctrl', 'a']); // Select all await testdriver.type('gaming laptops'); await testdriver.pressKeys(['enter']); // Verify new search await testdriver.assert('search results for "gaming laptops" are shown'); }); });
pressKeys() - Press keyboard keys and shortcutsfind() - Locate input fieldsclick() - Focus input fields| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 5,883 | 4,547 | -23% | 1 | 1 | 0% | 1,028 | 3,338 | +225% | 0 | 0 | — |
case-02 | fail→pass | 8,620 | 3,876 | -55% | 1 | 1 | 0% | 1,416 | 3,325 | +135% | 0 | 0 | — |
case-03 | fail→pass | 7,519 | 6,475 | -14% | 1 | 1 | 0% | 1,292 | 3,860 | +199% | 0 | 0 | — |
case-04 | fail→pass | 3,817 | 3,162 | -17% | 1 | 1 | 0% | 685 | 3,129 | +357% | 0 | 0 | — |
case-05 | pass→pass | 4,713 | 2,421 | -49% | 1 | 1 | 0% | 762 | 2,949 | +287% | 0 | 0 | — |
case-06 | pass→pass | 7,524 | 2,568 | -66% | 1 | 1 | 0% | 1,264 | 2,939 | +133% | 0 | 0 | — |
case-07 | pass→pass | 10,292 | 3,057 | -70% | 1 | 1 | 0% | 1,596 | 3,028 | +90% | 0 | 0 | — |
case-08 | fail→pass | 5,579 | 3,016 | -46% | 1 | 1 | 0% | 1,022 | 3,137 | +207% | 0 | 0 | — |
case-09 | fail→pass | 5,687 | 3,668 | -36% | 1 | 1 | 0% | 973 | 3,186 | +227% | 0 | 0 | — |
case-10 | pass→pass | 5,780 | 3,166 | -45% | 1 | 1 | 0% | 974 | 3,129 | +221% | 0 | 0 | — |
case-11 | fail→pass | 6,598 | 4,677 | -29% | 1 | 1 | 0% | 1,072 | 3,408 | +218% | 0 | 0 | — |
case-12 | fail→pass | 11,376 | 2,488 | -78% | 1 | 1 | 0% | 1,750 | 2,746 | +57% | 0 | 0 | — |
case-13 | pass→pass | 5,355 | 4,250 | -21% | 1 | 1 | 0% | 822 | 3,310 | +303% | 0 | 0 | — |
case-14 | pass→pass | 12,970 | 9,112 | -30% | 1 | 1 | 0% | 2,019 | 3,778 | +87% | 0 | 0 | — |
case-15 | fail→pass | 7,982 | 2,141 | -73% | 1 | 1 | 0% | 1,288 | 2,889 | +124% | 0 | 0 | — |
case-16 | pass→pass | 3,902 | 2,846 | -27% | 1 | 1 | 0% | 650 | 3,072 | +373% | 0 | 0 | — |
case-17 | fail→pass | 4,370 | 2,613 | -40% | 1 | 1 | 0% | 776 | 2,967 | +282% | 0 | 0 | — |
case-18 | pass→pass | 5,295 | 2,756 | -48% | 1 | 1 | 0% | 908 | 3,003 | +231% | 0 | 0 | — |
case-19 | pass→pass | 5,237 | 2,705 | -48% | 1 | 1 | 0% | 792 | 2,971 | +275% | 0 | 0 | — |
case-20 | pass→pass | 5,488 | 1,353 | -75% | 1 | 1 | 0% | 824 | 2,640 | +220% | 0 | 0 | — |
case-21 | fail→pass | 12,877 | 2,161 | -83% | 1 | 1 | 0% | 2,266 | 2,811 | +24% | 0 | 0 | — |
case-22 | pass→pass | 7,553 | 2,843 | -62% | 1 | 1 | 0% | 1,238 | 2,888 | +133% | 0 | 0 | — |
case-23 | fail→pass | 9,046 | 2,269 | -75% | 1 | 1 | 0% | 1,277 | 2,801 | +119% | 0 | 0 | — |
case-24 | pass→pass | 4,703 | 2,389 | -49% | 1 | 1 | 0% | 571 | 2,935 | +414% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +50 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.