Hallo Simon,

YUI + Prototype + DWR? That's a challenge.

I can't say if you've hit something from these frameworks that is not
yet correctly handled by HtmlUnit or if the easyajax setting is not yet
able to handle these (remember that the underlying feature is still
experimental, it works fine in HtmlUnit's library tests for Prototype
and YUI for instance but not for Dojo).
To be sure that the problem is a wrong JS interpretation and doesn't
come from the fact that WebTest is too fast, please test with
something like

sleep seconds: 15

after your clickLink.

To "see" the current state of the DOM, you can use following:

groovy { println step.context.currentResponse.asXML() }

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

Simon Tiffert wrote:
> Hello,
> 
> I'm trying to test our application with Webtest.
> With the easyajax configuration I was able to login (thanks Marc).
> After switching to a page with our portlets, the test is failing and
> the resulting DOM of the Webtest report doesn't show the portlet
> content inserted with Javascript. Is this a Javascript issue with
> Webtest/HtmlUnit? We are using a combination of frameworks like YUI,
> Prototype and DWR.
> 
> Thanks for your help.
> 
> Following my test case:
> 
> package com.agimatec.webtest
> 
> import com.canoo.webtest.WebtestCase
> 
> 
> class FirstWebTest extends WebtestCase {
> 
> 
>       void testOstiumLogin() {
> 
> 
>               webtest("Ostium login") {
>                   config(easyajax: true)
> 
>             invoke "http://public-demo.agimatec.de/c";
>             setInputField name: "_58_login", value: "[email protected]"
>             setInputField name: "_58_password", value: "demo"
>             clickButton "Sign In"
>             clickLink "demo"
>             verifyTitle "Ostium - Delivery Machines"
>             setInputField(xpath:
> "//d...@id='agimatec_portlet_content__CuratorMachinaeBrowserPortlet_WAR_ostiumcuratormachinae_']//input",
> value: "82266")
>               }
>       }
> }
> 
> 
> It would be great to get these tests running.
> 
> Cheers
> Simon
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to