Thanks John and Pip, unfortunately there are some things going on behind
the scenes that make use of that idea not possible under these
circumstances. I am however interested in checking for the existence of
a specific item within a select field using xPath and think that I will
go down that route. Thanks again to all that contributed their opinions
/ suggestions.

 

Mike

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John and Pip
Sent: Wednesday, January 10, 2007 4:17 PM
To: [EMAIL PROTECTED]; Goldberger, Michael
Cc: [EMAIL PROTECTED]; Marc Guillemot
Subject: Re: [Webtest] Steps for selectField elements

 

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