I try to make hidden FirefoxDriver. According to my research I must use PhantomJSDriver but when I use PhantomJSDriver driver.FindElement statement no longer does not work.<
Since version 55+ for Linux and 56+ for Windows & OSX, Firefox supports the -headless command line option. It shall be used like this:
o = selenium.webdriver.FirefoxOptions()
o.set_headless()
driver=selenium.webdriver.Firefox(options=o)
The corresponding code in C# would be:
var o = new FirefoxOptions()
o.AddArgument('-headless')
var driver = new FirefoxDriver(o)
Because the .NET wrapper doesn't support the .headless property.