Hey Mittie,
Here is the html, where they cannot pick a list element until element "user"
has a character entered:
<html>
<head>
</head>
<body>
<input type="text" name="user" id="user"
onkeyup="document.getElementById('list').disabled=false" />
<p />
<select name="list" id="list" disabled="disabled">
<option value="US">US</option>
<option value="Other">Other</option>
</select>
</body>
</html>
A WebTest would enter a name and then set the list value, but since it is
done onkeyup nothing happens and it cannot find an element in the disabled
select. I had a problem like this with an input and used
"emulateSetInputFieldAttribute" to programmatically enable the input field.
So, I was inquiring if there is similar functionality to enable a select.
<target name="test.mock">
<webtest name="test">
<config
host="localhost"
port="8080"
protocol="http"
basepath="HelloWorld" />
<steps>
<invoke
description="goto Test Page"
url="/testSelectDisabled.htm" />
<setInputField
description="Set Select Enabled"
name="user"
value="Troy" />
<setSelectField
description="Select List"
name="list"
value="US" />
</steps>
</webtest>
</target>
Thanx,
Troy
------=_NextPart_000_0500_01C685F2.7B187CA0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR></HEAD> <BODY>
<DIV><SPAN class=3D679430210-02062006><FONT face=3DArial size=3D2>Hey=20
Mattie,</FONT></SPAN></DIV> <DIV><SPAN class=3D679430210-02062006><FONT
face=3DArial=20 size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D679430210-02062006><FONT face=3DArial size=3D2>Here = is
the html,=20 where they cannot pick a list element until user has a
character=20 entered:</FONT></SPAN></DIV> <DIV><SPAN
class=3D679430210-02062006><FONT face=3DArial=20
size=3D2><html><BR> <head><BR> </head><BR>&nb=
sp;<body><BR> <input=20
type=3D"text" name=3D"user" id=3D"user"=20
onkeyup=3D"document.getElementById('list').disabled=3Dfalse"=20
/><BR> <p /><BR> <select name=3D"list" =
id=3D"list"=20 disabled=3D"disabled"><BR> <option=20
value=3D"US">US</option><BR> <option=20
value=3D"Other">Other</option><BR> </select><BR=
> </body><BR></html><BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D679430210-02062006><FONT face=3DArial size=3D2>A =
WebTest would=20 enter a name and then set the list value, but since it is
done onkeyup = nothing=20 happens and it cannot find an element in the
disabled select. I had a = problem=20 like this with an input and used
"</FONT><FONT face=3DArial><FONT=20
size=3D2>emulateSetInputFieldAttribute<SPAN class=3D679430210-02062006>" =
to programmatically enable the input field. So, I was inquiring if =
there is=20 similar functionality to enable a =
select.</SPAN></FONT></FONT></DIV></SPAN>
<DIV><SPAN class=3D679430210-02062006><FONT face=3DArial =
size=3D2> <target=20
name=3D"test.mock"><BR> <webtest=20
name=3D"test"><BR> <config =
<BR> =20
host=3D"localhost"<BR> =20
port=3D"8080"<BR> =20
protocol=3D"http"<BR> basepath=3D"HelloWorld"=20
/><BR> <steps><BR> <i=
nvoke<BR> description=3D"goto=20
Test =
Page"<BR> url=3D"/testSelectDisabled.htm"=20
/><BR> <setInputField<BR> &=
nbsp; description=3D"Set=20
Select=20
Enabled"<BR> name=3D"user"<BR> &n=
bsp; value=3D"Troy"=20
/><BR> <setSelectField<BR> =
description=3D"Select=20
List"<BR> name=3D"list"=20
<BR> value=3D"US"=20
/><BR> </steps><BR> </webtest>=
<BR> </target><BR></FONT></SPAN></DIV>
<DIV><SPAN class=3D679430210-02062006><FONT face=3DArial=20
size=3D2>Thanx,<BR>Troy</DIV></FONT></SPAN></BODY></HTML>
------=_NextPart_000_0500_01C685F2.7B187CA0--
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest