Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I'm beginning to explore the possibility of doing UI automation using the UI Automation library that came with .NET 3 (will be using c#). There aren't a ton of tutorials out there on this, but the ones I have seen usually involve getting the AutomationID property from a control on the application to be tested. The problem is, using UISpy and WPF Inspector, it doesn't appear that the application I'm testing has the AutomationID property populated (it's a WPF application). Also, sometimes the Name field is populated, but sometimes it's not.

Given this, is UI Automation going to be possible from the standpoint of a custom solution, or will I have to use some kind of record/playback tool (and if so, how would those tools work given the absence of these attributes)?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The answer depends on how comfortable you are programming. You can definitely find what you need using UI Automation without names and IDs. However, I found that the managed classes can find much less than the unmanaged. This post sums this up nicely:

http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/c3f142e1-0624-4ec5-a313-482e72d5454d

(look at Guy Barker's response)

His point (i) is what I am doing. Point (ii) may be easier. Ultimately it is access to the Legacy Accessibility API stuff that made the difference for me.

I would suggest trying out Coded UI and Test Complete. If they can successfully find your objects and manipulate them when you playback, then you may want to go that way, but keep in mind that you will have to refactor the recordings.

If they don't work and you are comfortable programming, then definitely try out the unmanaged UI Automation stuff first.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.