You can narrow down query to the n-th match using the nth= selector. state "visible"|"hidden"|"stable"|"enabled"|"disabled"|"editable"#. If given selector resolves to more than one element, the call throws an exception. By Diogo Nunes. Focuses the element, and then uses keyboard.down() and keyboard.up(). If pageFunction returns a Promise, then elementHandle.$$eval() would wait for the promise to resolve and return its value. This will find the first button, because it is the first one in DOM order. For example, consider the following DOM structure: Use the count assertion to ensure that the list has 3 items. Vue selectors are experimental and prefixed with _. You can check the complete list of selectors here. You can also pass a regular expression. console.log(" header" + header) By clicking Sign up for GitHub, you agree to our terms of service and Returns the frame containing the given element. This method clicks the element by performing the following steps: button "left"|"right"|"middle" (optional)#. Locators are strict. https://playwright.dev/docs/input#upload-files, Flake it till you make it: how to detect and deal with flaky tests (Ep. Could you send the commit/PR where this behavior changed? Returns whether the element is disabled, the opposite of enabled. [BUG] Logs say element is visible, but get the error 'Element is not visible' when using force click. Query + click