Reputation: 155
I'm using selenium + phantomjs in my application, but I want to start my application, selenium and phantomjs window in background. How can I do it?
I tried:
PhantomJSOptions options = new PhantomJSOptions();
options.AddAdditionalCapability("start-maximized", false);
IWebDriver driver = new PhantomJSDriver(Environment.CurrentDirectory + @"\drivers", options);
Upvotes: 4
Views: 1422
Reputation: 11446
var serviceJs = PhantomJSDriverService.CreateDefaultService(phantomPath);
serviceJs.HideCommandPromptWindow = true;
Instance = new PhantomJSDriver(serviceJs);
Upvotes: 6