Silverlight Automation Similar to Watin

前提是你 提交于 2020-01-14 18:48:56

问题


I am considering porting a WPF application to Silverlight. However, the WPF application uses Watin to spawn IE processes and automate certain tasks.

My question is if there is a way to automate tasks in Silverlight by spawning popups and performing tasks in them similar to how you would with Watin.


回答1:


I haven't tried this tool yet, but it is the closest I've found to Watin for Silverlight. It is WebAii from Telerik and it is a free download. I ran across it the other day and plan to try it soon.

WebAii Testing Framework plugs directly into the Silverlight application it automates and has access to every single element/object in the entire Silverlight application. Beside the ability to perform basic automation actions like clicking, moving and setting text, the tool gives you access to complex properties on UI elements such as brushes, borders and even transform matrices. What’s best is that you can set most of these properties, which is crucial for test verifications and synchronizations.




回答2:


As far as I know WatiN is a web application test framework, but your question seems to indicate that you are using WatiN to automate tasks in your application. In that context I will try to answer your question.

A Silverlight application is executed in a sandboxed environment and is unable to start new processes on the local computer. However, a Silverlight application can interact with the browser object model that is used to host the Silverlight application. This allows for some interaction with the local environment. If you can fit your use of WatiN into this model you are able to do it from Silverlight but in general you should consider a Silverlight application to live in a sandboxed environment.




回答3:


Have you had a look at the Silverlight Automation Peer?

http://msdn.microsoft.com/en-us/library/cc645045(VS.95).aspx



来源:https://stackoverflow.com/questions/1628727/silverlight-automation-similar-to-watin

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