getByText - the below script with getByText() works fine async checkActiveStatusdom(text) { const header = await this.screen.findByTestId('erow-GroupCode-0'); console.log(" header" + header) const base = this.within(header).getByText("NEW HIRE") console.log("base value" + base); const check = this.within(header).getByText("check") console.log(" value " + check) await expect(base).toContainText(text); } however findByText - returns Error: toContainText can be only used with Locator object async checkActiveStatusdom(text) { const header = await this.screen.findByTestId('erow-GroupCode-0'); console.log(" header" + header) const base = this.within(header).findByText("LINEHOLDER") console.log("base value" + base); const check = this.within(header).findByText("check") console.log(" value " + check) await expect(base).toContainText(text); console log: headerLocator@query-by-test-id=["erow-GroupCode-0"] base value[object Promise] value [object Promise] why getByText auto waits, but findByText returns no value, and returns Error: toContainText can be only used with Locator object. From the previous ticket , https://github.com/testing-library/playwright-testing-library/issues/507 I was told that findby auto waits and getby does not auto wait, in this scenario it works differently. <img width="1792" alt="Screen Shot 2022-09-19 at 4 52 10 PM" src="https://user-images.githubusercontent.com/113629123/191126543-f43da4e6-1926-49c3-8311-3d09f0060d6a.png">