Unable to use Protractor webdriver-manager

前端 未结 6 1783
北恋
北恋 2021-02-07 06:55

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:

相关标签:
6条回答
  • 2021-02-07 07:24

    Try installing it globally as an Administrator:

    npm install -g webdriver-manager
    
    0 讨论(0)
  • 2021-02-07 07:32

    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

    0 讨论(0)
  • 2021-02-07 07:32

    use grunt-protractor-webdriver, you also need protractor in your package.json if you don`t installed it as global (-g)

    add this to your package.json under "devDependencies":

        "protractor": "^2.1.0",
        "grunt-protractor-webdriver": "^0.2.0",
    

    also look at grunt-protractor-runner it can start protractor from a grunt process without starting the selenium server ( webdriver-manager start )

    to start the selenium server with grunt-protractor-webdriver add this to your Gruntfile

        protractor_webdriver: {
            options: {
              keepAlive: true
            }
        }
    

    and add it to a grunt-task

        grunt.registerTask('start-selenium-server', ['protractor_webdriver']);
    
    0 讨论(0)
  • 2021-02-07 07:38

    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

    0 讨论(0)
  • 2021-02-07 07:39

    Deprecated version of node - it was problem on my pc.

    Just updated it downloading last version from https://nodejs.org/en/ and all works.

    0 讨论(0)
  • 2021-02-07 07:44

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

    node webdriver-manager start
    
    0 讨论(0)
提交回复
热议问题