[Webtest] New to webtest, unable to recognize input fields

Michael Habbert Michael Habbert <Michael.Habbert@netpioneer.de>
Tue, 15 May 2007 08:44:37 +0200


Hi Ashok Chigullapally,

while you provided sufficient information thanks to the testing link I wo=
uld suggest you check your=20
HTML-page syntax!

--------------
=2E..
<form onsubmit=3D"return trySubmit(this) ;" action=3D"/GridPortal/GridPor=
tal/LandingAction.do"=20
method=3D"post" name=3D"GridPortal_LandingForm"/>
=2E..
------------------

with such a from without any input-fields I wouldn't be surprised about y=
our error.

My HTML-checker also warns me about: line 232 column 1 - Warning: missing=
 </form>

Michael Habbert

Ashok Chigullapally wrote:
> I am trying to automate the login page to start for the following websi=
te :
>=20
> https://www.network.com
>=20
> For some reason input fields are not recognized.
>=20
> Following is my script. I will highly appreciate for your help.
>=20
> -------------------
> <project name=3D"SimpleTest" basedir=3D"." default=3D"main">
>    <property name=3D"webtest.home" location=3D"/export/home/sgqa/webtes=
t" />
>    <import file=3D"${webtest.home}/lib/taskdef.xml"/>
>=20
>    <target name=3D"main">
>           <webtest name=3D"LoginTest">
>                  <config
>                          saveresponse=3D"true"
>                          resultpath=3D"/tmp/results"
>                          showhtmlparseroutput=3D"true"
>                          host=3D"network.com"
>                          port=3D"443"
>              protocol=3D"https" />
>          <steps>
>                          <invoke
>                            description=3D"Load Login Page"
>                           =20
> url=3D"/GridPortal/GridPortal/StartAction.do?aceActionName=3DAceSpecifi=
cInitializeOnly"=20
> />
>              <verifyTitle
>                            description=3D"We should see Welcome to Sun =
Grid"
>                text=3D"Sun Grid" />
>              <verifyText description=3D"Verify the Welcome to Sun Grid"=

>                            text=3D"Enter" />
>              <selectForm name=3D"GridPortal_LandingForm" />
>              <verifyInputField name=3D"usrNm"=20
> formName=3D"GridPortal_LandingForm" value=3D"" />
>          </steps>
>       </webtest>
>     </target>
> </project>
> ----------------------
>=20
>=20
> Following is the screen output when I am executing the test case :
>=20
> [selectForm]  INFO (com.canoo.webtest.engine.WebClientContext) - Curren=
t=20
> form set to=20
> (action=3D/GridPortal/GridPortal/LandingAction.do;jsessionid=3DF9888A61=
AA614739A126A88302E7E53D)
> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - >>>> Start=20
> Step: verifyInputField (5/5)
> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - Running with:=
=20
> Canoo Webtest: R_1551.
> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - Exception=20
> thrown from this class: com.canoo.webtest.engine.StepFailedException
> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - Message was: =

> No suitable form found having field named "usrNm"
>  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo Webtest: R_1=
551.
>  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class=
:=20
> com.canoo.webtest.engine.StepFailedException
>  INFO (com.canoo.webtest.steps.Step) - Message was: No suitable form=20
> found having field named "usrNm"
>  INFO (com.canoo.webtest.ant.WebtestTask) - Finished executing webtest =

> "LoginTest" (/export/home/sgqa/webtest/practice/SimpleTest.xml:6: )
>=20
> BUILD FAILED
> /export/home/sgqa/webtest/practice/SimpleTest.xml:6: Canoo Webtest: R_1=
551.
> Test failed.
> Test step steps (/export/home/sgqa/webtest/practice/SimpleTest.xml:14: =
)=20
> null failed with message "No suitable form found having field named "us=
rNm""


--=20
Mit freundlichen Gr=C3=BC=C3=9Fen

Michael Habbert