For more features, use a proper css selector, e.g. But for, the Login button selector is incorrect. ::: You can narrow down query to the n-th match using the nth= selector. Then they search recursively inside open shadow roots in the iteration order. Available values for checked are true, false and "mixed". You can find all the supported roles here. pressed - an attribute that is usually set by aria-pressed. For example, input:right-of(:text("Password")) matches an input field that is to the right of text "Password" - useful when the page has multiple inputs that are hard to distinguish between each other. // Fill the input by targeting the label. css p = page.querySelector ("css=h2") p = page.querySelector ("h2") 3.2 Similarly, locator.nth(index), locator.first(), and locator.last() are tied to implementation and the structure of the DOM, and will target the incorrect element if the DOM changes. text="some >> text". For example, text="Log" does not match because