Maximojo
Maximojo

Reputation: 322

How can you interact with the Windows desktop when using TestCafe

I need to use TestCafe to perform actions within our Electron app, however I also need to perform actions on the Windows desktop (e.g. click taskbar, launch other apps).

Since TestCafe can only interact with what is within the browser window, I have attempted to use Appium to essential run TestCafe (calling the commandline from C#) and then performing the Windows desktop actions through WinAppDriver however this feels like a kludge.

Are there other methods of arranging this or a framework that would be more elegant?

Thanks for any insights

m

Upvotes: 2

Views: 698

Answers (2)

Maximojo
Maximojo

Reputation: 322

I have successfully used robotjs to interact with the desktop (mouse move, click, etc.). This seems to be an excellent choice at the moment. Just install alongside TestCafe in your node project.

Upvotes: 2

Alex Skorkin
Alex Skorkin

Reputation: 4274

You are right - TestCafe can only interact with what is within the browser window, but not outside it.

You can also check out the testcafe-browser-provider-webdriverio plugin. Its author claims that this provider can connect to an Appium server.

Upvotes: 3

Related Questions