Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to use Protractor webdriver-manager

I am trying to start protractor on my local Windows development machine. In an attempt to do so, I am trying to start it from the command-line using the following command:

C:\myProject\node_modules\grunt-protractor-runner\node_modules\protractor\bin>webdriver-manager start

When that command is run, I get an error that says:

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

I was confident this was correct though. I'm installing protractor via NPM. My package.json file looks like this:

{
  "name": "MyProject",
  "version": "0.0.1",
  "description": "Just the description",
  "repository": "N/A",
  "readme":"N/A",
  "private": true,
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "devDependencies": {
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-concat": "0.4.0",
    "grunt-contrib-connect": "0.7.1",
    "grunt-contrib-copy": "~0.4.1",
    "grunt-contrib-cssmin": "~0.6.1",
    "grunt-contrib-htmlmin": "~0.1.3",   
    "grunt-contrib-jshint": "0.9.2",
    "grunt-contrib-uglify": "~0.2.4",
    "grunt-contrib-watch": "0.5.x",
    "grunt-protractor-runner": "0.2.4",
    "grunt-start-webdriver":"0.0.2",
    "phantomjs": "1.9.7-3",
    "selenium-webdriver":"2.41.0",
    "load-grunt-tasks": "0.2.x",
  },
  "license": "none"
}

What am I doing wrong? Why can't I get protractor to run? Thank you!

like image 956
user3284007 Avatar asked May 10 '14 11:05

user3284007


People also ask

How do I start Webdriver manager in Protractor?

To install and start the standalone Selenium Server manually, use the webdriver-manager command line tool, which comes with Protractor. Run the update command: webdriver-manager update This will install the server and ChromeDriver. Run the start command: webdriver-manager start This will start the server.

Is JDK required for Protractor?

You will need to have the Java Development Kit (JDK) installed to run the standalone Selenium Server. Check this by running java -version from the command line.

How to install protractor in WebDriver?

Run sudo npm install -g protractor, and then start your webdriver server, last step do "sudo webdriver-manager update". Show activity on this post.

How to start protractor without starting Selenium server?

use grunt-protractor-webdriver, you also need protractor in your package.json if you don`t installed it as global ( -g) also look at grunt-protractor-runner it can start protractor from a grunt process without starting the selenium server ( webdriver-manager start )

Why can't I run protractor on chromedriver?

It's an issue with chromedriver, chrome, the selenium standalone server or your local machine (corporate configuration). Can you try to do a clean install of protractor (do a git clone of protractor) and run the example -project and see what happens.

How do I download browser executables using webdrivermanager?

WebDriverManager has an automated way to download browser executables (exes) or binaries. It supports different browsers like Chrome, Firefox, Microsoft Edge, Internet Explorer, Opera, or PhantomJS. Consider the following lines of code: WebDriverManager.chromedriver ().setup (); driver = new ChromeDriver ();


4 Answers

Install protractor globally.

npm install protractor -g

This will install protractor and webdriver-manager. Then run from the command line: webdriver-manager update Check for more info on: http://angular.github.io/protractor/#/tutorial

like image 132
Rassiel Rebustillo Avatar answered Nov 18 '22 22:11

Rassiel Rebustillo


webdriver-manager is actually a NodeJS script. Run it using

node webdriver-manager start
like image 33
JB Nizet Avatar answered Nov 18 '22 21:11

JB Nizet


Try installing it globally as an Administrator:

npm install -g webdriver-manager
like image 36
johsin18 Avatar answered Nov 18 '22 23:11

johsin18


If you are a Windows user, this could help you:

  1. Add C:\Users\%username%\AppData\Roaming\npm to the PATH variable.

  2. Close cmd/powershell and open it again.

  3. Try webdriver-manager

like image 33
daniil_ Avatar answered Nov 18 '22 22:11

daniil_