English 中文(简体)
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:

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).

最佳回答

Have you looked at the White framework?

问题回答

I have used AutoIt in the past with success.

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.

If you haven t seen it yet, and a commercial library is acceptable, you might check out Ranorex:

http://www.ranorex.com/

I used Ranorex 1.5 quite a bit to write small C# UI automation utilities. It was pretty effective! Development seemed faster compared to using the MS UI Automation API directly, since Ranorex has a lot of useful convenience methods already available.

I haven t used Ranorex 2 very much yet, though.

In Ranorex 1.5, there was also support for traditional Win32 development in C++, but I didn t use it. As far as I know, that s still available in Ranorex 2.

I can t speak to the quality of the record/playback support in Ranorex since I never used that feature.

One final plus: Their support team was really responsive and helpful anytime I emailed them.

This library is pretty interesting and is fairly simple. Perhaps it will help you.

I would still suggest FlaUI for autoamating .Net Desktop,Mobile apps. Its based on Microsoft UIA libraries and have support for external controls like the DevExpress Grid too Moreover, it is built on top of TestStack.White so indeed a very good library and has a github page also

I have used WebAii from ArtOfTest with a fair degree of success in automating integration testing for a Silverlight app. It also supports WinForms and Web applications.

Microsoft UI Automation, the successor to Active Accessibility, can do almost all of the Windows UI automation you would need.

How about CSharpScript, here s an article about it on Codeproject, and here s the link to the main website. Furthermore, it is familiar C#, scripted which can be used to automate anything.

Hope this helps, Best regards, Tom.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签