Skip to content
Permalink
Browse files

Merge pull request #751 from rosolko/fix-headless

Extend isHeadless method with configuration value. Fix #750 issue.
  • Loading branch information...
BorisOsipov committed May 29, 2018
2 parents ab64b3b + ecaa148 commit f148c9c59bc3f41cd2322640166df7c36792588a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/com/codeborne/selenide/WebDriverRunner.java
@@ -9,6 +9,7 @@
import org.openqa.selenium.support.events.WebDriverEventListener;

import static com.codeborne.selenide.Configuration.browser;
import static com.codeborne.selenide.Configuration.headless;

public class WebDriverRunner {
public static WebDriverContainer webdriverContainer = new WebDriverThreadLocalContainer();
@@ -204,7 +205,7 @@ public static boolean isSafari() {
* Is Selenide configured to use headless browser (HtmlUnit or PhantomJS)
*/
public static boolean isHeadless() {
return isHtmlUnit() || isPhantomjs();
return isHtmlUnit() || isPhantomjs() || headless;
}

/**

0 comments on commit f148c9c

Please sign in to comment.
You can’t perform that action at this time.