Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's a good, if any, .NET Windows automation library?

I'm looking for a library that can be used in native .NET code, just like any .NET assembly. The purpose of the library must be to automate Windows (push a button, select a window, send keys, record & playback, that sort of thing).

So: the library is supposed to be used natively in .NET, but the automation itself must be able to target any native or .NET Windows application that can receive user input.


Suggestions so far:

  • benPearce suggested AutoIt. It has a DLL, which is native Win32 but not native .NET and cannot be used without use of .NET Interop.
  • Chris Dunaway suggested Global Mouse Keyboard Lib. This came closest, but is not an automation lib. It just helps setting up keyboard and mouse hooks.
  • pm100 suggested Microsoft's WPF UI Automation. This one is pretty good, albeit that it's not available if you develop in .NET 2.0 and it requires the WPF to be installed on the system. It can, however, automate everything from Win32 apps to HTML in a browser.
  • JasonTrue suggested WebAI from ArtOfTest. This is a testing framework mainly geared towards browsers and web applications. It is unfortunately not well suitable for use for Windows automation.

If nothing else appears available, I'll probably choose Microsoft's UI Automation and upgrade any projects that require it that are still in .NET 2.0 to .NET 3.5, if possible. But I hope for a more widely applicable automation framework (.NET prior to 2.0 does not need to be supported).

like image 804
Abel Avatar asked Jan 12 '10 22:01

Abel


People also ask

Can C# be used for automation?

C# is useful for automation testing because it allows the automation test engineer to develop an application with the help of Visual Studio on the . Net framework. C# is another programming language that also supports the binding with Selenium.

How do you automate a .NET application?

NET Windows Forms App (EXE) is still a . NET Assembly and that means you can use that the same way as a DLL, just add a reference and use the public classes. If you still want to try some scripting, take a look on the "Microsoft UI Automation" API and the "System. Windows.

What is Microsoft Automation Framework?

Microsoft UI Automation is an accessibility framework for Microsoft Windows. It addresses the needs of assistive technology products and automated test frameworks by providing programmatic access to information about the user interface (UI).


2 Answers

Have you looked at the White framework?

like image 148
Unmesh Gundecha Avatar answered Oct 14 '22 21:10

Unmesh Gundecha


microsoft's own built in one is fine

http://msdn.microsoft.com/en-us/library/ms747327.aspx

not restricted to wpf as some seem to think.

like image 28
pm100 Avatar answered Oct 14 '22 20:10

pm100