Hi Michael, thank you for your recommendation. It works !!!
Stefan Michael Zwick wrote: > > Hi Stefan, > > My recommendation would be to find a general XPath expression for the > second option of the select field node which shouldn't exist. (Could be > accomplished by first finding an appropriate XPath for the existing first > option and from there "increasing the node number"). Then replace > <not><setSelectField.../></not> by <not><verifyXPath.../><not> to verify > that the second option of the select field isn't there. > <setSelectField.../> for an inexistent option index apparently doesn't > give false but rather an exception. > > Michael > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] > On Behalf Of Stefan Seger > Sent: Wednesday, June 29, 2011 3:02 PM > To: [email protected] > Subject: [Webtest] Check that a select field has not more than one option > > > Hi all, > > I have a little problem here with my tests. In one test case, when I > choose > a specific option in a select field, a second select field gets filled > dynamically with options. > > So, I want to test that the second select field has only one option. I > tried > the following: > > <setSelectField name="client_sign" optionIndex="0" /> > <setSelectField name="owner_group" optionIndex="0" /> > <not> > <setSelectField name="owner_group" optionIndex="1" /> > </not> > > The problem, that Canoo gets an IndexOutOfBoundException by the attempt to > select the second option. > > Are there any ideas how I can solve this? > > BR, > Stefan > -- > View this message in context: > http://old.nabble.com/Check-that-a-select-field-has-not-more-than-one-option-tp31954561p31954561.html > Sent from the WebTest mailing list archive at Nabble.com. > > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > > -- View this message in context: http://old.nabble.com/Check-that-a-select-field-has-not-more-than-one-option-tp31954561p31960759.html Sent from the WebTest mailing list archive at Nabble.com. _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

