[Webtest] Steps for selectField elements

John and Pip John and Pip" <pipandjohn@gmail.com
Thu, 11 Jan 2007 10:16:52 +1300


------=_Part_12896_15266303.1168463812708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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 <mgoldberger@northnetwork.com> 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: webtest-admin@gate2.canoo.com
> [mailto:webtest-admin@gate2.canoo.com] On Behalf Of Marc Guillemot
> Sent: Wednesday, January 10, 2007 2:12 AM
> To: webtest@gate2.canoo.com
> 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
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

------=_Part_12896_15266303.1168463812708
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Unless there are some side-effects e.g. javascript being triggered that you don&#39;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 &lt;not&gt; block for the ones that shouldn&#39;t be there.
<br><br>&lt;setSelectField name=&quot;${SFF.ServiceClass}&quot; value=&quot;${SFF.ServiceClass.Options.Business}&quot;/&gt;<br>&lt;setSelectField name=&quot;${SFF.ServiceClass}&quot; value=&quot;${SFF.ServiceClass.Options.Economy
}&quot;/&gt;<br>&lt;setSelectField name=&quot;${SFF.ServiceClass}&quot; value=&quot;${<a href="http://SFF.ServiceClass.Options.PE">SFF.ServiceClass.Options.PE</a>}&quot;/&gt;<br>&lt;not description=&quot;This step encapsulates one or more test steps that are ALL expected to fail. Any kind of step can be nested.&quot; &gt;
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setSelectField name=&quot;${SFF.ServiceClass}&quot; value=&quot;${SFF.ServiceClass.Options.SS}&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setSelectField name=&quot;${SFF.ServiceClass}&quot; value=&quot;${SFF.ServiceClass.Options.FS
}&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setSelectField name=&quot;${SFF.ServiceClass}&quot; value=&quot;${SFF.ServiceClass.Options.FF}&quot;/&gt;<br>&lt;/not&gt;<br><br><br><br><div><span class="gmail_quote">On 1/11/07, <b class="gmail_sendername">
Goldberger, Michael</b> &lt;<a href="mailto:mgoldberger@northnetwork.com">mgoldberger@northnetwork.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Could you elaborate on what would be the best solution to verify that a<br>select field contains a specific item (known). Which steps would be most<br>accurate for performing that task?<br><br>-----Original Message-----<br>
From: <a href="mailto:webtest-admin@gate2.canoo.com">webtest-admin@gate2.canoo.com</a><br>[mailto:<a href="mailto:webtest-admin@gate2.canoo.com">webtest-admin@gate2.canoo.com</a>] On Behalf Of Marc Guillemot<br>Sent: Wednesday, January 10, 2007 2:12 AM
<br>To: <a href="mailto:webtest@gate2.canoo.com">webtest@gate2.canoo.com</a><br>Subject: Re: [Webtest] Steps for selectField elements<br><br><br>otherwise you can use &lt;not&gt;:<br><br>&lt;not&gt;<br>...some verifications that should fail...
<br>&lt;/not&gt;<br><br><br>Charlie Kuharski wrote:<br>&gt;<br>&gt; I typically use XPath is the data is known.<br>&gt;<br>&gt; Goldberger, Michael wrote:<br>&gt;&gt;<br>&gt;&gt; Hi all,<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;
<br>&gt;&gt; I was wondering what the members of this list do when you need to<br>&gt;&gt; verify the existence / non-existence of specific items in a<br>&gt;&gt; selectField element.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>
&gt;&gt; Any ideas at all that seem more accurate and/or efficient that<br>&gt;&gt; multiple regular expressions (verifyText) and just trying to match<br>&gt;&gt; enough unique data.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>
&gt;&gt; As always, your help is appreciated<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Mike<br>&gt;&gt;<br>&gt;<br>&gt;<br><br>--<br>View this message in context:<br><a href="http://www.nabble.com/Steps-for-selectField-elements-tf2947069.html#a825">
http://www.nabble.com/Steps-for-selectField-elements-tf2947069.html#a825</a><br>3102<br>Sent from the WebTest mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________
<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest</a><br>_______________________________________________
<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote>
</div><br>

------=_Part_12896_15266303.1168463812708--