Skip to content

Commit

Permalink
Fix removed setHeadless method.
Browse files Browse the repository at this point in the history
  • Loading branch information
ham1 committed Oct 3, 2023
1 parent e314fd5 commit 2086579
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class ChromeImpl extends AbstractDriver {
@Override
public ChromeOptions getCapabilities() {
var chromeOptions = new ChromeOptions();
chromeOptions.setHeadless(Property.HEADLESS.getBoolean());
if (Property.HEADLESS.getBoolean()) {
chromeOptions.addArguments("--headless=new");
}
return chromeOptions;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ public class FirefoxImpl extends AbstractDriver {
@Override
public FirefoxOptions getCapabilities() {
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setHeadless(Property.HEADLESS.getBoolean());
if (Property.HEADLESS.getBoolean()) {
firefoxOptions.addArguments("--headless");
}
firefoxOptions.setLogLevel(FirefoxDriverLogLevel.INFO);
return firefoxOptions;
}
Expand Down

0 comments on commit 2086579

Please sign in to comment.