# Controlling Windows and Linux in the same test case

**URL:** <https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223>\
**Category:** Robot Framework\
**Created:** [1 January 2025 01:02 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223 "2025-01-01T01:02:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTorreno](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@CTorreno](https://forum.robotframework.org/u/CTorreno)\
**Post date:** [1 January 2025 01:02 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/1 "2025-01-01T01:02:03Z")

</div>

My testing project involves interacting with a Windows-based desktop app and a Linux-based application accessed/viewed via RealVNC.

Can I use Robot Framework to create automated test cases where the steps jump between Windows applications and that Linux-based app?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [1 January 2025 08:17 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/2 "2025-01-01T08:17:14Z")

</div>

Hi Chad,

Sure, why not.

For the windows desktop app, there are many libraries to choose from, I would suggest you start with [Robotframework-FlaUI Library](https://github.com/GDATASoftwareAG/robotframework-flaui?tab=readme-ov-file#robotframework-flaui-library) as if it works with your app it will be the easiest.

For the Linux-based app, if it’s a Linux desktop app, you really only have two options:

- [Sikuli Robot Framework Library](https://github.com/rainmanwy/robotframework-SikuliLibrary?tab=readme-ov-file#sikuli-robot-framework-library)
- [ImageHorizonLibrary](https://github.com/eficode/robotframework-imagehorizonlibrary?tab=readme-ov-file#imagehorizonlibrary)

Both work by finding the location of the image on the screen, I’ve used both and both work well.

You could also just do everything with just one of the image recognition libraries too if you prefer, but a windows library that can switch windows will make life easier when you want to control whether the RealVNC window or the windows app is the foreground app.

Good luck with your automation, and remember we’re here if you get stuck with something.

Dave.

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [1 January 2025 15:33 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/3 "2025-01-01T15:33:41Z")

</div>

> [@damies13](#):
>
> For the Linux-based app, if it’s a Linux desktop app, you really only have two options:

If the app on Linux side is written in QT, tool called squish (previously by Froglogic but part of QT now) could be used. It at least used to have some RF bindings… another option would be pyautogui. Both of these would need to be used via robot’s remote server thought…

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [1 January 2025 16:32 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/4 "2025-01-01T16:32:58Z")

</div>

> [@rasjani](#):
>
> another option would be pyautogui

FYI: Image Horizon Library wraps pyautogui:

> This Robot Framework library provides the facilities to automate GUIs based on image recognition similar to Sikuli. This library wraps [pyautogui](https://github.com/asweigart/pyautogui) to achieve this.

Thanks for the info about squish, I didn’t know that (I don’t have any QT apps to test either), is there something similar for TK apps i don’t know about?

Dave.

---

<div class="post-metadata">

**Author:** ![CTorreno](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@CTorreno](https://forum.robotframework.org/u/CTorreno)\
**Post date:** [3 January 2025 01:55 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/5 "2025-01-03T01:55:30Z")

</div>

Thank you for the suggestions. I’m really new to this so pardon me if I have more general questions.

Do any of these suggestions work if the Linux app in the viewer changes with every click? As in new set of buttons appear after a click. Also, does the viewer window have to have a specific size and location during each run?

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [3 January 2025 10:04 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/6 "2025-01-03T10:04:50Z")

</div>

For the image recognition libraries (SikuliLibrary and ImageHorizonLibrary), you will need to capture images of the elements you want to interact with. It is then much advisable to always use a fixed screen resolution and color depth. On SikuliLibrary, we usually define a Region of Interest (ROI), with the size of the window we want to scan for the elements images. For example, in my case, I use **remmina** to connect to a Windows server via RDP. And the size is always 1024x768 px.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [3 January 2025 10:20 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/7 "2025-01-03T10:20:40Z")

</div>

Hi Chad,

As Hélio mentioned, those libraries work by finding the area of the screen that matched your screenshot, so it makes no difference if that area of the screen is a reminia window, or a RealVNC window, or the native desktop.

What will impact the ability to match is changes in screen size or screen scaling, also colour depth will have an impact, i.e. if you originally connected with 32bit colour when you took the screen shots and then dropped down to 24 or 16 bit colour then it likely won’t match.

I’ll also suggest staying with the same vnc viewer, sometimes there can be differences between how different vnc viewers render the image and that may impact your tests too.

Dave.

---

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://forum.robotframework.org/u/Leo)\
**Post date:** [6 January 2025 14:03 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/8 "2025-01-06T14:03:48Z")

</div>

Hi Dave,  
I’m working on a Windows VM with a QT app.  
I use the “doctest library” to compare images and the “robotframework-applicationlibrary” to interact with the application.

I connect to the VM using WinAppDriver.

Question: How do you click on the buttons in the QT app remotely? Because I can’t get developers to set the “name” property of the buttons

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [7 January 2025 05:47 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/9 "2025-01-07T05:47:05Z")

</div>

As said, earlier, QT test automation could be done via Squish which is now part of QT itself. QT Knowledge base has some code examples; [Keyword-driven testing with Squish and Robot Framework](https://qatools.knowledgebase.qt.io/squish/integrations/robot/keyword-driven-testing-squish-robot-framework/)

Those examples however do not show usage of it as remote library but check [GitHub - robotframework/PythonRemoteServer: Robot Framework remote server implemented with Python](https://github.com/robotframework/PythonRemoteServer)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [7 January 2025 13:42 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/10 "2025-01-07T13:42:43Z")

</div>

Hi Leo,

See @rasjani’s answer, he knows much more about QT and executing robot tests against remote machines than I do 👍

Dave.

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [8 January 2025 08:28 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/11 "2025-01-08T08:28:38Z")

</div>

> [@damies13](#):
>
> something similar for TK apps i don’t know about?

Actually, squish does have Tk support too - totally forgot that as I’ve only used it in QT context in the past (when it was Froglogic, before QT bought it). See; [Squish for Tk Tutorials | Squish 8.1](https://doc.qt.io/squish/squish-for-tk-tutorials.html)

---

<div class="post-metadata">

**Author:** ![Leo](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@Leo](https://forum.robotframework.org/u/Leo)\
**Post date:** [8 January 2025 13:48 UTC](https://forum.robotframework.org/t/controlling-windows-and-linux-in-the-same-test-case/8223/12 "2025-01-08T13:48:49Z")

</div>

Continuing with the topic…  
I’m running a QT app on a Windows VM.  
I access the QT app remotely (winappdriver.exe xxx.xxx.xxx.xxx 4723) but sometimes (usually) it throws the following error:  
“Test Case 5 → Exportar como CSV | FAIL |  
WebDriverException: Message: The operations timed out. (Exception from HRESULT: 0x80131505)”  
I assume it’s because it consumes a lot of resources, since the lighter versions run without giving an error.

Why it happens ?  
This error solves with Squish ?
