Playwright · Junior · Question 26 of 75

When would you use pressSequentially() instead of fill()?

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.

Further reading

Problem with a question

Playwright · Junior · question 26

Test yourself

Take the Playwright · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz