I see a few problems here.  First, your verifySelectField should use the xpath 
attribute instead of the name attribute, if you want to find it by xpath like 
your example.  Second, I think your storeXPath's xpath is wrong for storing the 
value of the selected option.  Someone else emailed in to try and figure out 
how to store a value from a dropdownlist: 
http://www.nabble.com/How-to-store-value-from-dropdownlist-to16834696.html#a16834696
Or you can just model after this one: //td/[EMAIL 
PROTECTED]'Line_Of_Sight_Speed__INPUT_BOX']/[EMAIL PROTECTED]'selected']"

See if this info helps :)

Will

________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Chikwaya
Sent: Wednesday, August 06, 2008 1:38 PM
To: [email protected]
Subject: [Webtest] Problems with verifySelectField

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/[EMAIL PROTECTED]'header']/[EMAIL 
PROTECTED]'LangLogout']/[EMAIL PROTECTED]'langSelectlist']/select/option/."
            property="defaultLang" />
        <ifStep description="change language to English">
            <condition>
                <verifySelectField description="Check for language drop down"
                          name="/html/body/[EMAIL PROTECTED]'header']/[EMAIL 
PROTECTED]'LangLogout']/[EMAIL PROTECTED]'langSelectlist']//select/option/." 
value="English (USA)" />
            </condition>
            <then>
                <setSelectField description="select SF Certificate" 
xpath="/html/body/[EMAIL PROTECTED]'header']/[EMAIL 
PROTECTED]'LangLogout']/[EMAIL PROTECTED]'langSelectlist']/select/option[1]"/>
            </then>
        </ifStep>

The bolded code issues the following failure:

No suitable form found having field named "/html/body/[EMAIL 
PROTECTED]'header']/[EMAIL PROTECTED]'LangLogout']/[EMAIL 
PROTECTED]'langSelectlist']/select/."

while the storeXPath expression results in the following:

storeXPath
store english language property
property        defaultLang
xpath   /html/body/[EMAIL PROTECTED]'header']/[EMAIL 
PROTECTED]'LangLogout']/[EMAIL PROTECTED]'langSelectlist']/select/option/.
=> value        English (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!

Reply via email to