[Webtest] clicklink and clickbutton-no new response ...
Marc Guillemot
webtest@lists.canoo.com
Tue, 20 Jul 2004 10:30:33 +0200
May you have some javascript in the page? Calling link.click() "simulates" a click on the link and triggers for instance
the onclick javascript code which can cancel the navigation to the url specified in the href. Else I know that httpunit
handles targets quite bad. In all cases, if you can build a very small sample script+html page illustrating the problem,
I'm interested in (the smallest possible is the best, really with minimal html code).
Marc.
Werner Koenig wrote:
> Hallo,
>
> when performing a click on a link or a button (see the following xml - I
> don't think it is wrong !?) id does not work: no new request is coming
> from the server.
> In Server-debug-mode I did not see an incoming request.
>
> <clicklink stepid="Detailinfo" label="Dr">
> or
> <setinputfield name="nname" value="aName" />
> <clickbutton stepid="submit masuche"
> label=" Suche starten ">
> <form name="mitarbeitersuche" />
> </clickbutton>
> I changed the code submitting the request in com.canoo.webtest.steps.request.ClickButton.java:
>
> gotoTarget(...) {...
> WebRequest req = form.getRequest((SubmitButton)button);
> // original:
> setIntermediateResponse(context.getWebConversation().getCurrentPage());
> setIntermediateResponse(context.getWebConversation().getResponse(req));
> ...}
>
> and in ClickLink:
> doExecute(...) {...
> prepareConversation(context);
> theLink.click();
> WebConversation wc =
> context.getWebConversation();
> wc.sendRequest(theLink.getRequest());
> WebResponse resp = wc.getCurrentPage();
> ...}
>
> before it was only WebResponse resp = theLink.click();
>
> and now it works !?!?
>
> some ideas?
>
> Many thanks!
>
>
> Werner
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>