/Log\s*in/i - body can be a JavaScript-like regex wrapped in / symbols. Learn more about :has-text() and :text() pseudo classes. Sign in If pageFunction returns a Promise, then elementHandle.$eval() would wait for the promise to resolve and return its value. #nav-bar :text("Home") - the :text() pseudo-class can be used inside a css selector. console.log(" header" + header) The syntax is very similar to attribute selectors and supports all attribute selector operators. Clauses are selectors that are separated by >>, where each clause is a selector that is relative to the one before it. Could you observe air-drag on an ISS spacewalk? QA's and developers should define explicit test ids and query them with page.getByTestId(). state "attached"|"detached"|"visible"|"hidden" (optional)#, strict boolean (optional) Added in: v1.15#. const check = this.within(header).getByText("check") This is useful for writing large selectors in a more compact form. If the