Reputation: 27
I am using Protractor and I'm wondering how to handle this pop-up from Chrome. I want to click the button "Open magnet URI". Check out the picture to see what I mean.
When the button is being clicked an external program will start.
I have tried with browser.switchTo().alert().accept();
But I always get "no such alert".
Can someone please help me?
Upvotes: 0
Views: 1192
Reputation: 1
As per new chrome drivers disable-infobars is not working. Add following to make it work in your chrome options:
'excludeSwitches': ['enable-automation'],
'useAutomationExtension': false
Upvotes: 0
Reputation: 27
Thank you for an answer
I just found a solution for my problem
Added this to my config
capabilities: {
'browserName': 'chrome',
chromeOptions: {
args: [
'--window-size=375,667', //'--headless', '--disable-gpu',
'disable-infobars',
],
'prefs': {
protocol_handler: {
excluded_schemes: {
'bankid': false
}
}
}
}
},
Upvotes: 1
Reputation: 1442
Try with the below chrome option
in your config
capabilities: {
browserName: 'chrome',
chromeOptions: {
// disable "chrome pop-up"
'args': ['disable-infobars=true','--disable-popup-blocking'],
// disable Password manager popup
'prefs': {
'credentials_enable_service': false
}
}
},
Hope it hleps you
Upvotes: 1