[Watinfixture-users] Handling of empty strings
Status: Alpha
Brought to you by:
kalnir
|
From: Rob M. <rma...@rm...> - 2007-09-21 03:53:23
|
Hey all, I'm confused about handling of empty strings, especially as applied to dropdowns. For UserActions an empty string is just an empty string: |verify dropdown|x|has||selected| That passes if there is an empty string selected. However for CheckDropdownContents this is not the case. To pass the following must be used: !|WatiN.Contrib.WatiNFixture.CheckDropdownContents|x| |dropdownItem| |x1| |x2| |null| Also... the reporting will report an empty string as "blank"... shouldn't this be "null" (at least to be consistent within the CheckDropdownContents fixture)? So... I'm guessing shouldn't UserActions (et al) have the same handling for empty strings? Either || or |null| (or |blank|)? I'm also a bit confused. Are all ID specified as a regular expression? The CheckDropdownContents fixture clearly expects so... but I'm not sure about UserActions. What leaves me wondering is... what happens when there is more than one match? Looking at the code for UserActions.VerifyDropdownHasSelected it's unclear (doesn't look like it handles FindByID() returning multiple dropdowns). And looking at CheckDropdownContents I don't see it handling lists of dropdowns either... but it clearly does. So... I'm confused. Any suggestions on where I've gone off the rails? Regards, Rob |