protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Selenium webdrivers not included in protractor package

Open kungfuPanda123 opened this issue 8 years ago • 1 comments

Hi,

I'm using gulp-protractor to run my scripts. When I start the webdriver_standalone server it is searching for selenium server under this location.

"D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.34.exe "

But when I install protractor node modules this package is not installed.

I'm not able to get the selenium folder containing standalone server and other webdrivers under the protractor node modules.

As of now I have copy pasted from this location "C:\Users\UserName\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium".

Please let me know how to get the packages via npm.

> cmd.exe /c gulp -b "D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0" --color --gulpfile "D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\Gulpfile.js" webdriver_standalone
[10:41:16] Using gulpfile D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\Gulpfile.js
[10:41:16] Starting 'webdriver_standalone'...
[10:41:22] I/start - java -Dwebdriver.chrome.driver=D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.34.exe -Dwebdriver.ie.driver=D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\node_modules\protractor\node_modules\webdriver-manager\selenium\IEDriverServer3.8.0.exe -Dwebdriver.gecko.driver=D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.19.1.exe -jar D:\MyWorkspace\Dev\Sandbox\VueFrameworkDev\VueFramework2.0\VueFramework2.0\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.8.1.jar -port 4444
[10:41:22] I/start - seleniumProcess.pid: 19324
10:41:23.466 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
10:41:23.467 INFO - Launching a standalone Selenium Server
2018-01-03 10:41:23.558:INFO::main: Logging initialized @585ms to org.seleniumhq.jetty9.util.log.StdErrLog
10:41:23.604 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
10:41:23.617 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
10:41:23.618 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
10:41:23.619 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:41:23.619 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
10:41:23.619 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
10:41:23.620 INFO - Driver class not found: org.openqa.selenium.phantomjs.PhantomJSDriver
10:41:23.695 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
 registration capabilities Capabilities {browserName: safari, platform: MAC, version: } does not match the current platform WIN10
10:41:23.726 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
10:41:23.727 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
10:41:23.727 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
10:41:23.727 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
10:41:23.727 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
10:41:23.734 INFO - Using the passthrough mode handler
2018-01-03 10:41:23.754:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-03 10:41:23.778:WARN:osjs.SecurityHandler:main: [email protected]@1aab78{/,null,STARTING} has uncovered http methods for path: /
2018-01-03 10:41:23.781:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@1aab78{/,null,AVAILABLE}
2018-01-03 10:41:24.726:INFO:osjs.AbstractConnector:main: Started ServerConnector@10a87b3{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-01-03 10:41:24.726:INFO:osjs.Server:main: Started @1753ms
10:41:24.726 INFO - Selenium Server is up and running

image

Package.json

{
  "name": "xxxxx",
  "version": "1.0.0",
  "license": "commercial",
  "author": "xxxx",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "clean-build": "rimraf build",
    "inline-template": "gulp inline-build-templates",
    "ngc": "ngc -p buildTemp/tsconfig-build.json",
    "rollup": "rollup buildTemp/sq-vue-lib.js -o dist/sq-vue-lib.js",
    "ngc-es": "ngc -p buildTemp/tsconfig-es5.json",
    "rollup-es": "rollup buildTemp/sq-vue-lib.js -o dist/sq-vue-lib.es5.js",
    "copy-package": "gulp copy-package",
    "clean-build-temp": "rimraf buildTemp",
    "create-package": "npm run clean-build && npm run inline-template && npm run ngc && npm run copy-package && npm run clean-build-temp"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.4.6",
    "@angular/cdk": "^2.0.0-beta.12",
    "@angular/common": "^4.4.6",
    "@angular/compiler": "^4.4.6",
    "@angular/core": "^4.4.6",
    "@angular/forms": "^4.4.6",
    "@angular/http": "^4.4.6",
    "@angular/material": "^2.0.0-beta.12",
    "@angular/platform-browser": "^4.4.6",
    "@angular/platform-browser-dynamic": "^4.4.6",
    "@angular/router": "^4.4.6",
    "core-js": "^2.4.1",
    "protractor": "^5.2.1",
    "rxjs": "^5.4.2",
    "systemjs": "^0.20.19",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.4.9",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "gulp": "^3.9.1",
    "gulp-delete-lines": "0.0.7",
    "gulp-inline-ng2-template": "^4.0.0",
    "gulp-protractor": "^4.1.0",
    "gulp-run-command": "0.0.9",
    "gulp-sass": "^3.1.0",
    "gulp-tslint": "^8.1.2",
    "gulp-typedoc": "^2.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "jasmine-trx-reporter": "^2.2.2",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage": "^1.1.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-remap-istanbul": "0.6.0",
    "karma-trx-reporter": "^0.2.9",
    "protractor": "~5.1.2",
    "rimraf": "2.5.4",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typedoc": "^0.9.0",
    "typescript": "~2.3.3"
  }
}

kungfuPanda123 avatar Jan 03 '18 06:01 kungfuPanda123

Hi there!

Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

But getting back to your question, if I understand you correctly you want to use the webdriver-manager of protractor, if so you first need to run a webdriver-manager update to get all the drivers, you can add that in a npm-script after install like this postinstall: "node_modules/.bin/webdriver-manager update" and add it to your scripts section. It will automatically install all drivers after the install is finished

Thanks!

wswebcreation avatar Jan 09 '18 06:01 wswebcreation