Playwright · Method
locator.fill
locator.fill() sets the value of an input, textarea, or contenteditable element. It is Playwright's usual method for entering form text and can also clear a field with an empty string.
Last updated
- Since
- v1.14
Syntax
locator.fill(value, *, timeout=None, no_wait_after=None, force=None, trial=None)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
get_by_labelget_by_placeholderget_by_rolepress_sequentiallyinput_value