[Webtest] Error in my first test
Marc Guillemot
webtest@lists.canoo.com
Wed, 11 Jan 2006 22:49:37 +0100
Hi,
it looks like your page contains js that isn't yet understood by
htmlunit (the underlying "browser"). Can you set the log to the debug
level (normally in lib/log4j.properties) and post the log output as well
as stack trace of the eception.
Your use of setInputField and clickButton seems to be correct.
Marc.
Moreno Crespo, Ana Isabel wrote:
> Hello.
>
> I have installed canoo and i´m creating my first test.
>
> It´s very simple:
>
> <project name="SimpleTest" basedir="." default="main">
> <property name="webtest.home" location="C:\herramientas_test\Canoo\build"
> />
> <import file="${webtest.home}/lib/taskdef.xml" />
> - <target name="main">
> - <webtest name="myTest">
> - <steps>
> <invoke description="Eficaz" url="http://10.252.131.102:8081/eficaz" />
> </steps>
> </webtest>
> </target>
> </project>
>
> And my result is this
>
> [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
> R_1115.
> [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - No configuration
> defined
> , using default configuration.
> [webtest] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null
> "[impli
> ct setup step]" (1/3)
> [webtest] INFO (com.canoo.webtest.steps.Setup) - Surfing with browser
> Mozilla
> /4.0 (compatible; MSIE 6.0b; Windows 98)
> [webtest] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke
> "Efic
> az" (2/3)
> [webtest] INFO (com.canoo.webtest.steps.request.AbstractTargetAction) -
> -> go
> toTarget by URL: http://10.252.131.102:8081/eficaz
> [webtest] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
> respo
> nse for url: http://10.252.131.102:8081/eficaz
> [webtest] INFO (org.apache.commons.httpclient.HttpMethodDirector) -
> Redirect
> requested but followRedirects is disabled
> [webtest] ERROR (com.canoo.webtest.steps.request.TargetHelper) -
> ScriptExcepti
> on: enclosed exception was "null"
> [webtest] INFO (com.canoo.webtest.steps.Step) - Exception thrown from
> this cl
> ass: com.canoo.webtest.engine.StepFailedException
> [webtest] INFO (com.canoo.webtest.steps.Step) - Message was: Step[invoke
> "Efi
> caz" (2/3)]: Script error executing at: invoke
> [webtest] INFO (com.canoo.webtest.ant.WebtestTask) - Test report
> successfully
> created.
>
> BUILD SUCCESSFUL
> Total time: 4 seconds
>
> What happen?
> Please, i need your help!!
>
> If i want to write in a textbox and click in a button:
>
> <setInputField description="Set the input field"
> name="login.username"
> value="as" />
> <clickButton description="Submit the simple form"
> name="login.buttonEntrar" />
>
> Is it correct?
>
> Thank you.
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>