Coded UI Tests bug

Ribbon for WPF Forum

Posted 12 years ago by Tom P.
Version: 12.1.0560

I've been experimenting with VS 2010 Premium's Coded UI Test feature. I see from the Help file that Actipro supports the WPF UI Automation Framework part of Coded UI Test.


I've come across a bug when attempting to automate buttons inside a Ribbon Tab Group.  This bug has been found by other users online, and it appears to be a bug in .NET 4.0. The Coded UI Builder tool will always fail when attempting to record a click action on a Button inside a Ribbon View Tab.

Here is a link to Microsoft Connect acknowledging the bug:


The issue seems to be related to ScrollViewer not returning true when iterating nested controls (or something). There are a few other links online finding the same thing.


This is a good site explaining it:

This site also claims to have a workaround but it requires overriding some functionality in ScrollViewer.


My question is, have you encountered this, and do you have any suggestions on how I might be able to work around this? I'd really like to utilize the UI Automation feature with Actipro for regression testing.



Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Tom,

Thanks for the tips.  We've run into problems with Coded UI Test in the past even though we do support UI automation properly.  We were never able to determine that we're doing anything wrong, and it always seemed like there was some bug in Coded UI Test causing it.  I'm not sure there would be any workarounds other than make a custom ScrollViewer like mentioned in that blog post and use it in redefined Ribbon-related control templates wherever they are used.

But first it would be interesting if you tried it with .NET 4.5 since they say they fixed the issue there.

Actipro Software Support

Posted 12 years ago by Tom P.

I have not tried it with .NET 4.5 yet.

I have successfully used the UI Automation Framework (WPF specific) though, and it works great with your controls so far.  I've had to hand code the tests, so it's not nearly as cool as the Coded UI Test Builder, but it's a start.

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.