1

I've been hitting my head against the wall with this one for a while now.

On Linux Chrome and Firefox selenium nodes are fairly easy to setup and start automatically at boot time using docker or even just a plain init.d service.

I've even gotten them to run on windows at boot using various methods. However, none of these methods work with IE. That is, the standalone-selenium-server.jar starts correctly but IE cannot execute tests even though Chrome and Firefox can.

This issue seems to be related to the IEDriver being unable to send events to the browser. Unlike Chrome and Firefox which use javascript to emulate clicks the IEDriver sends events to Windows to emulate the user. It appears that when the application is started automatically and no one is logged in Windows drops these events rather than passing them along.

Has anyone had any luck starting a Windows Selenium Node at boot that is capable of running IE tests without additional intervention?

4
  • What do yo mean "start on boot"? After you have logged in? or before? What is the exact use-case?
    – Alexey R.
    Commented Mar 16, 2018 at 17:11
  • When the machine starts (boot), i.e. before anyone has logged in. The use case is that my nodes are subject to update/reboot that is not under my control and I'd like the nodes to reconnect to the hub in a fully automated fashion.
    – Steve
    Commented Mar 16, 2018 at 17:17
  • What format is the node software in? exe? jar?
    – Julian
    Commented Mar 19, 2018 at 17:22
  • It's a jar file, the issue is not getting the jar to execute on startup but getting the selenium IEDriver to function correctly when the jar is started automatically. Without anyone logging in.
    – Steve
    Commented Mar 19, 2018 at 21:13

1 Answer 1

0

One way to make a process start up on startup in windows is to put it in the startup folder located in your All Programs menu. If it's an exe, you should be able to create a shortcut of it and put it right in that folder to the desired effect. If it's a jar or other type of executable, then you'll want to create a .bat file and then put that .bat file into the same startup folder.

The contents of a bat file could look like this (taken from here: https://stackoverflow.com/questions/5953525/run-java-application-at-windows-startup)

javaw -jar C:\Path\to\jarfile\selenium-node.jar

If you need to allocate more heap space to the java runtime in that example, then adding the flags -Xms and -Xmx to define the initial and maximum allowed heap space will give your JVM more memory wiggle room if necessary. That could look like:

javaw -Xms1g -Xmx2g -jar C:\Path\to\jarfile\selenium-node.jar

1
  • Unfortunately, this doesn't resolve the issue. I can get the jar to start, it's the getting it to start in a fashion that allows IEDriver to successfully execute selenium tests that's the challenge.
    – Steve
    Commented Mar 19, 2018 at 21:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.