Protractor Allow Notifications Chrome 46

2019-02-22 05:37发布

问题:

Chrome just auto-updated to version 46. I am trying to run my protractor tests but I always get the Allow Notifications pop-up now. Does anyone know how to get around this? How I can make it always allow notifications for my tests?

I found the chrome pref options here: http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.cc?view=markup

And tried using profile.managed_default_content_settings.notifications and still can't get it to work. I am not sure of the expected value for that pref though? Not sure where I can find that. Does anyone see anything wrong with this:

回答1:

This is what I used in order to get it to work: