0

I'm currently working with Jenkins + Selenium Plugin for Jenkins. I have a hub and some nodes. Both Hub and Nodes are in my localhost.

I realized that, when I run my tests locally (That means, using chrome, firefox, IE webdrivers), then the browsers will appear and the tests will be executed.

driver = webdriver.Chrome() # Open Chrome Browser

On the other hand, if I run the tests through a remote webdriver, then the browsers appear to be headless.

capabilities = {"platform" : "VISTA"}
capabilities["browserName"] = "chrome"
driver = webdriver.Remote(command_executor='http://localhost:4444/wd/hub', desired_capabilities=capabilities)
# Hub and Node are running locally, windows chrome won't open (Headless?)
  1. Are these remote browsers (selenium grid) "headless" by default?
  2. How could I verify if they're really running in headless mode?
  3. If they are not headless, how can I make them headless? (jenkins + selenium grid)

I've been trying to do some research but can't find any documentation that specifies this. I just found this post: http://grokbase.com/t/gg/selenium-users/15b64b173p/selenium-grid-browser-appears-headless

Thanks!

1 Answer 1

0

RemoteWebDriver is not headless by default, it is running where you want it to run, it can run on user account as a normal browser or it can run in background on LocalSystem account. Which OS are you using? If you are running jenkins as a windows service your test will run in background, it's normal behavior because of windows service 0 policy.

3
  • Hi! Yes, I'm running this on windows. Yes, I have already read about Windows Session 0 and it looks this is my case. Now I have to find a way to execute them headless
    – user3555007
    Jul 20, 2017 at 10:28
  • Why you need to execute it headless? What is wrong with running browsers in background? These browsers are not headless either way, if you want headless browsers you should use htmlunitdriver, phantomjs or some other headless driver implementations.
    – acikojevic
    Jul 20, 2017 at 10:52
  • @acikojevic: because it's faster. Because it saves you from installing and configuring dependencies like xvfb. Because the phantomJS was halted the moment chrome announced headless mode. Try not to tell people what they need.
    – Bob Vork
    Oct 2, 2017 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.