11. Jenkins 使用 chromedriver 在 Windows 環境無法啟動

  • 10578
  • 0

11. Jenkins 使用 chromedriver 在 Windows 環境無法啟動

測試 python + Selenium WebDriver + chromedriver 遇到一個怪問題…

image

 

竟然無法啟動 chrome , 原因是找不到 chrome….

檢查了以下幾項設定, 都沒有找到問題

1. PYTHON_HOME

2. PYTHONPATH

3. PATH

4. chromedriver.exe 放在 %PYTHON_HOME%\Scripts\

 

後來上網查到文章「NetBeans GUI tests on Jenkins + Windows

So there you are, if you want to run GUI tests on Jenkins CI running on Windows do not configure it as a windows service instead run it from the command prompt or set it up as a scheduled task to run on windows logon using the command 「java -jar jenkins.war」.

 

於是使用 administrator 權限, 執行 sc delete jenkins 把原先 Windows service 刪除

改用 command line 啟動, 果然問題就解決了…