-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: <Alert closing automatically> #8351
Comments
@praveenngp15 thanks for raising the issue. I am not sure how this is an issue with WebdriverIO 🤔 WebdriverIO doesn't automatically close alerts. Can you verify that your application doesn't do this? |
When adding video reporter the alert is automatically accepting const video = require('wdio-video-reporter'); reporters: ['spec',
If reporter is not added it is working fine. |
Can you create a mini project that reproduces this problem? |
Created sample project and pushed in below git |
Thanks, feel free to help us investigate this issue. Thank you! |
I have investigated the issue and the problem lies in making screenshots in the afterCommand hook which closes the alert. |
Thanks for investigating @erwinheitzman I assume one option could be that the video reporter checks wether an alert is open and if so skips the |
That would be a simple fix we could also look into other ways of creating videos |
Raised an issue within the video reporter. Any contributions are appreciated. |
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
"@wdio/cli": "^7.19.3",
Node.js Version
16.15.0
Mode
WDIO Testrunner
Which capabilities are you using?
What happened?
Alert is closing automatically
await browser.url('https://chercher.tech/practice/popups')
await $("//input[@name='alert']").click()
await browser.pause(10000)
await browser.acceptAlert()
So not able to accept or dismiss the alert
What is your expected behavior?
Alert should not close automatically
How to reproduce the bug.
await browser.url('https://chercher.tech/practice/popups')
await $("//input[@name='alert']").click()
await browser.pause(10000)
await browser.acceptAlert()
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: