Selenium Webdriver Chromedriver timeout on start in headless mode

戏子无情 提交于 2019-12-05 23:02:33

Chrome 38 does not work when running as system user in Session 0. Normally this occurs because Chrome is launched by a Windows service - in your case Jenkins which is run as a service. This is a known issue. See Selenium issues here and here.

Two solutions:

  1. Downgrade Chrome to a version less than 38.
  2. Download and install AlwaysUp and configure it to run your Jenkins service as a user other than default system user

The AlwaysUp solution definitely works but has a small licencing cost, or if you're not bothered about the Chrome version you can downgrade it.

Chrome cannot run in headless mode in windows. you need to use HTMLdriver for this.

If you badly needs it, you need to try setup a vnc server and run within it. http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/

The answer by SDET helped me (upvoted), Session 0 was my problem, but you don't need AlwaysUp, you can just launch the jenkins slave from some startup script by: javaws http://<jenkins-master>/computer/<node-name>/slave-agent.jnlp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!