Live debugging
Root cause
- The login button locator was wrong:
await expect(page.getByRole('link', { name: 'Login' })).toBeVisible()
await expect(page.getByRole('link', { name: 'Log in' })).toBeVisible()
- Sometimes elements aren't where we think they are. Sometimes they lack accessibility or we use wrong locators. But sometimes we just make mistakes! No matter what happens, using a debugger is so helpful.