[Webtest] Problems with verifySelectField

Steve Chikwaya Steve Chikwaya" <stavarotti@gmail.com
Wed, 6 Aug 2008 13:38:05 -0500


------=_Part_32854_24960787.1218047885220
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi everyone,

I am having a problem with verifySelectField in that it does not pick out
the currently selected item in a drop down box.  The drop down is a list of
34 languages and based on the session, can be set to any one of those 34.
When i try to use verifySelectField to check which select option is
currently selected, i get the "No suitable form found having field named"
error.  storeXPath picks up the the correct language, but verifySelectField
does not seem to recognize the xpath.

here is my code:

<storeXPath
            description="store english language property"

xpath="/html/body/div[@id='header']/div[@id='LangLogout']/form[@id='langSelectlist']/select/option/."
            property="defaultLang" />
        <ifStep description="change language to English">
            <condition>
                *<verifySelectField description="Check for language drop
down"

name="/html/body/div[@id='header']/div[@id='LangLogout']/form[@id='langSelectlist']//select/option/."
value="English (USA)" />*
            </condition>
            <then>
                <setSelectField description="select SF Certificate"
xpath="/html/body/div[@id='header']/div[@id='LangLogout']/form[@id='langSelectlist']/select/option[1]"/>
            </then>
        </ifStep>

The bolded code issues the following failure:

*No suitable form found having field named
"/html/body/div[@id='header']/div[@id='LangLogout']/form[@id='langSelectlist']/select/."
*

while the storeXPath expression results in the following:

*storeXPath*
store english language property propertydefaultLang  xpath
/html/body/div[@id='header']/div[@id='LangLogout']/form[@id='langSelectlist']/select/option/.
 =>
valueEnglish (USA)

Am I doing something wrong, and if so how may I change it to have
verifySelectField return the corrent result?


Thanks.

-- 
I'm not the person your mother warned you about... her imagination isn't
that good!

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

<div dir="ltr">Hi everyone,<br><br>I am having a problem with verifySelectField in that it does not pick out the currently selected item in a drop down box.&nbsp; The drop down is a list of 34 languages and based on the session, can be set to any one of those 34.&nbsp; When i try to use verifySelectField to check which select option is currently selected, i get the &quot;No suitable form found having field named&quot; error.&nbsp; storeXPath picks up the the correct language, but verifySelectField does not seem to recognize the xpath.<br>
<br>here is my code:<br><br>&lt;storeXPath<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=&quot;store english language property&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xpath=&quot;/html/body/div[@id=&#39;header&#39;]/div[@id=&#39;LangLogout&#39;]/form[@id=&#39;langSelectlist&#39;]/select/option/.&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; property=&quot;defaultLang&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ifStep description=&quot;change language to English&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;condition&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <b>&lt;verifySelectField description=&quot;Check for language drop down&quot; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; name=&quot;/html/body/div[@id=&#39;header&#39;]/div[@id=&#39;LangLogout&#39;]/form[@id=&#39;langSelectlist&#39;]//select/option/.&quot; value=&quot;English (USA)&quot; /&gt;</b><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;then&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;setSelectField description=&quot;select SF Certificate&quot; xpath=&quot;/html/body/div[@id=&#39;header&#39;]/div[@id=&#39;LangLogout&#39;]/form[@id=&#39;langSelectlist&#39;]/select/option[1]&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/then&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ifStep&gt;<br><br>The bolded code issues the following failure:<br><br><b><i>No suitable form found having field named
&quot;/html/body/div[@id=&#39;header&#39;]/div[@id=&#39;LangLogout&#39;]/form[@id=&#39;langSelectlist&#39;]/select/.&quot;</i></b><br><br>while the storeXPath expression results in the following:<br><br><b>storeXPath</b>
<br>store english language property


<table cellpadding="2" cellspacing="0"><tbody><tr>
<td class="parameterName">property</td><td class="parameterValue">defaultLang</td>
</tr>
<tr>
<td class="parameterName">xpath</td><td class="parameterValue">/html/body/div[@id=&#39;header&#39;]/div[@id=&#39;LangLogout&#39;]/form[@id=&#39;langSelectlist&#39;]/select/option/.</td>
</tr>
<tr>
<td class="parameterName">=&gt; value</td><td class="parameterValue">English (USA)</td></tr></tbody></table><br clear="all"><br>Am I doing something wrong, and if so how may I change it to have verifySelectField return the corrent result?<br>
<br><br>Thanks.<br><br>-- <br>I&#39;m not the person your mother warned you about... her imagination isn&#39;t that good!<br>
</div>

------=_Part_32854_24960787.1218047885220--