Skip to content

Useful tools and resources for helping with UI Automation

February 6, 2013

Earlier today I checked in my UIAutomationLib to GitHub (read more about that here).  Since I’ve been needing to automate several different UI’s lately, I thought I would share the tools and resources that I’ve used that have saved my life more than once.

Tools:

  • UI Spy: This tool used to come with older versions of the Windows SDK.  I personally think this is the most important tool.  It allows you to see properties of every Windows, Pane, and Control in an Win32 application.  I had a real hard time finding this tool a long time ago.  Fortunately I came across Andrew Tokeley’s blog and he has it zipped up and available.  You can download it from there.
    Andrew’s Blog
  • UIA Verify: This is an open source project by Microsoft and the successor to UI Spy.  It’s pretty similar, but I’ve had more issues with this software.  It seems to crash more, but it’s not bad.  You can download it from their CodePlex page.
    UIA Verify Codeplex Site

Libraries:

  • WatiN: WatiN (pronounced What-In) is an amazing open source .NET library for automating UI’s in a web browser.  You have full access to the DOM from your WinForms application.  If you ever need to have a .NET project automate the UI for a web form through IE or Firefox you will love the power of this library.  Note, there is some limitations in browser versions, it seems to support IE 6 – 9, and FireFox 2 – 3.  Hopefully a newer version is in the works.
    WatiN Homepage
  • UI Automation Framework: Microsoft .NET includes a set namespaces for helping with UI Automation in WinForms apps (Win32, WPF, .NET WinForms) and it’s really quite powerful.  I believe the first version to include this was .NET 3.0.  You can read more about this at MSDN.  This is great for most native Windows apps, but if you find yourself needing to automate something more complex (such as an application through Terminal Services or Citrix) see the next option below.
    UI Automation Overview
  • BitCollectors.UIAutomationLib: And finally, my own shameless plug.  If you find yourself needing to simulate keystrokes and mouse clicks it really doesn’t get much easier than this.  This is a library I developed and have been maintaining for a couple of years now internally and I just published it on GitHub.  You can pass in an XML file which defines how your keystrokes and mouse clicks will get executed against a specific application.  This will work with just about anything, including applications running through Terminal Services and Citrix.
    Blog Post | GitHub Page | ReadMe
About these ads
2 Comments
  1. Very cool list Adam. Here’s a few things I really like:

    XAMLSpy – For Silverlight and WPF testing (also supports Windows Phone too)
    WatiR – This what WatiN was based on. Very solid tool.
    Coded UI Map via VS 2012 – if you are using Visual Studio 2012 you can create a Code UI Test project and attach it to any processes you want to test. More info here: http://visualstudiomagazine.com/articles/2012/12/01/automated-ui-testing.aspx

    • Thanks Keith, those are some great suggestions. I forgot about XAML Spy – I had to use that a while back for a Silverlight project (I’ll update my post with information on that). As for the other two, I haven’t ever done anything with those. I’ll definitely check out that Coded UI Map in VS2012, that sounds really useful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: