You can also chain multiple filters to narrow down the selection. use role locators. {name: 'foo'} enables foo=myselectorbody selectors. You can locate each element by it's implicit role: Role locators include buttons, checkboxes, headings, links, lists, tables, and many more and follow W3C specifications for ARIA role, ARIA attributes and accessible name. Photo by Patrick Tomasso on Unsplash. This method waits for actionability checks, then focuses the element and selects all its text content. In the snippet below, the underlying DOM element will be located twice, once prior to every action. using click instead of selectOption. Im using playwright to send file like this: waiting for selector When set to "initial", text caret behavior will not be changed. Usually I see retries in the inspector (or when using DEBUG=pw:api) but not this time. If the element already has the right checked state, this method returns immediately. If given selector resolves to more than one element, the call throws an exception. #nav-bar :text-is("Home") - the :text-is() pseudo-class can be used inside a css selector, for strict text node match. Although maybe it makes no difference. Returns the return value of pageFunction. ElementHandle instances can be used as an argument in page.$eval() and page.evaluate() methods. Demo Link. Multiple options can be selected. An example of typing into a text field and then submitting the form: Time to wait between key presses in milliseconds. However, text="Log" matches , because