-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Pre-check
- I know I can edit the docs but prefer to file this issue
Describe the improvement
Unclear documentation
Description of the improvement / report
https://webdriver.io/docs/api/mock/restore/
it('should demonstrate the addValue command', async () => {
const mock = await browser.mock('**\/googlelogo_color_272x92dp.png')
mock.respond('https://webdriver.io/img/webdriverio.png')
await browser.url('https://google.com') // shows WebdriverIO logo instead of Google
mock.restore()
await browser.url('https://google.com') // shows normal Google logo again
})
In docs you do not use await in mock.restore(). it will result to error "Reason: TypeError: Cannot read properties of undefined (reading 'delete')". Please fix docs by adding await to mock.restore
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable