Hi, onload event are surely fired, this can't be the cause of the problem.
Your WebTest source doesn't help to understand what is going wrong ;-( If you can isolate the problem, the HTML and JS code allowing to reproduce it would be useful. Cheers, Marc. -- Web: http://www.efficient-webtesting.com Blog: http://mguillem.wordpress.com Diptendu wrote: > Hello, > > It seems that the Body Onload event is not firing in our webtest. > The application is working as expected using the browser but > behaving differently when using Canoo WebTest. The difference > is that code that should execute in the OnLoad handler is not executing. > This is seen by comparing the "Resulting page" that is getting generated > after > the last successful step (that happens to be a "sleep" put in to work with > AJAX call) to the page produced normally through the browser. > The log shows both the call as well as the defintion of the event > handler: > > [sleep] DEBUG (httpclient.wire.content) - << "<body > onLoad="onload_click()">[\n]" > > > [sleep] DEBUG (httpclient.wire.content) - << "function onload_click() > {[\n]" > > But I do not seem to see any Fire event for OnLoad. > > The test is given below: > > <?xml version="1.0" encoding="UTF-8"?> > <project basedir="." default="wt.full" name="webtestproject"> > > <property name="wt.deleteReports.skip" value="skip"/> > <property file="${basedir}/webtest.properties"/> > <property name="webtest.home" value="C:\webtest"/> > <property name="wt.config.resultpath" value="${basedir}/results"/> > <property name="wt.config.saveresponse" value="true"/> > <property name="wt.config.summary" value="true"/> > <property name="wt.config.haltonerror" value="false"/> > <property name="wt.config.haltonfailure" value="false"/> > <property name="wt.config.saveresponse" value="true"/> > <import file="${webtest.home}/webtest.xml"/> > <target name="wt.testInWork"> > <webtest name="myTest"> > <config basepath="${webapp.name}" > haltonerror="${wt.config.haltonerror}" > haltonfailure="${wt.config.haltonfailure}" > host="${application.host}" port="${appserv.port}" > protocol="${protocol.name}" > resultpath="${wt.config.resultpath}" > saveresponse="${wt.config.saveresponse}" > showhtmlparseroutput="true" > summary="${wt.config.summary}"> > <option name="ThrowExceptionOnScriptError" value="false"/> > </config> > <steps> > <invoke > url="${protocol.name}://${application.host}:${appserv.port}/${webapp.name}/servlet/interfaceengine.PortalServlet?IID=LoginPage"/> > <!--<selectForm name="LoginPageform"/>--> > <setInputField name="accuseridinput" value="diptendu"/> > <setInputField name="accpasswordinput" value="diptendu"/> > <clickButton label="Sign In"/> > <sleep seconds="12"/> > <verifyElementText htmlId="companyName" text="ABCD Ltd"/> > <clickLink label="User Creation"/> > <verifyElementText htmlId="ladmintitle" text="User > Creation"/> > <followFrame name="ladminFrame"/> > </steps> > </webtest> > </target> > </project> > > Regards. > _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest