Hi Julien... I'ved looked at the API javadoc of HtmlUnitDialog, 1.4 and 2.0 there is no method that disables javascript exceptions.
Only these methods relates to Javascript setScriptingEnabled setExpectedJavaScriptAlert setExpectedJavaScriptConfirm setExpectedJavaScriptPrompt I've raised a feature request for adding a method to disable javascript exceptions from being thrown. > Message: 8 > Date: Tue, 18 Dec 2007 08:10:04 +0000 (GMT) > From: Julien HENRY <[EMAIL PROTECTED]> > Subject: [JWebUnit-users] Re : How to ignore javascript errors > To: Usage problems for JWebUnit <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="utf-8" > > Hi, > > There is an option in HtmlUnit, but I'm sorry JWebUnit doesn't provide > (yet) a way to change it. Just take a look in HtmlUnitDialog, there is > something like wc.setThrowExceptionOnScriptError(true). > > Please open a feature request (if there is not already one). > > Concerning using JWebUnit outside of testing purpose (for example for > crawling), just use directly IJWebUnitDialog interface, or HtmlUnit. > > ++ > > Julien > > ----- Message d'origine ---- > De : Oliver Chua <[EMAIL PROTECTED]> > ? : [email protected] > Envoy? le : Mardi, 18 D?cembre 2007, 6h09mn 06s > Objet : [JWebUnit-users] How to ignore javascript errors > > Hi guys, > > I used to use this > HttpUnitOptions.setExceptionsThrownOnScriptError(false); > to ignore javascript errors. > in Jwebunit 1.2 > > I'm trying to port to Jwebunit 1.4 > but the above method is no longer available. > > > Please don't tell me to call > disableScripting() or setScriptingEnabled(false); > because I need the javascript functionality. > (form is submitted by clicking on a link) > > I really need to use 1.4 as > 1.2 doesn't support > two buttons with one name. > Also, I don't have control on the HTML produced. > > As an aside, I am looking for an API > that does something JWebUnit does > but is not for the context of testing... > > Anybody know any? > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ JWebUnit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
