Last active
June 22, 2016 03:04
-
-
Save 4M01/6710920b2f4d8dba77887e3d20889988 to your computer and use it in GitHub Desktop.
Create object of chromedriver which will block push notification.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DriverFactory { | |
public static WebDriver createInstance(){ | |
DesiredCapabilities capabilities = DesiredCapabilities.chrome(); | |
ChromeOptions options = new ChromeOptions(); | |
options.addArguments("disable-notifications"); | |
capabilities.setCapability(ChromeOptions.CAPABILITY, options); | |
WebDriver driver = new ChromeDriver(); | |
return driver; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment