Playwright technical interview

20 questions at the intermediate level. Answer honestly. Every option explains itself after you choose.

question 01 / 200/0 correct so far

const text = await page.getByTestId('count').textContent(); expect(text).toBe('1'); Why is this less reliable than expect(locator).toHaveText('1')?