Getting TypeError for HtmlUnit Driver

164 views
Skip to first unread message

Geeta Chaugule

unread,
Apr 5, 2012, 5:50:50 AM4/5/12
to webd...@googlegroups.com
Hi,

 I am using HtmlUnit Driver to test the service....but getting following TypeError:

"TypeError: Cannot read property "util" from undefined (https://10.104.195.46:8443/headless14045/sample/js/client.js#24)
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "util" from undefined (https://10.104.195.46:8443/headless14045/sample/js/client.js#24)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:545)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:520)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:896)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:53)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:84)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:313)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor.run(JavaScriptExecutor.java:148)
at java.lang.Thread.run(Unknown Source)"

I run the same code by replacing HtmlUit driver with Firefox driver, it works fine. But I want to test the service with the headless driver.

Can anyone help me on this?


Regards,
Geeta.
Message has been deleted

Sasi kumar

unread,
Apr 5, 2012, 7:02:02 AM4/5/12
to webdriver
check if this is same as yours ,seems to be an issue
http://code.google.com/p/selenium/issues/detail?id=1360

Krishnan Mahadevan

unread,
Apr 5, 2012, 7:05:18 AM4/5/12
to webd...@googlegroups.com
Geeta 
What version of Selenium are you using ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.


Geeta Chaugule

unread,
Apr 5, 2012, 7:23:16 AM4/5/12
to webd...@googlegroups.com

yes, this is the same...do we have any alternate solution for this?

On Thu, Apr 5, 2012 at 4:32 PM, Sasi kumar <sasi...@gmail.com> wrote:

Geeta Chaugule

unread,
Apr 5, 2012, 7:25:09 AM4/5/12
to webd...@googlegroups.com

I am using selenium version 2.20.

Krishnan Mahadevan

unread,
Apr 5, 2012, 7:57:07 AM4/5/12
to webd...@googlegroups.com
Geeta,
The last comment in that issue said, that it could be a problem with HtmlUnit and needs to be taken up with them.
That issue has been classified as willNotfix.

Perhaps you could help include the code that you are using to simulate the problem as well.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



Sasi kumar

unread,
Apr 11, 2012, 2:52:01 AM4/11/12
to webd...@googlegroups.com
Sorry iam not using HtmlUnit Driver.

Every one is suggesting to use firefox driver instead,which is not logical ! as you are into htmlunit.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages