Can't accept alert in a new tab
See original GitHub issue[//]: # NOTE: This repository only maintains packages that are listed in the Readme. Please make sure that your issue is directly caused by one of these packages and if not file an issue in the correct 3rd party package repository.
Environment (please complete the following information):
- WebdriverIO version: [4.3.6]
- Mode: [Standalone mode]
- Node.js version: [12.9.1]
- Browser name and version: [Chrome]
- Platform name and version: [MacOS]
- Additional wdio packages used (if applicable): [wdio-chromedriver-service]
Config of WebdriverIO
Wdio/Async
I use webdriverio by calling the webdriverio Remote
Method
capabilities: { services: [‘chromedriver’] browserName: ‘chrome’ }
Describe the bug The browser can’t accept alert When the browser switch to new tab
To Reproduce
it('test', async() => {
const tab = await browser.createWindow('tab')
await browser.switchToWindow(tab.handle);
// Open the developer tool and execute javascript "alert("TEST")"
await waitTime(8000) // wait 8 seconds because of executing javascript: alert("TEST")
await browser.acceptAlert();
}
Expected behavior the browser accepts alert in the new tab
Log after calling the browser.acceptAlert() the logger doesn’t write any log and timed out (after 60 seconds)
Please use the correct markdown
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
A big problem: can not accept the alert when use selenium ...
here is the answer: ... It can work correctly! After accept the primitive alert, other alert popup in the second tab can be...
Read more >Selenium/Chromedriver hangs on a new tab containing an alert
It feels like Selenium wants to switch to the other page and interact with it somehow but it cannot because there is an...
Read more >How to handle PopUps and Alerts in Selenium with examples?
To switch the control to the recently opened pop up window Driver.switchTo().alert(); is used; Alert is accepted using alert.accept(); method.
Read more >Google Chrome - Open pop-ups in new tab? - Super User
There is a 3 step workaround you can do this by. You should know when the popup will be opened. Popups are blocked...
Read more >Remove unwanted ads, pop-ups and malware - Android
If you're seeing some of these problems with Chrome, you might have unwanted software or malware installed on your computer: Pop-up ads and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
PR was merged and released. Closing.
@ilamparithiNatarajan I finish fixing this bug soon