4 Likes
To accept the location popup in firefox you can set the preference in the FirefoxProfile with Desired Capabilities before accessing the URL in your test case such as:
- allow,
- block
WebDriver driver ;
FirefoxProfile prof = new FirefoxProfile();
prof.setPreference(“permissions.default.desktop-notification”, 1);
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, prof);
driver = new FirefoxDriver(capabilities);
driver.get(“URL”);
2 Likes