How to hide FirefoxDriver (using Selenium) without findElement function error in PhantomDriver(headless browser)?
问题 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. var options = new PhantomJSOptions(); options.AddAdditionalCapability("phantomjs.page.settings.userAgent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"); PhantomJSOptions p = new PhantomJSOptions(); var service = PhantomJSDriverService.CreateDefaultService();