0

NUnit.Extensions.Forms.ButtonTester and ControlNotVisibleException

by klh 27. maj 2008 07:56

At work we use NUnit.Extensions.Forms.ButtonTester and its siblings to unittest forms.

This works nicely, however I ran into a problem where NUnit complained that the button was not visible, but it actually was!

Well of course I googled for this problem, and found only four answers, three of the pages I could find, were not about the exception as far as I could see.

The third page was about this, however the page was gone (HTTP 404), so I found the answer to my question on a google cached page...

Since the information is so inaccessible I thought I would make it available here:

If a control is on a tab or the like, you might get the above mentioned exception eventhough the control is visible.

The workaround I found was to fire the event like this:

checkBoxTester.FireEvent("Click");
 
Note this is for NUnit 2.4.7

Powered by BlogEngine.NET 1.4.5.0
Original Design by Laptop Geek, Adapted by onesoft