0

I have this popup

enter image description here

and I'm trying to make it either allow, deny with ChromeDriver.

Translates to: secure.runescape.com wants the following

Save files on this device (Allow and deny as options)

Tried:

 ChromeOptions chrome_options = new ChromeOptions();
                chrome_options.AddArguments("--disable-notifications");

This still showed up the popup

IAlert simpleAlert = driver.SwitchTo().Alert();
                simpleAlert.Accept();

This gave the error that there is no alert.

1 Answers1

0

You can disable notfications, code belongs to java. You can change it into C sharp

ChromeOptions chrome_options = new ChromeOptions();
chrome_options.addArguments("--disable-notifications");
System.setProperty("webdriver.chrome.driver","path of chromedriver.exe);
WebDriver driver =new ChromeDriver(chrome_options);
iamsankalp89
  • 4,607
  • 2
  • 15
  • 36