Focus on a specific Linux application using SSH and Sikuli in robot framework

I’m autmating linux application on virtual machine from my local machine.
So the Robot framework testcases are on my local maching and I use SSH to open conection and start the application from command line.
Now I want to run another testcase to enter the user and the password for example using Sikuli library, but it doesn’t wotk and return [FAIL] No application is open.

The question ist:
1- How to refocus on the virtual machine again as it is already open from the 1st testcase so I can run the 2nd test case.
2- How to inspect elements on Linux apps?
3- Is there any other library better than Sikuli at autmation desktop app?

Thanks in Advance

When you use SSHLibrary, there is no visible terminal, so you cannot see what is going on.
You can use VirtualBox to start a RDP to the VM, for example on port 3389, in the Display Settings, Remote Display. Then with Sikuli use it to interact with the VM.

On Windows you can start the mstsc client, and on Linux the remmina or other.


Thanks for the reply
I’m using virtualbox but I donät know what do you mean exactly with RDP or how can we achieve that?

I have 2 testcases for Example
the 1st one open the vm with RUN command and connect to the vm with SSH and start an application using SSH execute command

Now I wanna rung the 2ns testcase to enter the user and password but apparently we should open connection again or something else I donät get exactly

Well, I think I told everything you need.

But here it goes (see note in the bottom, if option is not selectable ):

  • With the VM powered off, go to its Settings and at,
  • Display, Remote Display tab,
  • Activate Enable Server (use defaults, and Authentication Method: Null)

After powering on the VM, you access it with an RDP client to the IP of your VirtualBox Host and port.
I think you need to install Guest Additions in the VM so, this RDP feature is possible.

1 Like