Actions and Forms
Practice clicks, typing, selects, and simple form fills.
What you'll learn
- Use the main user actions.
- Fill forms like a real user.
- Choose the right action for the element.
Playwright AutomationlessonsJump to another lesson
Actions and Forms
Practice clicks, typing, selects, and simple form fills.
Big Picture
One small picture can make this idea easier to hold.
Right action
- Use fill for text fields.
- Use click for buttons.
- Use selectOption for dropdowns.
- Use check for checkboxes.
Wrong action
- Click the text input to type.
- Type into a button.
- Scroll and hope it changes.
- Guess the field type.
VerdictPicking the right action keeps tests clear and stable.
How It Moves
Short steps make the flow easier to see.
Find the field
Locate the input, select, or checkbox.
Choose the action
Pick fill, click, check, or select.
Enter the data
Type the value or choose an option.
Submit it
Press the final button and check the result.
Step By Step
This is the same idea, stretched across time.
- 1
Open the form
Get to the input you want to test.
- 2
Set values
Fill text, select items, or check boxes.
- 3
Submit the form
Trigger the save or search action.
- 4
Check the result
Make sure the page shows the new state.
One Small Model
Think of this like a tiny card you can keep in your pocket.
Form snapshot
5 fieldsQuick Check
What does fill do in a form test?
Map It
One more picture helps you see where this lesson matters most.
Action fit map
Best fit
fill a text field
Good fit
click a button
Bad fit
click a checkbox label and hope
Okay fit
select one option