Removing the WebClient.setIgnoreOutsideContent(true) statement is the solution for the mentioned problem, see also http://webtest-community.canoo.com/jira/browse/WT-430.

Hello,

I am on the way to integrate WebTest with JMeter.

Therefore I checked out R_1768 at that time and modified this version. It would be tedious work now to make the modifications another time.

I have installed both R_1768 and R_1769. Tests however fail with R_1768 due to JavaScript issues and succeed with R_1769.

Both versions use HtmlUnit 2.5 and NekoHtml 1.9.12. Are there any changes in WebTest code concerning JavaScript functionality?


<failure message="JavaScript error loading page ***: Wrapped com.gargoylesoftware.htmlunit.ScriptException: Wrapped com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot set property &quot;value&quot; of undefined to &quot;&quot; (script in *** from (1060, 235) to (1076, 15)#1070)">

Stacktrace (line numbers possibly do not match):

JavaScript error loading page ***: Wrapped _com.gargoylesoftware.htmlunit.ScriptException_: Wrapped _com.gargoylesoftware.htmlunit.ScriptException_: TypeError: Cannot set property "value" of undefined to "" (script in *** from (1060, 235) to (1076, 15)#1070)

at com.canoo.webtest.steps.StepUtil.handleException(_StepUtil.java:80_)

     at com.canoo.webtest.steps.Step.handleException(_Step.java:459_)

     at com.canoo.webtest.steps.Step.execute(_Step.java:129_)

at org.apache.tools.ant.UnknownElement.execute(_UnknownElement.java:290_)

     at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

     at java.lang.reflect.Method.invoke(_Method.java:597_)

at org.apache.tools.ant.dispatch.DispatchUtils.execute(_DispatchUtils.java:105_)

     at org.apache.tools.ant.Task.perform(_Task.java:348_)

at com.canoo.webtest.steps.AbstractStepContainer.executeContainedStep(_AbstractStepContainer.java:111_)

at com.canoo.webtest.steps.AbstractStepContainer.executeContainedSteps(_AbstractStepContainer.java:119_)

at com.canoo.webtest.steps.control.GroupStep.doExecute(_GroupStep.java:14_)

     at com.canoo.webtest.steps.Step.execute(_Step.java:112_)

at org.apache.tools.ant.UnknownElement.execute(_UnknownElement.java:290_)

     at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

     at java.lang.reflect.Method.invoke(_Method.java:597_)

at org.apache.tools.ant.dispatch.DispatchUtils.execute(_DispatchUtils.java:105_)

     at org.apache.tools.ant.Task.perform(_Task.java:348_)

at com.canoo.webtest.ant.TestStepSequence.executeSteps(_TestStepSequence.java:43_)

at com.canoo.webtest.ant.TestStepSequence.doExecute(_TestStepSequence.java:31_)

     at com.canoo.webtest.steps.Step.execute(_Step.java:112_)

     at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)

     at java.lang.reflect.Method.invoke(_Method.java:597_)

at org.apache.tools.ant.dispatch.DispatchUtils.execute(_DispatchUtils.java:105_)

     at org.apache.tools.ant.Task.perform(_Task.java:348_)

at com.canoo.webtest.ant.WebtestTask.executeSteps(_WebtestTask.java:374_)

     at com.canoo.webtest.ant.WebtestTask.execute(_WebtestTask.java:320_)

...

Caused by: _com.gargoylesoftware.htmlunit.ScriptException_: Wrapped _com.gargoylesoftware.htmlunit.ScriptException_: Wrapped _com.gargoylesoftware.htmlunit.ScriptException_: TypeError: Cannot set property "value" of undefined to "" (script in *** from (1060, 235) to (1076, 15)#1070)

at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(_JavaScriptEngine.java:534_)

at net.sourceforge.htmlunit.corejs.javascript.Context.call(_Context.java:515_)

at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(_ContextFactory.java:507_)

at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(_JavaScriptEngine.java:464_)

at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(_HtmlPage.java:992_)

at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(_EventListenersContainer.java:164_)

at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(_EventListenersContainer.java:177_)

at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(_Node.java:574_)

at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(_HtmlElement.java:936_)

at net.sourceforge.htmlunit.corejs.javascript.Context.call(_Context.java:515_)

at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(_ContextFactory.java:507_)

at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(_HtmlElement.java:941_)

at com.gargoylesoftware.htmlunit.html.HtmlElement.click(_HtmlElement.java:1317_)

at com.gargoylesoftware.htmlunit.html.HtmlElement.click(_HtmlElement.java:1288_)

at com.gargoylesoftware.htmlunit.html.HtmlElement.click(_HtmlElement.java:1257_)

at com.canoo.webtest.steps.request.ClickLink.findTarget(_ClickLink.java:70_)

at com.canoo.webtest.steps.request.AbstractTargetAction.doExecute(_AbstractTargetAction.java:72_)

     at com.canoo.webtest.steps.Step.execute(_Step.java:112_)

     ... 30 more

...

======= EXCEPTION END ========

== CALLING JAVASCRIPT ==

function () {

     [native code, arity=0]

}



======= EXCEPTION END ========







Any help would be appreciated. Thank you in advance.





Bye, Stefan


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

Reply via email to