[Webtest] RE: Click button "HTM Page" failed

Smith, John C webtest@lists.canoo.com
Mon, 19 Apr 2004 12:45:01 -0500


Aatish,

Thank you for responding to my request.  While I am only a novice on =
javascript, I know that our pages are dynamically generated from an =
engine. Here is a code snippet:  I am not sure how to resolve this =
issue. What javascript rule is being broken?=20

            function doSub(inForm)
               {
                  inForm.elements["LAPLSR01.srSearchAcctType"].value =3D =
inForm.searchType.value;
                  inForm.elements["LAPLSR01.arRequestType"].value =3D =
inForm.searchBy.value;
                  if(inForm.searchBy.value =3D=3D "I" || =
(inForm.searchType.value =3D=3D "A" && inForm.searchBy.value =3D=3D =
"P"))
                     {
                       str1 =3D "/" + inForm.lName.value + " " + =
inForm.fName.value;
                     }
                  else
                     {
                        str1 =3D inForm.lgName.value;
                     }
                 var upCaseVer =3D str1.toUpperCase();
                 str1 =3D upCaseVer;
                 inForm.elements["LAPLSR01.srRequestData"].value =3D =
str1;
                 inForm.elements["LAPLSD00.wkCurrActionCd"].value =3D =
"I";
                 //inForm.submit();
               }


-----Original Message-----
From: webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Aatish Arora
Sent: Monday, April 19, 2004 10:35 AM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] RE: Click button "HTM Page" failed


Hi John,

Can u check ur javascript for the function
doSub(inForm)? thats where LAPLSD00.wkCurrActionCd is
set to "I" as the error points out.

cheers!
aatish


