我是量角器的新手,所以请放轻松。
运行命令时遇到以下错误:
webdriver-manager update --proxy http://proxy.companyname.com:portnumber
webdriver-manager: using local installed version 12.1.1
[17:33:49] I/config_source - curl -oC:\Users\xyz\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\gecko-response.json 'http://proxy.company.com:port/repos/mozilla/geckodriver/releases' -H 'host:api.github.com'
[17:33:49] I/downloader - curl -om\node_modules\webdriver-manager\selenium/selenium-server-standalone-3.141.59.jar 'http://proxy.company.com:port/3.141/selenium-server-standalone-3.141.59.jar' -H 'host:selenium-release.storage.googleapis.com'
[17:33:49] I/update - selenium standalone: file exists \node_modules\webdriver-manager\selenium\selenium-server-standalone-3.141.59.jar
[17:33:49] I/update - selenium standalone: selenium-server-standalone-3.141.59.jar up to date
[17:33:49] I/downloader - curl -oC:\Users\731320\AppData\Roaming\npm\node_modules\webdriver-manager\selenium/chromedriver_2.46.zip 'http://proxy.company.com:port/2.46/chromedriver_win32.zip' -H 'host:chromedriver.storage.googleapis.com'
[17:33:49] I/update - chromedriver: unzipping chromedriver_2.46.zip
C:\Users\xyx\AppData\Roaming\npm\node_modules\webdriver-manager\node_modules\adm-zip\zipFile.js:66
throw Utils.Errors.INVALID_FORMAT;
^
Invalid or unsupported zip format. No END header found
因为当我尝试启动硒服务器时出现错误:
Error: Invalid or corrupt jarfile
C:\Users\xyz\AppData\Roaming\npm\node_modules\webdriver-
manager\selenium\selenium-server-standalone-3.141.59.jar
[17:39:21] I/start - Selenium Standalone has exited with code 1
我还尝试过将硒罐文件手动放置在该文件夹中,但这没用。
有人可以帮我吗?
答案 0 :(得分:0)
在npm i webdriver-manager
之后,从项目文件夹中尝试以下命令。
node node_modules/protractor/bin/webdriver-manager update
希望它对您有帮助