Reputation: 35231
I'm trying to run Angular Protractor e2e tests and getting this error:
session not created: Chrome version must be between 71 and 75
Upvotes: 0
Views: 359
Reputation: 1188
One way to solve this problem is to upgrade the Chrome version to the latest and webdriver-manager to the latest.
Go to Chrome --> Help --> About Google Chrome and update to the latest version
Method 1: Upgrade Webdriver Manager
Go to your project and upgrade webdriver-manager to the latest with the below command:
npm update protractor -g
node ./node_modules/protractor/bin/webdriver-manager update --gecko=false --versions.chrome <version_number>
Method 2: Uninstall Node, Protractor, and install again and upgrade Webdriver-manager If webdriver-manager is not upgraded to latest then uninstall the node, protractor and then install by following the below steps
Go to the terminal and run the following commands:
sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
To completely uninstall node + npm, do the following:
You may also need to do:
sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d
rm -rf /Users/[homedir]/.npm (eg:- rm -rf /Users/Sarada/.npm)
rm -rf /Users/[homedir]/.nvm
You can verify whether it uninstalled or not by running the following commands (you will get the response as *blank)
which node
which npm
which protractor
Download the latest node.js from https://nodejs.org/en/download/ website and unzip and install.
goto terminal and check the node and npm version installed
node --version
npm -v
run the following command in terminal to install protractor
sudo npm install -g protractor
sudo webdriver-manager update
Go to the project and remove the 'node_modules' folder and run the following commands to install the latest version of the chrome driver.
npm install
webdriver-manager update
Upvotes: 1