--- "Smith, John C" <John.C.Smith@fnf.com> wrote:
> Here is my old config file:  (Keep reading below:)
>=20
> <config
> 	host=3D"${host}"
>  	port=3D"${port}"
>  	protocol=3D"http" =09
>  	saveresponse=3D"${saveall}"
> 	basepath=3D"${basepath}"
> 	summary=3D"true"
> 	resultfile=3D"WebTestResults.xml"
> 	resultpath=3D"/results"
> 	showhtmlparseroutput=3D"false"
> 	haltonerror=3D"true"
> 	haltonfailure=3D"true"
> 	verbose=3D"true"/>
>=20
> Here is my new config file with an absolute path:
> (This resolve my
> result file issue, but I still have my same click
> button failure. See
> below.)
> (Keep reading below)
>=20
> <config
> 	host=3D"${host}"
>  	port=3D"${port}"
>  	protocol=3D"http" =09
>  	saveresponse=3D"${saveall}"
> 	basepath=3D"${basepath}"
> 	summary=3D"true"
> 	resultfile=3D"WebTestResults.xml"
>=20
>
resultpath=3D"D:\java\Canoo_Build432\test_root\results"
> 	showhtmlparseroutput=3D"false"
> 	haltonerror=3D"true"
> 	haltonfailure=3D"true"
> 	verbose=3D"true"/>
>=20
> Build results after
>=20
> ant -buildfile all_tests.xml
> Buildfile: all_tests.xml
>=20
> clean:
>=20
> runAll:
>=20
> tests:
>  [testSpec] log4j:WARN No appenders could be found
> for logger
> (com.meterware.httpunit.HttpWebResponse).
>  [testSpec] log4j:WARN Please initialize the log4j
> system properly.
>=20
> BUILD FAILED
> file:D:/java/Canoo_Build432/test_root/smoke.xml:61:
> Test failed.
> Test step clickbutton named "Search2: Click the go
> button" failed with
> message "Illegal parameter LAPLSD00.wkCurrActionCd
> in form [lapcsrx1,
> POST, /uinew/ui.do, , , _top, , POST request for
>
(http://afdev:8080/uinew/ui.do?SendDags=3Dyes&NewScreen=3Dlapcsrx1)
> /uinew/ui.do] with message <Parameter 'LAPLSD00.wkCurrActionCd' must
> have the value ''. Attempted to set it to: { I }> "
>=20
> -----Original Message-----
> From: webtest-admin@lists.canoo.com=20
> [mailto:webtest-admin@lists.canoo.com] On Behalf Of Aatish Arora
> Sent: Friday, April 16, 2004 7:39 AM
> To: webtest@lists.canoo.com
> Subject: RE: [Webtest] RE: Click button "HTM Page"
> failed
>=20
> John
>=20
> check ur <config> tag...
> seems like u missed out the resultpath:
>=20
>  >  [testSpec] Exception caught while writing test
> > summary
> > >  [testSpec] Message: Resultpath / ResultFile not
> > set properly in
> > > config     =20
>=20
>=20
> cheers!
> Aatish
>=20
>=20
>=20
> --- "Smith, John C" <John.C.Smith@fnf.com> wrote:
> > Thank you for your response to my inquiry.  I have
> > included the
> > following scripts, HTML page, all_tests.xml (Main
> > driver), and smoke.xml
> > (1 test suite). Let me know if you need any
> > additional information.
> >=20
> > <META HTTP-EQUIV=3D"Expires" CONTENT=3D"-1">
> >=20
> > <html lang=3D"en">
> >    <head>
> >       <title>Search</title>
> >=20
> >       <link href=3D"eng/style/afstyle.css"
> > type=3D"text/css"
> > rel=3D"STYLESHEET"/>
> >=20
> >       <script src=3Deng/jscript/functions.js
> > language=3D"JavaScript"></script>
> >=20
> >       <script language=3D"JavaScript">
> >             function doSub(inForm)
> >                {
> >                 =20
> > inForm.elements["LAPLSR01.srSearchAcctType"].value
> =3D
> > inForm.searchType.value;
> >                 =20
> > inForm.elements["LAPLSR01.arRequestType"].value =3D
> > inForm.searchBy.value;
> >                   if(inForm.searchBy.value =3D=3D "I"
> ||=20
> > (inForm.searchType.value =3D=3D "A" &&
> inForm.searchBy.value =3D=3D "P"))
> >                      {
> >                        str1 =3D "/" +
> > inForm.lName.value + " " +
> > inForm.fName.value;
> >                      }
> >                   else
> >                      {
> >                         str1 =3D
> inForm.lgName.value;
> >                      }
> >                  var upCaseVer =3D
> str1.toUpperCase();
> >                  str1 =3D upCaseVer;
> >                =20
> > inForm.elements["LAPLSR01.srRequestData"].value =3D
> > str1;
> >                =20
> > inForm.elements["LAPLSD00.wkCurrActionCd"].value =3D
> > "I";
> >                  //inForm.submit();
> >                }
> >=20
> >            function setSrchBy(inVal,inForm,
> output)
> >                {
> >                   if(inVal.value =3D=3D "C")
> >                      {
> >                         act =3D fctn2.val1;
> >                      }
> >                   else
> >                      {
> >                         act =3D fctn2.val2;
> >                      }
> >                 =20
> inForm.elements["searchBy"].length
> > =3D act.length;
> >                   for(i =3D 0; i < act.length; i++)
> >                      {
> >                       =20
> > inForm.elements["searchBy"].options[i].text =3D
> > act[i][0];
> >                       =20
> > inForm.elements["searchBy"].options[i].value =3D
> > act[i][1];
> >                      }
> >                 =20
> > inForm.elements["searchBy"].selectedIndex =3D 0;
> >                 =20
> > setInpFld(inForm.elements["searchBy"], inForm,
> > output);
> >                }
> >=20
> >            function pvPg(inForm)
> >               {
> >    	         =20
> > inForm.elements["LAPLSD00.wkCurrActionCd"].value =3D
> > "P";
> >                  window.location.href =3D
> >
>
"ui.do?NewScreen=3Dlapcsrx1&amp;SendDags=3Dyes&amp;TSHEADER.pcBusModule=3D=
LAPC
> > SRX1&amp;LAPLSD00.wkCurrActionCd=3DP";
> >               }
> >=20
> >            function nxtPg(inForm)
> >               {
> >                =20
> > inForm.elements["LAPLSD00.wkCurrActionCd"].value =3D
> > "N";
> >                  window.location.href =3D
> >
>
"ui.do?NewScreen=3Dlapcsrx1&amp;SendDags=3Dyes&amp;TSHEADER.pcBusModule=3D=
LAPC
> > SRX1&amp;LAPLSD00.wkCurrActionCd=3DN";
> >               }
>=20
=3D=3D=3D message truncated =3D=3D=3D



=09
	=09
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25=A2 =
http://photos.yahoo.com/ph/print_splash