easyStudy question · answer published in Playwright interview questions, so no pointsplaywrightasync-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
- Finding a button by role and nameAutomation Test Engineer
- Recording a first draft of a testAutomation Test Engineer
- Stepping through a failing testAutomation Test Engineer
- What a browser context gives youAutomation Test Engineer
- Uploading a fileAutomation Test Engineer
- Testing a phone layoutAutomation Test Engineer