how to specify IEDriverServer and geckoDriver in conf.js - protractor

As I know, with latest protractor, we can specify chromeDriver and seleniumServerJar in conf.js. So can we specify IEDriverServer and geckoDriver in conf.js as well? If yes, how to config them?

Related

VSCode doesn't suggest built-in modules in TS files

When I start typing in my new Node project, for instance, "fs" in a .js file, I get the "fs" modules as a suggestion:
But when I try to type it in a .ts file, I get nothing:
Is there a way to get the suggestion also when I type a .ts file?
thanks!
I have tried to:
Reinstall VSCode
Reset its settings
Reinstall the TypeScript extension
Downgrade to a lower version of typescript
Install ts-node
I found a solution:
Just install the #types/node package using npm or yarn to your project:
yarn add --dev #types/node

When using Protractor 5.4.2, webdriver-manager downloads 2.46 which is not compatible with Chrome 74

Protractor 5.4.2 uses webdriver-manager 12 which downloads Chromedriver 2.46. Chromedriver 2.46 supports Chrome 71-73 (see http://chromedriver.chromium.org/downloads). We need to download Chromedriver 74.0.3729.6.
I also see that there is a webdriver-manager#13 that supports this. Should I use it with Protractor 5.4.2?
webdriver-manager#12.1.4 is fixed
webdriver-manager released 12.1.4 which will download a max ChromeDriver version of 74. How to get it?
do a fresh install of your node modules directory (remove node_modules folder and do a npm install)
do a forced install npm install -f
If you want to download a version specific in 74.x.x.x, this has been fixed in 12.1.4. I introduced a bug when I tried to quickly fix the issue in 12.1.3 causing this to not work.
Background on webdriver-manager downloading ChromeDriver 2.xx
webdriver-manager downloaded files based on the https://chromedriver.storage.googleapis.com/ The versions from the download were formatted 2.xx. These did not map to versions of Chrome. To make semantic version comparisons, we would tack on a '.0' to user the semver node module to make comparisons.
This assumption does not work with the new versioning for ChromeDriver 74 (74.0.3729.6). This is why it was not downloading the file. This change happened in approx August 2018. When this change happened fixes were added to the upcoming version of webdriver-manager 13.
So why not use webdriver-manager#13? Some reasons why this won't work with Protractor 5.4.2:
The fix was in for webdriver-manager 13 but Protractor 5.4.2 relies on webdriver-manager ^12.0.6. Installing another version of webdriver-manager might not work when resolving the downloaded files.
This would not work when launching Protractor with direct connect (driverProviders/direct) or local since the update-config.json file is not created. There is a fix for this here: https://github.com/angular/webdriver-manager/pull/372 but probably will not be merged.
How does webdriver-manager#12 download a max version of 74?
For webdriver-manager#12, the max version is stored here: https://github.com/angular/webdriver-manager/blob/legacy/config.json#L5 If a Chrome releases 75, this should also be changed to version 75 in a pull request against the legacy branch.
Try installing chromedriver v. 74.0.3729.6 (Chrome 74) LOCALLY AND GLOBALLY
for the global installation run
webdriver-manager update --versions.chrome 74.0.3729.6
for local installation run something like
node ./node_modules/protractor/bin/webdriver-manager update --versions.chrome 74.0.3729.6
List of driver versions is here http://chromedriver.chromium.org/downloads
Possibly you'll face this issue update protractor chrome driver to 74,
see my comment there
Let me know if you run into issues

How to configure build setting in teamcity for protractor

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/

How do I check which babel version is on my windows 10 OS?

I need help to find which version of Babel is on my Windows Machine. I have installed it using
npm install --save-dev babel-cli babel-preset-env.
How do I check which version is on my Windows OS?
After you finish installing Babel, your package.json file should look like this:
{
"name": "my-project",
"version": "1.0.0",
"devDependencies": {
"babel-cli": "^6.0.0"
}
}
So you can find your Babel version in this configuration file.
Try this at the command line:
npm list babel-cli
You can also check the version of babel-cli by finding the babel-cli folder in node_modules and looking at the version property of the package.json that is at the base of that folder.
If babel-cli was installed globally via -g flag of npm install, you could check the version by executing command babel --version.
Hopefully the helps!
As the babel is updated to babel 7,
check using
npm list #babel/cli
or
npm list #babel/core
possibly your local ./node_modules/.bin is not in $PATH check out
this previous question for further info.
babel --version
You can figure this out by typing in the command line:
babel --help, look over the output and you can see other options that you might need.
Good luck

webdriver-manager how to install selenium version npm

I installed webdriver-manager by installing protractor via npm install with package.json. Under the root dir /webdriver-manager node module there is a config.json that contains
{
"webdriverVersions": {
"selenium": "2.53.1",
"chromedriver": "2.27",
"geckodriver": "v0.13.0",
"iedriver": "2.53.1",
"androidsdk": "24.4.1",
"appium": "1.6.0"
},
"cdnUrls": {
"selenium": "https://selenium-release.storage.googleapis.com/",
"chromedriver": "https://chromedriver.storage.googleapis.com/",
"geckodriver": "https://github.com/mozilla/geckodriver/releases/download/",
"iedriver": "https://selenium-release.storage.googleapis.com/",
"androidsdk": "http://dl.google.com/android/"
}
}
I'm thinking here is where I can change the version of selenium to whatever I want and then run webdriver-manager update command. When I do that though the selenium version installed is different than what is listed above. The version that gets installed is selenium 3.1.0 and gecko 0.14.0. Chromedriver is installing 2.27 and matching. Is this the way to install different versions and if so why are the versions different? Thanks.
This depends on the version of protractor / webdriver-manager installed. So if you are using the latest (as of this post) protractor#5.1.1 uses the dependency webdriver-manager#12.02. As of webdriver-manager#12.0.2, it downloads the latest version and does not use the confg.json. config.json will be removed in the next version.
To download a specific version of (for example) chromedriver:
webdriver-manager update --versions.chrome 2.20
You could get the full list of options for the update method with:
webdriver-manager update-help