I have protractor 5.1.2 on my machine. When I do ng e2e, it download webdriver 2.37. I want to change it to webdriver 2.26. What config should I update to achieve it.
Because ng e2e will execute webdriver-manager update as default, and np e2e can't pass down the --versions.chrom=2.26 to webdriver-manager update.
So we can disable the webdriver-manager update of ng e2e by execute command: ng e2e --webdriver-update=false or ng e2e --wu=false, and before execute this command, you have to execute node_modules/.bin/webdriver-manager update --versions.chrome=2.26 manually to update webdriver to certain version.
Related
Is there any way to setup e2e test with Playwright and Cucumber instead of cypress? I need to use from playwright and cucumber as it's test runner in my nx project.
I would suggest to use https://github.com/marksandspencer/nx-plugins/tree/main/packages/nx-playwright
You will need to install the plugin using
yarn add --dev #mands/nx-playwright
yarn playwright install --with-deps
Remove existing e2e app nx generate remove <APP-NAME>-e2e before generating a new one
Generate new e2e app
yarn nx generate #mands/nx-playwright:project <APP-NAME>-e2e --project <APP-NAME>
PS: I am also author of the plugin
I have tried using commandline custom script but that's not at all helpful.
Done like:
Tried: start webdriver-manager start [Showing "running" continously]
Tried: webdriver-manager start [Showing not an executable command]
You can use gulp for setting up such connection. Check out this manual:
part1: https://hamersmithblog.wordpress.com/2017/01/13/angularjs-protractor-and-teamcity/
part2: https://hamersmithblog.wordpress.com/2017/01/20/angularjs-protractor-and-teamcity-par/
I am running npm,lerna,yarn and bootstrap in my VSTS build definitions via Command line task after running all the above commands I am running npm run build command but while running npm run build command its failing with 'polymer' is not recognized as an internal or external command.Please help me on this.I tried running polymer in a command line passing polymer as a tool and arguments as build even though its failing.Please help me.
Make sure that the polymer-cli npm package is listed in your dev dependencies (at least it sounds like a dev dependency to me) in your package.json. Also make sure you run npm install before you run npm run build. You might have to point your NPM build script to the Polymer package in your node_modules folder because it is not installed globale on the build server
For my angular CLI/Bitbucket project I am running following script in Codeship but it gives error You have to be inside an angular-cli project in order to use the serve command.
#install node version, 4.x is required for the angular-cli
nvm install 4.1
#install angular-cli
npm install angular-cli
#run npm install for your project dependencies
npm install
Under that script is the "Test Pipelines", where the script is setup to run the tests.
#serve the application adding '&' to run command in background
ng serve &
#start end to end tests using protractor
ng test
#if all of the tests pass, then build the production assets
ng build -prod
According to https://github.com/angular/angular-cli/issues/4379 this error message is usually triggered if you're using the (now deprecated) angular-cli package.
Either update the package.json file for the project to reference the #angular/cli package, or make sure to install this package instead of the deprecated one.
I cloned the protractor code from github (https://github.com/angular/protractor)
Is there a way to run the code from the source code? The documentation is always mentions to install protractor with "npm install", but I want to run the latest code.
Is there an easy way to do this ?
npm install in this context is meant to install the local dependencies for protractor.
You need to just run the protractor script in the bin folder.
git clone https://github.com/angular/protractor.git
cd protractor
npm install
cd bin/
./protractor /path/to/e2e/e2e-conf.js