Feature Requests item #2643447, was opened at 2009-02-27 11:51
Message generated for change (Comment added) made by jevonwright
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=2643447&group_id=61302

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Interface Improvements (example)
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Till Kahle (tkahle)
Assigned to: Nobody/Anonymous (nobody)
Summary: Please provide access to setThrowExceptionOnScriptError

Initial Comment:
It would be very handy to be able to set:

setThrowExceptionOnScriptError( false );

This is MSIE and Firefox default behaviour and unfortunately a lot of sites out 
there do produce some JS errors but still need to be tested.

At least for HtmlUnit the implementation would be straightforward:

----- HtmlUnitTestingEngineImpl.java:

private boolean throwExceptionOnScriptError = true;

        /* (non-Javadoc)
         * @see 
net.sourceforge.jwebunit.api.ITestingEngine#setThrowExceptionOnScriptError(boolean)
         */
    public void setThrowExceptionOnScriptError(boolean value) {
        throwExceptionOnScriptError = value;
        if (wc != null) {
            wc.setThrowExceptionOnScriptError(value);
        }
    }

... down in initWebClient():

replace
   wc.setThrowExceptionOnScriptError(true);
with
   wc.setThrowExceptionOnScriptError( throwExceptionOnScriptError );

----- ITestingEngine.java:

    /** set to false if you don't want an exceptions when a javascript error 
occurs.
     * has no effect when setScriptingEnabled( false ) is set.
     * Default value is true.
     */
    public void setThrowExceptionOnScriptError(boolean value);
    
------ in WebTester.java

    /** set to false if you don't want an exceptions when a javascript error 
occurs.
     * has no effect when setScriptingEnabled( false ) is set.
     * Default value is true.
     */
    public void setThrowExceptionOnScriptError(boolean value) {
        getTestingEngine().setThrowExceptionOnScriptError(value);
    }

----- the thing I know nothing about is the selenium implementation...



----------------------------------------------------------------------

>Comment By: Jevon Wright (jevonwright)
Date: 2009-06-02 11:22

Message:
Was this resolved in r797?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=2643447&group_id=61302

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
JWebUnit-development mailing list
JWebUnit-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to