htmlunit driver failed while firefox worked --I removed http *4.2* jar files already

316 views
Skip to first unread message

Jaeho Kim

unread,
Apr 22, 2014, 1:46:10 PM4/22/14
to jmeter-...@googlegroups.com
my WebDriver sampler worked fine in firefox but  I am trying to run htmlunit browser now...

removed the http*4.2* jar files in lib dir... but I do see following error..


Thread Name: Thread Group 1-1
Sample Start: 2014-04-22 13:35:32 EDT
Load time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 500
Response message: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot set property "loginflow" of undefined to "xpt/Checkout/ec/Billing"

RROR - com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet: IOException loading   some css file ***** css/core/global.css org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 56151; received: 10936
    at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180)
    at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
    at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:150)
    at com.gargoylesoftware.htmlunit.HttpWebConnection.downloadContent(HttpWebConnection.java:675)
    at com.gargoylesoftware.htmlunit.HttpWebConnection.downloadResponseBody(HttpWebConnection.java:657)
    at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:190)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1281)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1198)
    at com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleSheet.loadStylesheet(CSSStyleSheet.java:313)
    at com.gargoylesoftware.htmlunit.javascript.host.html.HTMLLinkElement.getSheet(HTMLLinkElement.java:130)
    at com.gargoylesoftware.htmlunit.javascript.host.css.StyleSheetList.item(StyleSheetList.java:151)
    at com.gargoylesoftware.htmlunit.javascript.host.Window.getComputedStyle(Window.java:1601)
    at com.gargoylesoftware.htmlunit.javascript.host.Element.getCurrentStyle(Element.java:545)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject$GetterSlot.getValue(ScriptableObject.java:320)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject$RelinkedSlot.getValue(ScriptableObject.java:373)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.get(ScriptableObject.java:483)
    at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.get(SimpleScriptable.java:85)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.getProperty(ScriptableObject.java:2296)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1434)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1419)
    at net.sourceforge.htmlunit.corejs.javascript.Interpreter.doGetElem(Interpreter.java:2299)
    at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1267)
    at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
    at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
    at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:309)
    at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3031)
    at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$3.doRun(JavaScriptEngine.java:561)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:669)
    at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:602)
    at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:507)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:570)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1062)
    at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:409)
    at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:266)
    at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:286)
    at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:683)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:642)
    at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170)
    at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072)
    at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206)
    at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330)
    at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3116)
    at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2083)
    at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:918)
    at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
    at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:899)
    at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:242)
    at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:188)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:437)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311)
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:376)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:474)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:463)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:244)
    at sun.org.mozilla.javascript.internal.MemberBox.invoke(MemberBox.java:132)
    at sun.org.mozilla.javascript.internal.NativeJavaMethod.call(NativeJavaMethod.java:190)
    at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:3073)
    at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:2239)
    at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:138)
    at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:323)
    at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:92)
    at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:85)
    at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:2747)
    at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(InterpretedFunction.java:149)
    at sun.org.mozilla.javascript.internal.Context.evaluateReader(Context.java:1169)
    at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:152)
    at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:170)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
    at com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler.sample(WebDriverSampler.java:50)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
    at java.lang.Thread.run(Thread.java:662)

not sure what is going on here.. ? any help

Jaeho Kim

unread,
Apr 24, 2014, 12:21:46 PM4/24/14
to jmeter-...@googlegroups.com
Here is one more errror result


Response message: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot set property "Billing" of undefined to "[object Object]" (https://www.xxxxxxxxxxl.com/MERCHANTPAYMENTWEB-640-20140419-1/Checkout/js/billing.js#1)
Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info: host: 'US154954', ip: '10.180.146.215', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_38'
Driver info: driver.version: HtmlUnitDriver (<Unknown source>#14) in <Unknown source> at line number 14

anujar...@gmail.com

unread,
May 2, 2014, 4:27:26 PM5/2/14
to jmeter-...@googlegroups.com
As they say htmlUnit Config would not work with http*4.2* jar files but the latest ones.

I found the same issue, though i have downloaded all WebDriver set and added all those jar files in jmeter/lib. FirefoxDriverConfig was working and not HtmlUnit Driver.

But i found that i forgot to remove one of my old "httpcore-4.2.*.jar". So I have replaced all old version files with the new ones available in WebDriver Sampler set and added new ones.
and this has resolved the issue. So please check all the files.

Thanks,
Anuja
Reply all
Reply to author
Forward
0 new messages