Form fields
Nicholas Lievens <nicholas.lievens-D/[email protected]> Fri, 3 Apr 2015 12:34:41 +0000
| Newsgroups | gmane.comp.web.canoo.webtest |
|---|---|
| Message-ID | <[email protected]> |
--===============0876825620==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_8d268f56df8c40e084c956318c71d05dBEPSMSE01protopianet_"
--_000_8d268f56df8c40e084c956318c71d05dBEPSMSE01protopianet_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi all,
I'm new to testing with WebTest. I'm trying to fill in some values on a for=
m that is within a frame (e.g. announceVisitor$LastNameTextBox) . When exec=
uting the test it picks up the frame as it should but the test fails. The r=
eason for this I think is the fact that the contents of the form are not lo=
aded (only the frame is). When I open the Error Page in the report I see th=
e frame but it should contain the form and its contents (input fields) but =
it doesn't. Does anyone have a suggestion to get the fields of the form?
My test looks like the following:
<?xml version=3D"1.0"?>
<!DOCTYPE project SYSTEM "../dtd/Project.dtd">
<project default=3D"test">
<target name=3D"test">
<webtest name=3D"Login to MyApp">
<invoke url=3D"http://myurl.=
test"/>
<setInputField name=3D"Usern=
ame" value=3D"999"/>
<setInputField description=
=3D"Set password field Password: 999" name=3D"Password" value=3D"999"/>
<clickButton label=3D"Login"=
/>
<followFrame name=3D"content=
s"/>
<clickElement xpath=3D"//td[=
text()=3D'Cell']"/>
<clickLink label=3D"MyLink"/=
>
<followFrame name=3D"main"/>
<selectForm name=3D"WebForm1=
"/>
<setSelectField htmlId=3D"ho=
stEmployeeSelect" value=3D"User, Test"/>
<setInputField name=3D"annou=
nceVisitor$LastNameTextBox" value=3D"test"/>
<setInputField name=3D"annou=
nceVisitor$FirstNameTextBox" value=3D"test"/>
<setInputField name=3D"annou=
nceVisitor$EmailTextBox" value=3D"[email protected]"/>
<setInputField name=3D"annou=
nceVisitor$PlateNumberTextBox" value=3D"test"/>
<clickButton id=3D"okButton"=
/>
</webtest>
</target>
</project>
Best Regards,
Nicholas
--_000_8d268f56df8c40e084c956318c71d05dBEPSMSE01protopianet_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"NL-BE" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"EN-US">Hi all,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I’m new to testing with W=
ebTest. I’m trying to fill in some values on a form that is within a =
frame (e.g. announceVisitor$LastNameTextBox) . When executing the test it p=
icks up the frame as it should but the test fails.
The reason for this I think is the fact that the contents of the form are =
not loaded (only the frame is). When I open the Error Page in the report I =
see the frame but it should contain the form and its contents (input fields=
) but it doesn’t. Does anyone have
a suggestion to get the fields of the form?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">My test looks like the fo=
llowing:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><?xml version=3D"1.0&qu=
ot;?><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><!DOCTYPE project SYSTEM &qu=
ot;../dtd/Project.dtd"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><project default=3D"tes=
t"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; <target name=
=3D"test"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; =
<webtest name=3D"Login to MyApp"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <invoke url=3D"http://myurl.test"/><o:=
p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <setInputField name=3D"Username" value=3D=
"999"/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <setInputField description=3D"Set password fie=
ld Password: 999" name=3D"Password" value=3D"999"/=
><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nb=
sp; =
&nb=
sp; <clickButton label=3D"Login"/><o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <followFrame name=3D"contents"/><o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <clickElement xpath=3D"//td[text()=3D'Cell']&q=
uot;/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; =
&nb=
sp; <clickLink label=3D"MyLink"/><o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <followFrame name=3D"main"/><o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <selectForm name=3D"WebForm1"/><o:p></=
o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <setSelectField htmlId=3D"hostEmployeeSelect&q=
uot; value=3D"User, Test"/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <setInputField name=3D"announceVisitor$LastNam=
eTextBox" value=3D"test"/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <setInputField name=3D"announceVisitor$FirstNa=
meTextBox" value=3D"test"/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <setInputField name=3D"announceVisitor$EmailTe=
xtBox" value=3D"[email protected]"/><o:p></o:p></span></p=
>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nb=
sp; =
&nb=
sp; <setInputField name=3D"announceVisitor$PlateNu=
mberTextBox" value=3D"test"/><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; <clickButton id=3D"okButton"/><o:p></o=
:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; &nbs=
p; =
</webtest><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; </target>=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"></project><o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">Best Regards,<o:p></o:p></p>
<p class=3D"MsoNormal">Nicholas &n=
bsp;  =
; <o:p></o:p></p>
</div>
</body>
</html>
--_000_8d268f56df8c40e084c956318c71d05dBEPSMSE01protopianet_--
--===============0876825620==
Content-Type: multipart/alternative; boundary="===============1695770364=="
MIME-Version: 1.0
Content-Disposition: inline
--===============1695770364==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
-------------------------------------
Dit e-mailbericht en alle documenten die ermee verzonden worden, zijn vertr=
ouwelijk en uitsluitend bestemd voor gebruik door de persoon of de ondernem=
ing waaraan ze geadresseerd zijn. Indien deze e-mail verkeerdelijk bij u t=
erechtkomt, gelieve de afzender te verwittigen en deze bestanden van uw com=
puter te verwijderen.
Ce message e-mail ainsi que tous les fichiers transmis sont confidentiels e=
t uniquement destin=C3=A9s =C3=A0 l'usage de la personne ou de l'entit=C3=
=A9 =C3=A0 qui ils sont adress=C3=A9s. Si vous avez re=C3=A7u ce message e=
-mail par erreur, veuillez en informer l'exp=C3=A9diteur et le supprimer de=
tout ordinateur.
This e-mail and any files transmitted with it are confidential and intended=
solely for the use of the individual or entity to whom they are addressed.=
If you have received this e-mail in error please notify the sender and de=
lete the material from any computer.
Diese E-mail und alle mit ihr gesendeten Dateien sind vertraulich und sind =
nur f=C3=BCr den Empf=C3=A4nger und nicht f=C3=BCr kommerzielle Zwecke zuge=
lassen. Falls Sie diese E-mail unberechtigterweise erhalten haben, informie=
ren Sie bitte den Absender und l=C3=B6schen Sie alle hier relevanten Dateie=
n.
-------------------------------------
--===============1695770364==
Content-Type: text/html; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
<p>-------------------------------------</p>
<p>Dit e-mailbericht en alle documenten die ermee verzonden worden, zijn ve=
rtrouwelijk en uitsluitend bestemd voor gebruik door de persoon of de onder=
neming waaraan ze geadresseerd zijn. Indien deze e-mail verkeerdelijk=
bij u terechtkomt, gelieve de afzender te verwittigen en deze bestanden va=
n uw computer te verwijderen.</p>
<p>Ce message e-mail ainsi que tous les fichiers transmis sont confidentiel=
s et uniquement destin=C3=A9s =C3=A0 l'usage de la personne ou de l'entit=
=C3=A9 =C3=A0 qui ils sont adress=C3=A9s. Si vous avez re=C3=A7u ce m=
essage e-mail par erreur, veuillez en informer l'exp=C3=A9diteur et le supp=
rimer de tout ordinateur.</p>
<p>This e-mail and any files transmitted with it are confidential and inten=
ded solely for the use of the individual or entity to whom they are address=
ed. If you have received this e-mail in error please notify the sende=
r and delete the material from any computer.</p>
<p>Diese E-mail und alle mit ihr gesendeten Dateien sind vertraulich und si=
nd nur f=C3=BCr den Empf=C3=A4nger und nicht f=C3=BCr kommerzielle Zwecke z=
ugelassen. Falls Sie diese E-mail unberechtigterweise erhalten haben, infor=
mieren Sie bitte den Absender und l=C3=B6schen Sie alle hier relevanten Dat=
eien.</p>
<p>-------------------------------------</p>
--===============1695770364==--
--===============0876825620==--