How can you interact with the Windows desktop when using TestCafe

痞子三分冷 提交于 2019-12-07 20:54:16

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/56104320/how-can-you-interact-with-the-windows-desktop-when-using-testcafe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!