Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChromeOptions defined in globals doesn't get passed to chromedriver in v2.x #3183

Closed
lukaszw82 opened this issue May 10, 2022 · 6 comments · Fixed by #3288
Closed

ChromeOptions defined in globals doesn't get passed to chromedriver in v2.x #3183

lukaszw82 opened this issue May 10, 2022 · 6 comments · Fixed by #3288
Assignees
Labels

Comments

@lukaszw82
Copy link

Describe the bug

I'm upgrading from 1.7.8 to 2.1.4 and cannot run tests in chrome headless mode anymore (works fine on 1.7.8).
I'm using chromedriver v 100.0.0. Running tests in 2.x seems to ignore chromeOptions headless and browser is opened during test run. Same configuration works as expected in v1.7.8.

Below is a snippet from nightwatch.conf.js file:

const headless = true; // passed via env variable

module.exports = {
   test_settings: {
    default: {
      desiredCapabilities: {
        browserName: 'chrome',
        chromeOptions: {
          args: [
            ...(headless ? ['--headless'] : []),
            '--verbose',
          ]
        },
      },
    },
}

Configuration

nightwatch.json

{
  "your": { "config": "here" }
}

Your Environment

Executable Version
nightwatch --version 2.1.4
npm --version 6.14.12
node --version 14.16.1
chromedriver 100.0.0
Windows 10 19043.1645
@beatfactor
Copy link
Member

Can you post the verbose log as well?

@lukaszw82
Copy link
Author

Attaching log file
log.txt

@beatfactor beatfactor added the bug label May 13, 2022
@beatfactor beatfactor added this to To do (Bugs) in Nightwatch v2 May 15, 2022
@garg3133
Copy link
Member

@lukaszw82 Can you try replacing chromeOptions with 'goog:chromeOptions' in your config file?

@beatfactor
Copy link
Member

Using chromeOptions should also continue to work though.

@garg3133
Copy link
Member

I tried using chromeOptions and it didn't work, while it is working with goog:chromeOptions.

Verbose while using chromeOptions:
image

Verbose while using goog:chromeOptions:
image

@beatfactor
Copy link
Member

@garg3133 yes, I am saying that we have to ensure that both version continue working.

@garg3133 garg3133 self-assigned this Jul 12, 2022
Nightwatch v2 automation moved this from To do (Bugs) to Done Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants