Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows GUI Automation [closed]

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

like image 668
Kiran Avatar asked Jun 01 '10 19:06

Kiran


3 Answers

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 performing Windows® UI automation tasks.

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.

like image 166
Tom Anderson Avatar answered Sep 30 '22 13:09

Tom Anderson


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).
like image 23
katmoon Avatar answered Sep 30 '22 15:09

katmoon


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.

like image 36
Chip Avatar answered Sep 30 '22 14:09

Chip