我是量角器的新手,所以请放轻松。
运行命令时遇到以下错误:
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
因此,当我尝试启动 selenium 服务器时出现错误:
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
我也尝试过手动将 selenium jar 文件放在文件夹中,但这不起作用。
有人可以帮助我吗?