Jevon,

Would it be preferable to use setThrowExceptionOnScriptError vs 
setScriptingEnabled? Also I didn't see setThrowExceptionOnScriptError in the 
api doc, I do see it in HtmlUnit.

Eric

From: Jevon Wright [mailto:je...@jevon.org]
Sent: Monday, April 12, 2010 4:06 PM
To: Usage problems for JWebUnit
Subject: Re: [JWebUnit-users] Browser problems

Hi,

For some of my tests I need to use the Google Maps API which throws syntax 
errors, so I need to disable throwing exceptions on syntax errors:

   HtmlUnitTestingEngineImpl engine = (HtmlUnitTestingEngineImpl) 
getTestingEngine();
   engine.setThrowExceptionOnScriptError(false);

You should only use this sparingly though, to try and catch syntax errors in 
your own scripts.

Cheers
Jevon
On Tue, Apr 13, 2010 at 7:40 AM, Eric Jelinek 
<ejeli...@hotels.com<mailto:ejeli...@hotels.com>> wrote:
Lakshmi,

I use the HTMLUnit testing engine and something you might try is creating a 
WebClient and during the instantiation you set the browser

WebClient client = new WebClient(BrowserVersion.FIREFOX_3);
http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/WebClient.html

As for your javascript, I too have issues with it where I cannot control or 
change the js in the app, so I use setScriptingEnabled(false);
http://jwebunit.sourceforge.net/faq.html#javascript-errors

Good Luck
Eric


From: lakshmi somavaram 
[mailto:lsomava...@gmail.com<mailto:lsomava...@gmail.com>]
Sent: Wednesday, March 17, 2010 3:48 PM
To: Usage problems for JWebUnit
Subject: [JWebUnit-users] Browser problems

Dear Users,

Could you please let me know what is the default browser of JWebUnit? Also, 
what API's can I use to change the Browser version?

I am getting some Java Script errors, so I want to be able to try with 
different version of browser.

Thank you,
Lakshmi

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net<mailto:JWebUnit-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to