使用TestCafe时如何与Windows桌面交互 [英] How can you interact with the Windows desktop when using TestCafe

查看:280
本文介绍了使用TestCafe时如何与Windows桌面交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用TestCafe在我们的Electron应用程序中执行操作,但是我还需要在Windows桌面上执行操作(例如,单击任务栏,启动其他应用程序).

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).

由于TestCafe仅能与浏览器窗口中的内容交互,因此我尝试使用Appium来基本运行TestCafe(从C#调用命令行),然后通过WinAppDriver执行Windows桌面操作,但是这感觉像是一团糟.

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?

感谢您的见解

m

推荐答案

我已成功使用 robotjs 与桌面交互(鼠标移动,单击等).目前,这似乎是一个不错的选择.只需与TestCafe一起安装在您的节点项目中即可.

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.

这篇关于使用TestCafe时如何与Windows桌面交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