量angular器testing在重启后拿起边缘浏览器而不是铬

我试图让一个服务器安装无头铬,seleniumwebdriver和量angular器自动化testing。

我按照以下说明设置我的环境:

# JDK 8 sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update && sudo apt-get install openjdk-8-jdk # Node JS curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - sudo apt-get install -y nodejs # NPM modules sudo npm install protractor -g sudo npm install chromedriver -g # Google Chrome echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt-get update sudo apt-get -y install libxpm4 libxrender1 libgtk2.0-0 libnss3 libgconf-2-4 sudo apt-get -y install google-chrome-stable sudo apt-get -y install xvfb gtk2-engines-pixbuf sudo apt-get -y install xfonts-cyrillic xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable sudo apt-get -y install imagemagick x11-apps Xvfb -ac :99 -screen 0 1280x1024x16 & disown $1 export DISPLAY=:99 

问题是,当我第一次运行量angular器testing时,它运行良好,testing运行完美。 但是,当有服务器重新启动或什么的时候,我似乎不能再运行它。 现在这是因为当我做一个webdriver-manager start ,这是我的输出:

 yeshwanthvshenoy@node-3:~$ sudo webdriver-manager start [02:59:54] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.29 -Dwebdriver.gecko.driver=/usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.16.1 -jar /usr/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar -port 4444 [02:59:54] I/start - seleniumProcess.pid: 2239 02:59:54.729 INFO - Selenium build info: version: '3.4.0', revision: 'unknown' 02:59:54.730 INFO - Launching a standalone Selenium Server 2017-06-07 02:59:54.758:INFO::main: Logging initialized @329ms to org.seleniumhq.jetty9.util.log.StdErrLog 02:59:54.832 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX 02:59:54.833 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX 02:59:54.833 INFO - Driver class not found: com.opera.core.systems.OperaDriver 02:59:54.833 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped: Unable to create new instances on this machine. 02:59:54.837 INFO - Driver class not found: com.opera.core.systems.OperaDriver 02:59:54.837 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 02:59:54.842 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped: registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX 2017-06-07 02:59:54.892:INFO:osjs.Server:main: jetty-9.4.3.v20170317 2017-06-07 02:59:54.942:INFO:osjsh.ContextHandler:main: Started osjsServletContextHandler@523884b2{/,null,AVAILABLE} 2017-06-07 02:59:54.968:INFO:osjs.AbstractConnector:main: Started ServerConnector@2d653761{HTTP/1.1,[http/1.1]}{0.0.0.0:4444} 2017-06-07 02:59:54.969:INFO:osjs.Server:main: Started @541ms 02:59:54.969 INFO - Selenium Server is up and running 

正如你所看到的,它显示了边缘浏览器,而不是铬。 为什么它被切换回来? 有没有办法永久存储或者我应该做一些其他的命令来指定我需要使用chrome?

我看到IE,Edge,Safari和Opera被跳过了(这是可以预料的)。 启动WebDriverpipe理器后,转至http:// localhost:4444 / grid / console并检查已注册的内容。

检查设置量angular器的浏览器 。