2

Whenever I am running my automation test script using Spec-flow & Selenium with C#, there is a ad on popup on GoogleChrome whose screenshot I am attaching below, I want dismiss the pop up and make sure it doesn't show up during execution.

How Can I do that.? Please explain detail

https

Saurabh Gaur
  • 23,507
  • 10
  • 54
  • 73

2 Answers2

0

To dismiss this popup, you should add arguments as --disable-extensions in your ChromeOptions during initialization of ChromeDriver as below :-

ChromeOptions options = new ChromeOptions();
options.AddArguments("--disable-extensions");
IWebDriver driver = new ChromeDriver(options);
Saurabh Gaur
  • 23,507
  • 10
  • 54
  • 73
  • I used your above code, but its still showing that pop-up :( Do i need to give anything else in place of "--disable-extensions" ?? – Sharath Kumar T Sep 07 '16 at 09:38
  • But it is working in my case, you can see this link too http://stackoverflow.com/questions/23087724/chromedriver-disable-developer-mode-extensions-pop-up-on-selenium-webdriver-au – Saurabh Gaur Sep 07 '16 at 09:57
0

To dismiss the pop up, you can do something as simple as clicking on the body of the page, when running your tests.

If you don't want to see it at all during test execution, then perhaps you should follow the posted answer about disabling extensions.

Code Rocker
  • 500
  • 4
  • 15