-1

I want start Chrome hidden. I using Web Driver version 2.21.0.

I try this:

ChromeOptions options = new ChromeOptions();
optionsChrome.AddArgument("--log-level=3");
IWebDriver driver = new ChromeDriver(options);

I have problem with ChromeDriver(options);

A field initializer cannot reference the non-static field, method, or property Form1.Options

If this possible I want start chrome totally hidden, how I can do that?

sadw1
  • 11
  • 1
  • 1
  • This has nothing to do with selenium. You can't refer any fields in field initializer. Use constructor instead. Refer the duplicate question above your post. – Sriram Sakthivel Feb 25 '16 at 14:50

1 Answers1

1

This may be able to help you in your search. It looks like it shows for Firefox more-so than Chrome, but it might help. Can Selenium Webdriver open browser windows silently in background?

This one looks closer to what you are looking for though ChromeDriver console application hide.

https://sqa.stackexchange.com/questions/2768/how-to-start-a-selenium2-webdriver-window-in-background

Community
  • 1
  • 1