john-doherty/selenium-cucumber-js

How do I make my tests run with chrome 78?

marcdomain opened this issue · 3 comments

My chrome browser auto updates to 78 and I have installed chromedriver 78 npm package manually, yet my tests don't run. selenium-cucumber-js only support chrome 76. What do I do to fix this problem?

You need to tell NPM to override the Chromedriver referenced in selenium-cucumber-js's package.json.

  1. Run npm install. This will create a package-lock.json file
  2. Run npm shrinkwrap. This converts package-lock.json to npm-shirnkwrapjson, a static file that gives the specific versions of nested dependencies. We edit this file, commit it to our repo and every time someone does npm install, NPM uses this file to figure out the dependencies to use.
  3. Edit the npm-shrinkwrap.json, changing the following sections:
  • selenium-cucumber-js.dependencies.chromedriver.version: 78.0.1
  • selenium-cucumber-js.dependencies.chromedriver.resolved: https://registry.npmjs.org/chromedriver/-/chromedriver-78.0.1.tgz
  • selenium-cucumber-js.dependencies.chromedriver.integrity: sha512-eOsyFk4xb9EECs1VMrDbxO713qN+Bu1XUE8K9AuePc3839TPdAegg72kpXSzkeNqRNZiHbnJUItIVCLFkDqceA==
  1. Then you can run your tests

See the initial commit here

I've got a PR in which includes a change to the value in package.json to the chromedriver's git page, so it always gets the latest Chromedriver.

Until this is approved, you can do this change locally:
"chromedriver": "git+https://github.com/giggio/node-chromedriver#master",

change your chromedriver version in package.json and run npm install again