Surprised that Get<T>() returns null

Aug 22, 2009 at 9:29 PM

I've done some testing with Watin and I got accustomed to Find/Search ect operations throwing an exception when an element could not be found.  That made sense as in the majority of situations I was asking for something using a very specific name, fully expecting it to exist.  I was surprised when I realized White's Get<T>() methods returned null instead.  As a result my test code has lots of Assert.IsNotNull() calls surrounding most every Get<T>() call.

Of course, I can write a little wrapper layer of extensions methods or whatnot that presents the API in the way I like.  But before I went down that route I thought I'd run the question by the folks on the forum.