Reputation: 633
I want to handle the notification popup in jabong website using selenium.
Upvotes: 2
Views: 2498
Reputation: 473833
You cannot control this kind of "popup" via Selenium directly.
What you can do is to:
disable all push notifications for the browser session entirely:
FirefoxProfile ffprofile = new FirefoxProfile();
ffprofile.setPreference("dom.webnotifications.enabled", false);
WebDriver driver = new FirefoxDriver(ffprofile);
load the existing profile in which you had pre-set up the desired behavior for the push notifications for this site:
jabong.com
and choose the desired push notification valueFYI, when you configure push notifications in the browser, Firefox inserts/updates a site-specific record inside permissions.sqlite
SQLite database file which you can find inside the profile directory.
Upvotes: 5