Playwright · Junior · Question 26 of 75
When would you use pressSequentially() instead of fill()?
- 1When the input field must stay completely empty
- 2When the page reacts to each separate key press
- 3When filling a field that is hidden from users
Show the answer
Correct answer: When the page reacts to each separate key press
Explanation
Some widgets (autocomplete, masks) handle individual keydown events. pressSequentially('abc') types character by character; otherwise fill() is faster and simpler.