Robot Exception: Window activation failedhttps://www.eclipse.org/forums/index.php/mv/msg/440461/986789/#msg_986789
I'd like to run my Jubula tests of a Swing application on the Linux build server in an virtual frame buffer Xvfb. For that I start the autagent and then the Jubula command line tool testexec. Starting the application and connecting to it seems to work fine, but activation of the AUT fails. The same works fine when using the ITE on my Windows client.
In ~/.jubula/logs/rc_swing.log a Robot Exception is reported (org.eclipse.jubula.rc.common.exception.RobotException: Window activation failed).

Any help or pointers to what might be going wrong are highly appreciated. Thanks,
Michael

rc_swing.log:org.eclipse.jubula.rc.common.exception.RobotException: Window activation failed.
at org.eclipse.jubula.rc.swing.swing.driver.RobotAwtImpl.activateApplication(RobotAwtImpl.java:812) ~[org.eclipse.jubula.rc.swing_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.rc.common.commands.InitTestExecutionCommand.execute(InitTestExecutionCommand.java:47) ~[org.eclipse.jubula.rc.common_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.Communicator$ConnectionListener.received(Communicator.java:845) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.connection.Connection.fireMessageReceived(Connection.java:402) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.connection.Connection.access$3(Connection.java:391) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
at org.eclipse.jubula.communication.connection.Connection$ReaderThread.run(Connection.java:454) [org.eclipse.jubula.communication_1.3.0.201210161256.jar:na]
]]>Michael Zwick2012-11-21T16:05:59-00:00Re: Robot Exception: Window activation failedhttps://www.eclipse.org/forums/index.php/mv/msg/440461/987043/#msg_987043
well, we tried Xvfb a few years ago for our nightly test. We never got it to run reliable. There have been unexplained hangups, problem with keyboard input, totally different AUT behaviour and some others. We finally gave up and switched to VMware ESXi.

So you have been warned! Since there might have been improvements in Xvfb you can try but have to look into the following:

Make sure the keyboard type is well defined.

The standard window activation method is "Click in titlebar". For that to work there has to be a titlebar . You have to start a window manager for the Xvfb. That is probably a good idea in itself since a lot of programs act really strange without a WM.

If you can't (or don't want to) run a WM change the default activation method to something different. Which is best is depending on your AUT.

I also noticed (in the mean-time) that it helps (sometimes) to start the X server with a window manager (WM). Can be done like

startx -- `which Xvfb` :1 -screen 0 1024x768x16 2>&1 >/dev/null &

or with xinit and specifying the WM directly. With this I at least did no longer see the Robot exception. Activating the AUT worked fine, too. So, this seems to be solved. I even got screen-shots after test failures. Still I will need to invest more time to see if it works reliably. Thanks again for the warnings.

It would definitely be interesting to learn more about how others run Jubula on their build servers. Do you all use VM?

Michael]]>Michael Zwick2012-11-26T08:55:22-00:00Re: Robot Exception: Window activation failedhttps://www.eclipse.org/forums/index.php/mv/msg/440461/1580720/#msg_1580720
a goettl2015-01-23T17:25:13-00:00Re: Robot Exception: Window activation failedhttps://www.eclipse.org/forums/index.php/mv/msg/440461/1585424/#msg_1585424
Thanks for your comment. Can you add anything from the logs (RC logs), as well as the HTML report for the failing test and information on what the external command does, where it should be called from etc?