[Webtest] Need help on select option from hidden selectField
George Policello
George Policello" <gpolicello@mmetrics.com
Tue, 8 Apr 2008 15:00:58 -0700
Interesting website.
I think if you view the generated source for the website you will find
that the "family" <SELECT...> group does not have any <OPTION> elements.
That is what would probably be expected given your question.
<select name=3D"family" multiple=3D"multiple" size=3D"7"
onchange=3D"changeFamilyBox('family', 'species')" id=3D"familyBox"
class=3D"selectboxStrains">
</select>
However, the manual page for <setSelectField...>
http://webtest.canoo.com/webtest/manual/setSelectField.html
might be a bit ambiguous in distinguishing between setting a selection
(making a value active in a <SELECT> group) and adding a new <OPTION> to
the <SELECT> group <OPTION>s. I read the manual page to say that
<setSelectField...> is selecting an <OPTION> rather than adding a new
<OPTION> to the list.
I am not sure that Webtest has a step that will allow the types of
things usually done with=20
object =3D document.getElementByID(...)
and then setting the new HTML using
object.innerHTML =3D newHTMLStuff
You might have to add a new taskdef to accomplish adding an <OPTION> if
that is what is really desired. You do not get an error on the first of
the two <setSelectField...> because that <OPTION> exists and can be
selected.
George
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Xiaomei Li
Sent: Tuesday, April 08, 2008 2:24 PM
To: Forsberg, Mike; webtest@gate4.canoo.com
Subject: RE: [Webtest] Need help on select option from hidden
selectField
For exampel, in this url:
http://www.biohealthbase.org/GSearch/influenza_surveillanceRecord_search
.do?method=3DShowCleanSearch&decorator=3Dinfluenza
I try to select Host order =3D Anseriformes; family =3D
Anatidae (Waterfowl) and run the search. The test
script is like this:
<setSelectField name=3D"order" text=3D"Anseriformes"/>
<setSelectField name=3D"family" text=3D"Anatidae
(Waterfowl)"/>
<clickButton label=3D"Go"/>
but got error no option element found with text
"Anatidae (Waterfowl)".
thanks,
Xiaomei
--- "Forsberg, Mike" <mike.forsberg@amd.com> wrote:
> From my understanding hidden fields should be set
> via execution of some
> javascript. For instance, how would a user set this
> value if they were
> visiting your webpage?
>=20
> Could you give a small example of your webpage and
> what error you've
> experienced?
>=20
> Big Mike
>=20
>=20
>=20
> -----Original Message-----
> From: webtest-admin@gate4.canoo.com
> [mailto:webtest-admin@gate4.canoo.com] On Behalf Of
> Xiaomei Li
> Sent: Tuesday, April 08, 2008 3:58 PM
> To: webtest@gate4.canoo.com
> Subject: [Webtest] Need help on select option from
> hidden selectField
>=20
> Hi,
> The web application I am testing has some hidden
> select fields that handled by javascript. I tried
> to
> select an option from the hidden selectfield and got
> webtest error. Anyone knows how to handle this?
>=20
> Thanks,
> Xiaomei
>=20
>=20
> =20
>
________________________________________________________________________
> ____________
> You rock. That's why Blockbuster's offering you one
> month of Blockbuster
> Total Access, No Cost. =20
> http://tc.deals.yahoo.com/tc/blockbuster/text5.com
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20
>=20
>=20
=20
________________________________________________________________________
____________
You rock. That's why Blockbuster's offering you one month of Blockbuster
Total Access, No Cost. =20
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest