Unless there are some side-effects e.g. javascript being triggered that you
don't want, one way to do it is just to try to set each of the known items
that you want to check for. You can then do the same thing in a <not> block
for the ones that shouldn't be there.

<setSelectField name="${SFF.ServiceClass}" value="${
SFF.ServiceClass.Options.Business}"/>
<setSelectField name="${SFF.ServiceClass}" value="${
SFF.ServiceClass.Options.Economy}"/>
<setSelectField name="${SFF.ServiceClass}" value="${
SFF.ServiceClass.Options.PE}"/>
<not description="This step encapsulates one or more test steps that are ALL
expected to fail. Any kind of step can be nested." >
               <setSelectField name="${SFF.ServiceClass}" value="${
SFF.ServiceClass.Options.SS}"/>
               <setSelectField name="${SFF.ServiceClass}" value="${
SFF.ServiceClass.Options.FS}"/>
               <setSelectField name="${SFF.ServiceClass}" value="${
SFF.ServiceClass.Options.FF}"/>
</not>



On 1/11/07, Goldberger, Michael <[EMAIL PROTECTED]> wrote:

Could you elaborate on what would be the best solution to verify that a
select field contains a specific item (known). Which steps would be most
accurate for performing that task?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marc Guillemot
Sent: Wednesday, January 10, 2007 2:12 AM
To: [EMAIL PROTECTED]
Subject: Re: [Webtest] Steps for selectField elements


otherwise you can use <not>:

<not>
...some verifications that should fail...
</not>


Charlie Kuharski wrote:
>
> I typically use XPath is the data is known.
>
> Goldberger, Michael wrote:
>>
>> Hi all,
>>
>>
>>
>> I was wondering what the members of this list do when you need to
>> verify the existence / non-existence of specific items in a
>> selectField element.
>>
>>
>>
>> Any ideas at all that seem more accurate and/or efficient that
>> multiple regular expressions (verifyText) and just trying to match
>> enough unique data.
>>
>>
>>
>> As always, your help is appreciated
>>
>>
>>
>> Mike
>>
>
>

--
View this message in context:
http://www.nabble.com/Steps-for-selectField-elements-tf2947069.html#a825
3102
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

Reply via email to