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

Rob Manthey Rob Manthey <canoo@rob.manthey.id.au>
Tue, 15 May 2007 16:59:33 +1000


That's very amusing ... so Sun have hopeless web programmers?  :)
I assume Ashok is targetting the Sun Grid portal site as a dummy target 
for training purposes, and he's not writing an automated hacking script 
... ?
:)
Cheers
 Rob
PS: I think my previous blurt about running out of memory is possibly 
now invalid. I recently ran my entire test suite without an .sh wrapper 
and the damn thing just worked without ramping the memory.  Sigh.


on 15/05/07 16:44 Michael Habbert said the following:
> Hi Ashok Chigullapally,
>
> while you provided sufficient information thanks to the testing link I 
> would suggest you check your HTML-page syntax!
>
> --------------
> ...
> <form onsubmit="return trySubmit(this) ;" 
> action="/GridPortal/GridPortal/LandingAction.do" method="post" 
> name="GridPortal_LandingForm"/>
> ...
> ------------------
>
> with such a from without any input-fields I wouldn't be surprised 
> about your error.
>
> My HTML-checker also warns me about: line 232 column 1 - Warning: 
> missing </form>
>
> Michael Habbert

on 15/05/07 16:24 Marc Guillemot said the following:
> Hi Ashok,
>
> the html code is probably too bad and therefore can't be parsed by
> htmlunit. This is an other example of website that should have started
> with test automation during development ;-)
>
> Marc.
>
>   



>
> Ashok Chigullapally wrote:
>> I am trying to automate the login page to start for the following 
>> website :
>>
>> https://www.network.com
>>
>> For some reason input fields are not recognized.
>>
>> Following is my script. I will highly appreciate for your help.
>>
>> -------------------
>> <project name="SimpleTest" basedir="." default="main">
>>    <property name="webtest.home" location="/export/home/sgqa/webtest" />
>>    <import file="${webtest.home}/lib/taskdef.xml"/>
>>
>>    <target name="main">
>>           <webtest name="LoginTest">
>>                  <config
>>                          saveresponse="true"
>>                          resultpath="/tmp/results"
>>                          showhtmlparseroutput="true"
>>                          host="network.com"
>>                          port="443"
>>              protocol="https" />
>>          <steps>
>>                          <invoke
>>                            description="Load Login Page"
>>                            
>> url="/GridPortal/GridPortal/StartAction.do?aceActionName=AceSpecificInitializeOnly" 
>> />
>>              <verifyTitle
>>                            description="We should see Welcome to Sun 
>> Grid"
>>                text="Sun Grid" />
>>              <verifyText description="Verify the Welcome to Sun Grid"
>>                            text="Enter" />
>>              <selectForm name="GridPortal_LandingForm" />
>>              <verifyInputField name="usrNm" 
>> formName="GridPortal_LandingForm" value="" />
>>          </steps>
>>       </webtest>
>>     </target>
>> </project>
>> ----------------------
>>
>>
>> Following is the screen output when I am executing the test case :
>>
>> [selectForm]  INFO (com.canoo.webtest.engine.WebClientContext) - 
>> Current form set to 
>> (action=/GridPortal/GridPortal/LandingAction.do;jsessionid=F9888A61AA614739A126A88302E7E53D) 
>>
>> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - >>>> Start 
>> Step: verifyInputField (5/5)
>> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - Running 
>> with: Canoo Webtest: R_1551.
>> [verifyInputField]  INFO (com.canoo.webtest.steps.Step) - Exception 
>> 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_1551.
>>  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this 
>> class: com.canoo.webtest.engine.StepFailedException
>>  INFO (com.canoo.webtest.steps.Step) - Message was: No suitable form 
>> found having field named "usrNm"
>>  INFO (com.canoo.webtest.ant.WebtestTask) - Finished executing 
>> webtest "LoginTest" 
>> (/export/home/sgqa/webtest/practice/SimpleTest.xml:6: )
>>
>> BUILD FAILED
>> /export/home/sgqa/webtest/practice/SimpleTest.xml:6: Canoo Webtest: 
>> R_1551.
>> Test failed.
>> Test step steps 
>> (/export/home/sgqa/webtest/practice/SimpleTest.xml:14: ) null failed 
>> with message "No suitable form found having field named "usrNm""
>
>