我正在尝试执行以下命令的启动:ng e2e
但我在代理后面我有很多问题。我设法解决了几乎所有与代理有关的问题,所以我使用以下命令执行Selenium服务器:
webdriver-manager start --ignore_ssl --proxy http://IP:PORT
我收到以下结果:
webdriver-manager: using global installed version 12.0.6
[11:35:07] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/home/luis/.nvm/versions/node/v8.11.3/lib/node_modules/webdriver-manager/selenium/chromedriver_2.40 -Dwebdriver.gecko.driver=/home/luis/.nvm/versions/node/v8.11.3/lib/node_modules/webdriver-manager/selenium/geckodriver-v0.20.1 -jar /home/luis/.nvm/versions/node/v8.11.3/lib/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.12.0.jar -port 4444
[11:35:07] I/start - seleniumProcess.pid: 8316
11:35:08.130 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.12.0', revision: '7c6e0b3'
11:35:08.133 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
2018-06-15 11:35:08.278:INFO::main: Logging initialized @389ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:35:08.427 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
11:35:31.978 INFO [ActiveSessionFactory.apply] - Capabilities are: Capabilities {browserName: chrome, chromeOptions: {args: [disable-infobars]}, count: 1, metadata: {browser: {name: chrome, version: 58}, device: PC, platform: {name: Windows, version: 10}}}
11:35:31.980 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 20046
Only local connections are allowed.
ng e2e --proxy-config "./proxy.conf.json" --webdriver-update false
我得到以下答案:
...
webpack: Compiled successfully.
[11:35:31] I/launcher - Running 1 instances of WebDriver
[11:35:31] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[11:35:32] E/runner - Unable to start a WebDriver session.
[11:35:32] E/launcher - Error: WebDriverError: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.15.0-23-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 35 milliseconds
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z'
System info: host: 'mypc', ip: 'AN-IP', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-23-generic', java.version: '10.0.1'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (/home/luis/proyectos/NHBK2.0/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/home/luis/proyectos/NHBK2.0/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/home/luis/proyectos/NHBK2.0/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
[11:35:32] E/launcher - Process exited with error code 100