Skip to content

Commit

Permalink
fix webdriver breaking change removing headless()
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Feb 1, 2024
1 parent 072aa33 commit d7a7ead
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/get-webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const getWebdriver = () => {
const service = new chrome.ServiceBuilder(chromedriverPath);

const webdriver = new Builder()
.setChromeOptions(new chrome.Options().headless())
.setChromeOptions(new chrome.Options().addArguments('headless'))
.forBrowser('chrome')
.setChromeService(service)
.build();
Expand Down
13 changes: 6 additions & 7 deletions test/integration/full/test-webdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ function buildWebDriver(browser) {
if (browser === 'chrome') {
const service = new chrome.ServiceBuilder(chromedriver.path).build();

const options = new chrome.Options()
.headless()
.addArguments([
'--no-sandbox',
'--disable-extensions',
'--disable-dev-shm-usage'
]);
const options = new chrome.Options().addArguments([
'headless',
'--no-sandbox',
'--disable-extensions',
'--disable-dev-shm-usage'
]);
webdriver = chrome.Driver.createSession(options, service);
} else if (browser === 'firefox') {
const options = new firefox.Options().headless();
Expand Down

0 comments on commit d7a7ead

Please sign in to comment.