ChromeDriver console application hide

前端 未结 5 644
借酒劲吻你
借酒劲吻你 2020-12-01 18:04

I have created a player which will automate chrome using selenium and ChromeDriver in C#. It\'s working fine.

Issue what I am facing is, when it creates an object fo

5条回答
  •  借酒劲吻你
    2020-12-01 19:03

    This is possible now, using the headless option. Might not have been available then. Running Chrome Headless

    Translated into C#, you can do this:

    ChromeOptions options = new ChromeOptions();
    options.AddArgument("headless");
    ChromeDriver driver = new ChromeDriver(options);
    

    Now the browser window is invisible, while the rest of the program stays the same.

提交回复
热议问题