Testing · Middle · Question 46 of 75

Why is expect(await locator.isVisible()).toBe(true) worse than await expect(locator).toBeVisible()?

Explanation

Manual checks on async UI are a common source of flaky tests.

Further reading

Problem with a question

Testing · Middle · question 46

Test yourself

Take the Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz