riorio
riorio

Reputation: 6836

Selenide - How to run it with a headless Chrome?

We are trying to developer an automation test, and we found Selenide an interesting and easy framework for running the UI tests.

Selenide needs as an input the browser to use.

So we are passing 2 arguments to the program:

selenide.browser=Chrome
webdriver.chrome.driver=C:\\chromedriver_win32\\chromedriver.exe

And the code looks something like that:

System.setProperty("webdriver.chrome.driver",inputParams.get("webdriver.chrome.driver"));
System.setProperty("selenide.browser", inputParams.get("selenide.browser"));

open("http://example.com:8080/myPages");

All works fine, but we also need it to run in headless mode.

We tried several ways to run it in headless mode, (different param in the selenide.browser, PhantomJs and some other combinations, but with not success till now.

Upvotes: 4

Views: 7058

Answers (2)

silver_mx
silver_mx

Reputation: 1392

You could do also:

 Configuration.headless = true;

Upvotes: 1

riorio
riorio

Reputation: 6836

It turned out that in order to run Selenide in headless mode we need to add system property selenide.headless=true

Upvotes: 2

Related Questions