2

I try to load ChromeDriver with adblock, and somehow it reloads downloading the extension everytime it runs and shows this message:

If you see this message every time you start AdBlock, please make sure you are not using a file cleaner that also cleans 'localStorage' files.

 var options = new ChromeOptions();
                options.AddArgument("--no-experiments");
                options.AddArgument("--disable-translate");
                options.AddArgument("--disable-plugins");                
                options.AddArgument("--no-default-browser-check");
                options.AddArgument("--clear-token-service");
                options.AddArgument("--disable-default-apps");
                options.AddArgument("--no-displaying-insecure-content");

                options.AddArgument("--disable-bundled-ppapi-flash");
                options.AddExtension(@"D:\AdBlock-v2.6.5\adblock.crx");

               using (IWebDriver driver = new ChromeDriver(options))
                {
                    driver.Navigate().GoToUrl(url);
                }
nam vo
  • 3,271
  • 12
  • 49
  • 76

1 Answers1

0

Try to use the same chrome profile on every run. This must resolve the issue.

Code to do this located here: Load Chrome Profile using Selenium WebDriver

Andrew_STOP_RU_WAR_IN_UA
  • 9,318
  • 5
  • 65
  • 101