Testing · Middle · Question 46 of 75
Why is expect(await locator.isVisible()).toBe(true) worse than await expect(locator).toBeVisible()?
- ✓Correct answer: The first checks once without waiting; the web-first assertion retries until the timeout
- 2The first doesn't compile
- 3They are equivalent
Explanation
Manual checks on async UI are a common source of flaky tests.