Galet
Galet

Reputation: 6269

How to run headless mode in java

I am running test in java selenium test using firefox/chrome driver

I want to run the test in background.

In ruby, i use this gem

https://rubygems.org/gems/headless

How to do in java?

Upvotes: 0

Views: 2905

Answers (2)

Nicholas DiPiazza
Nicholas DiPiazza

Reputation: 10585

There is a new Firefox headless mode https://developer.mozilla.org/en-US/Firefox/Headless_mode

There is an example of how to use it in Node.js

One would think that would translate over to Java quite well. I'm going to give it a shot.

Upvotes: 1

Eugene
Eugene

Reputation: 1895

Other option is using the HtmlUnitDriver which based on HtmlUnit project which "GUI less browser".

//create webdriver
 WebDriver driver = new HtmlUnitDriver();

Upvotes: 0

Related Questions