2
votes

I am runnung the angular-seed project(code is located here), I installed Node.js, Jasmine(with C:\Users\nradisic\Documents\Visual Studio 2013\WebSites\angular-seed-master>npm install jasmine) and Protractor(with C:\Users\nradisic\Documents\Visual Studio 2013\WebSites\angular-seed-master>npm install protractor). I am trying to run End-to-End tests with Protractor by runnung e2e-test.bat with content:

@echo off

REM Windows script for running e2e tests
REM You have to run server first
REM
REM Requirements:
REM - NodeJS (http://nodejs.org/)
REM - Protractor (npm install -g protractor)

set BASE_DIR=%~dp0
webdriver-manager update
protractor "%BASE_DIR%\..\config\protractor-conf.js" %*

and protractor-conf.js:

exports.config = {
  allScriptsTimeout: 11000,

  specs: [
    '../test/e2e/*.js'
  ],

  capabilities: {
    'browserName': 'chrome'
  },

  baseUrl: 'http://localhost:8000/app/',

  framework: 'jasmine',

  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }
};

When I update and run webdriver-manager with C:\Users\nradisic\Documents\Visual Studio 2013\WebSites\angular-seed-master\node_modules\protractor\bin>node webdriver-manager start and after that start the e2e-test.bat I get error messages:

'webdriver-manager' is not recognized as an internal or external command, operable program or batch file.
'protractor' is not recognized as an internal or external command, operable program or batch file.

How to fix this?

My OS is Windows 8.1. I am running a project from Visual Studio 2013.

1
npm install selenium-webdriver -> does this work from command prompt? And do you have selenium server running?Madhusoodan
I installed selenium-webdriver, but i don't know how to start it. I tried running npm start from the base directory, but it does nothingkiriz

1 Answers

1
votes

Did you ever try npm install -g protractor? I found it in the REM of e2e-test.bat.

The running result:
>e2e-test.bat
Updating selenium standalone
downloading https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar...
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.13/chromedriver_win32.zip...
chromedriver_2.13.zip downloaded to C:\Users\xxx\AppData\Roaming\npm\node_modules\protractor\selenium\chromedriver_2.13.zip
selenium-server-standalone-2.44.0.jar downloaded to C:\Users\xxx\AppData\Roaming\npm\node_modules\protractor\selenium\selenium-server-standalone-2.44.0.jar