easy5 pts · first answer countsplaywrightasync-javascript
A missing await
This Playwright test sometimes passes and sometimes fails. What is the most likely cause?
test('saves profile', async ({ page }) => {
await page.goto('/profile')
page.getByLabel('Name').fill('Asha')
await page.getByRole('button', { name: 'Save' }).click()
await expect(page.getByText('Saved')).toBeVisible()
})Discussion 0
Join free to post in the discussion.
Related questions
- Browsers Playwright coversAutomation Test Engineer
- Using the trace viewerAutomation Test Engineer
- Web-first assertionsAutomation Test Engineer
- Speeding up logged-in testsAutomation Test Engineer
- A custom Playwright fixtureAutomation Test Engineer
- Splitting a suite across machinesAutomation Test Engineer
- Cypress values are not returnedAutomation Test Engineer
- Tests for several user rolesAutomation Test Engineer