TargetQA
TypeScript
Lesson 3 of 4 · 8 min

1.3 Form Automation: Inputs, Checkboxes & Dropdowns

AI

Lesson Audio Narration

### Interacting with Form Controls Playwright simplifies form interactions with high-level actions: ```typescript // 1. Text Inputs - Clears and types automatically await page.getByLabel('Email address').fill('learner@targetqa.com'); // 2. Checkboxes - Ensures it is checked await page.getByLabel('Remember me').check(); // 3. Dropdowns (Select) - Selects by value or label await page.getByLabel('Country').selectOption({ label: 'United States' }); ``` #### Automatic Waiting: Before performing `.fill()` or `.check()`, Playwright automatically waits for: - Element to be attached to the DOM - Element to be visible - Element to be enabled (not disabled) - Element to be stable (no active animations)
Your Task

Fill the email input with `'qa@targetqa.com'` using `getByLabel('Email')` and check the `'Remember me'` checkbox.

Common doubts
Did you find this lesson helpful?
solution.ts
Loading code editor…
Execution Console

Click "Run Code" to test your implementation.