Reputation: 41
I have been using the selenium to find text from web page.In that function when i run it opens firefox in foreground. I don't want it to be in foreground. Is there any way to hide that browser.
I have developed this in classlibrary project using xUnit.
Thanks.
Upvotes: 2
Views: 166
Reputation: 146
It can be done easily by using this,
options.AddArgument("headless");
and then,
ChromeDriverService service = ChromeDriverService.CreateDefaultService();
service.HideCommandPromptWindow = true;
Upvotes: 1