Subj : Re: Rhino - undefined Java Script - Internet Explorer To : netscape.public.mozilla.jseng From : murali_c@sella.it (Muralidharan) Date : Tue Mar 18 2003 06:46 am Hi, I'm trying a same kind of test: HTTPUnit with a JavaScript-dependent JSP application. This is the exception I receive. com.meterware.httpunit.ScriptException: Event 'setFocus(document.AuthenticationForm.elements[0])' failed: ReferenceError: "setFocus" is not defined. at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptException(JavaScript.java:185) at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:159) at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:46) at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:595) at com.meterware.httpunit.javascript.JavaScript$Window.initialize(JavaScript.java:401) at com.meterware.httpunit.javascript.JavaScript.run(JavaScript.java:80) at com.meterware.httpunit.javascript.JavaScriptEngineFactory.associate(JavaScriptEngineFactory.java:46) at com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:44) at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:111) at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113) Will upgrading the Rhino JS library separately, be of any help to solve this? Murali weaver.je@comcast.net (Jim Weaver) wrote in message news:<618b9da8.0302282127.3d663f7c@posting.google.com>... > Hi, > > HttpUnit, which is acting as the browser behind the scenes of > jWebUnit, does not yet support access to the getElementById method on > the HTMLDocument class. While that may be supported soon, your method > subsequently updates a table cell attribute, which also isn't activity > supported by HttpUnit, and is less likely to be supported anytime > soon. > > Essentially, using any HttpUnit based tool with applications relying > extensively on javascript manipulation of elements is problematic. > HttpUnitOptions class (even when HttpUnit is used behind jWebUnit) > will allow you to supress javascript exceptions and test other aspects > of the page, but if the javascript is being used to accomplish core > functionality which must be tested, you may do better with a tool that > drives a browser instance. > > The HttpUnit site's homepage has a link to a javascript support page, > which spells out which properties / methods on DOM objects are > currently supported. > > Jim .