Windows GUI Automation [closed]

匿名 (未验证) 提交于 2019-12-03 03:03:02

问题:

I am planning to automate some of the functionality of the GUI developed in Microsoft Visual C#.

I am new to Automation with GUI. Would be glad if you share your experience regarding GUI Automation and some of the tools available for the automation.

I plan to develop some programms / scripts in order to realise some of the functionality of the GUI

回答1:

For automating Windows OS itself, the free AutoIT uses a BASIC type syntax for automation. It is not open source but development is continuing on AutoHotkey, which is open source. Either of these two can be used for Windows GUI Automation without much effort.

I think Microsoft would suggest you use Windows PowerShell, a task automation framework with support for WMI and COM for local and remote computers. Powershell is free. See this guide on .

You tagged this question with Windows, Shell and Automation. None of these suggestions I made use C#, although AutoHotkey has community support for C# and Powershell is a .NET scripting/programming language.



回答2:

I've recently done a research on exactly the same topic. I haven't found an ideal tool. Here are the tools I looked at:

  • QTP. This is the most famous, and so, you can find most answers to your questions in web. It supports function library, object repository, and various technologies. Developing scripts in QTP is slow because of different factors. Licenses cost big $$$. Uses VBscript (pah!)
  • Coded UI Test. It is a part of Visual Studio 2010 Premium and Ultimate editions. Also costs $$$. Provides function library and object repository features. You'll need some understanding of programming. Uses C# for developing tests (VB as an alt). Microsoft strictly recommends using their recorder to generate tests. Although, if you have some experience in automation, you understand, that using a recorder only is impossible for developing good tests. So you'll need to get into details of the generated code. And it generates a LOT of code. Anyway, it's nice.
  • Ruby + AutoIt. Costs 0$. I like using Ruby+Rspec+Watir for automating web interface. Very customizable, fast in learning, developing, and executing. Although, couldn't make Ruby+Rspec work with .NET good enough. I tried to use AutoIt to access WindowsForms, but it was very hard to debug and search why something doesn't work.
  • Ranorex. I didn't look at it much. It seems nice, works similar to QTP, costs $$$. I didn't have time to work with it more closely, and decided not to use it, because I didn't know what problem could arise during real automation (and I already had a QTP license).


回答3:

I have had some success with the free, open source White. It's support is limited, but the docs have a good guidance section so you'll know pretty quickly it's right for you.



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