如何用UI自动化术语实现用户交互的记录 [英] How to implement recording of user interaction in UI Automation terms
问题描述
UI自动化客户端API似乎没有实现用户交互记录的方法.
UI Automation Client API does not seem to have a way to implement recording of user interactions.
执行此操作的一种方法似乎是使用钩子API监听系统范围内的Windows消息以及键盘和鼠标事件,然后根据UI自动化控件模式调用重新解释被拦截的消息.但是,这并不是一件小事. 任务,并且需要付出大量努力才能正确解释低级Windows消息.
One way to do this seems to be listening to system wide Windows messages and probably also keyboard and mouse events using hook API and then re-interpret intercepted messages in terms of UI Automation control pattern calls. However this is not a trivial task and requires a lot of effort to interpret low-level Windows messages correctly.
有人知道更好的方法吗?
Does anyone know a better way?
推荐答案
您好,najaryan,
Hi, najaryan,
您注意到UI自动化没有记录机制是正确的.这绝对是艰苦的工作.
You are correct in noting that UI Automation doesn't have a recording mechanism. This is definitely hard work.
您是否查看过VS2010中的记录和回放框架?
Have you looked at the Record and Playback Framework in VS2010?
尽管我不是专家,但我认为它是为您正在考虑的问题而设计的.
Although I am not an expert with it, I think it is designed for the problem you are considering.
谢谢,
迈克尔
Thanks,
Michael
这篇关于如何用UI自动化术语实现用户交互的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!