【发布时间】:2016-09-05 21:38:37
【问题描述】:
我有一个使用 LinuxMint 的 Jenkins 从节点设置。所以我们可以在 Chrome 和 Firefox 的 Linux 机器上做一些浏览器测试。
我安装了最新的 Chromedriver,测试可以运行它,当我手动进入 /var/jenkins/workspace/<project name>/TestAutomation/SeleniumFramework 并执行我的 run npm <test name> 时,测试会启动 chromedriver 并成功运行。
当我进入 Jenkins 并运行我的测试时,chromedriver 出现以下错误,我不知道该去哪里。:
直接使用 ChromeDriver... [启动器] 运行 1 个 WebDriver 实例 /var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/atoms/error.js:108 var template = new Error(this.message); ^ UnknownError:未知错误:Chrome 无法启动:异常退出 (驱动程序信息:chromedriver=2.21.371461(633e689b520b25f3e264a2ede6b74ccc23cb636a),平台=Linux 3.19.0-32-generic x86_64) 在新的 bot.Error (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/atoms/error.js:108:18) 在 Object.bot.response.checkResponse (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/atoms/response.js:109:9) 在 /var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24 在 promise.ControlFlow.runInFrame_ (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20) 在 goog.defineClass.notify (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25) 在 promise.Promise.notify_ (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12) 在 Array.forEach (本机) 在 promise.Promise.notifyAll_ (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15) 在 goog.async.run.processWorkQueue (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15) 在 process._tickCallback (internal/process/next_tick.js:103:7) 来自:任务:WebDriver.createSession() 在 Function.webdriver.WebDriver.acquireSession_ (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22) 在 Function.webdriver.WebDriver.createSession (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30) 在新驱动程序(/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/selenium-webdriver/chrome.js:810:36) 在 DirectDriverProvider.getNewDriver (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/protractor/lib/driverProviders/direct.js:68:16) 在 Runner.createBrowser (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/protractor/lib/runner.js:182:37) 在 /var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/protractor/lib/runner.js:263:21 在 _fulfilled (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/q/q.js:797:54) 在 self.promiseDispatch.done (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/q/q.js:826:30) 在 Promise.promise.promiseDispatch (/var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/q/q.js:759:13) 在 /var/jenkins/workspace/QA-E2E-Linux/TestAutomation/SeleniumFramework/node_modules/q/q.js:525:49 [启动器] 进程退出,错误代码 1
【问题讨论】:
标签: linux selenium jenkins protractor selenium-chromedriver