hard20 pts · first answer countsui-automationplaywrightassertions
Checking that a spinner is gone
This check sometimes passes before the loading spinner has even appeared, and sometimes fails. What is the reliable version?
await page.getByRole('button', { name: 'Search' }).click()
expect(await page.getByTestId('spinner').isVisible()).toBe(false)Discussion 0
Join free to post in the discussion.
Related questions
- Choosing a stable locatorAutomation Test Engineer
- Waiting for an elementAutomation Test Engineer
- Headless modeAutomation Test Engineer
- A missing awaitAutomation Test Engineer
- toBe versus toEqualAutomation Test Engineer
- Browsers Playwright coversAutomation Test Engineer
- Using the trace viewerAutomation Test Engineer
- Comparing decimal resultsAutomation Test Engineer