[Webtest] [webtest][JIRA] Created: (WT-314) Exception thrown on button click

kejsi (JIRA) kejsi (JIRA)" <noreply@canoo.com
Wed, 13 Jun 2007 16:59:00 +0200 (CEST)


Exception thrown on button click
--------------------------------

         Key: WT-314
         URL: http://webtest-community.canoo.com/jira/browse/WT-314
     Project: WebTest
        Type: Bug

    Versions: 2.5    
    Reporter: kejsi


While executing step ClickButton exception was thrown:
{noformat}
[clickButton]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: clickButton "Click the narrow pane add button" (27/144)
[clickButton]  INFO (com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget by clickButton with name: null
[clickButton]  INFO (com.canoo.webtest.steps.request.ClickButton) - -> findTarget(by input): name= value=Add
[clickButton]  INFO (com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine) - Catched script exception
[clickButton] ======= EXCEPTION START ========
[clickButton] EcmaError: lineNumber=[1] column=[0] lineSource=[function () {] name=[TypeError] sourceName=[event for HtmlButtonInput[<input value="Add" onclick="var selPortletId = document.layout_n1_fm.add_n1_sel[document.layout_n1_fm.add_n1_sel.selectedIndex].value; if (selPortletId != '') { addPortlet('1', selPortletId, 'n1'); };" class="portlet-form-button" type="button">]] message=[TypeError: addPortlet is not a function, it is null. (event for HtmlButtonInput[<input value="Add" onclick="var selPortletId = document.layout_n1_fm.add_n1_sel[document.layout_n1_fm.add_n1_sel.selectedIndex].value; if (selPortletId != '') { addPortlet('1', selPortletId, 'n1'); };" class="portlet-form-button" type="button">]#1)]
[clickButton] com.gargoylesoftware.htmlunit.ScriptException: TypeError: addPortlet is not a function, it is null. (event for HtmlButtonInput[<input value="Add" onclick="var selPortletId = document.layout_n1_fm.add_n1_sel[document.layout_n1_fm.add_n1_sel.selectedIndex].value; if (selPortletId != '') { addPortlet('1', selPortletId, 'n1'); };" class="portlet-form-button" type="button">]#1)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:322)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:736)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.HtmlPage.runEventHandler(HtmlPage.java:1489)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.HtmlPage.runEventHandler(HtmlPage.java:1465)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:103)
[clickButton] 	at com.canoo.webtest.steps.request.ClickButton.findTarget(ClickButton.java:160)
[clickButton] 	at com.canoo.webtest.steps.request.AbstractTargetAction$1.call(AbstractTargetAction.java:108)
[clickButton] 	at com.canoo.webtest.steps.request.TargetHelper.protectedGoto(TargetHelper.java:88)
[clickButton] 	at com.canoo.webtest.steps.request.AbstractTargetAction.gotoTarget(AbstractTargetAction.java:106)
[clickButton] 	at com.canoo.webtest.steps.request.AbstractTargetAction.doExecute(AbstractTargetAction.java:78)
[clickButton] 	at com.canoo.webtest.steps.Step.execute(Step.java:104)
[clickButton] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[clickButton] 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
[clickButton] 	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
[clickButton] 	at com.canoo.webtest.steps.Step.execute(Step.java:104)
[clickButton] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[clickButton] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:164)
[clickButton] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[clickButton] 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at org.apache.tools.ant.Target.execute(Target.java:357)
[clickButton] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
[clickButton] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[clickButton] 	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[clickButton] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[clickButton] 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
[clickButton] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[clickButton] 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at org.apache.tools.ant.Target.execute(Target.java:357)
[clickButton] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
[clickButton] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[clickButton] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[clickButton] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[clickButton] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[clickButton] 	at org.apache.tools.ant.Main.runBuild(Main.java:698)
[clickButton] 	at org.apache.tools.ant.Main.startAnt(Main.java:199)
[clickButton] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[clickButton] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[clickButton] Caused by: org.mozilla.javascript.EcmaError: TypeError: addPortlet is not a function, it is null. (event for HtmlButtonInput[<input value="Add" onclick="var selPortletId = document.layout_n1_fm.add_n1_sel[document.layout_n1_fm.add_n1_sel.selectedIndex].value; if (selPortletId != '') { addPortlet('1', selPortletId, 'n1'); };" class="portlet-form-button" type="button">]#1)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3229)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3219)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3235)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3254)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3309)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1652)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:1906)
[clickButton] 	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2923)
[clickButton] 	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
[clickButton] 	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
[clickButton] 	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:151)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
[clickButton] 	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:95)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:363)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:318)
[clickButton] 	... 54 more
[clickButton] Enclosed exception: 
[clickButton] org.mozilla.javascript.EcmaError: TypeError: addPortlet is not a function, it is null. (event for HtmlButtonInput[<input value="Add" onclick="var selPortletId = document.layout_n1_fm.add_n1_sel[document.layout_n1_fm.add_n1_sel.selectedIndex].value; if (selPortletId != '') { addPortlet('1', selPortletId, 'n1'); };" class="portlet-form-button" type="button">]#1)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3229)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3219)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3235)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3254)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3309)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1652)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:1906)
[clickButton] 	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2923)
[clickButton] 	at script(event for HtmlButtonInput[<input value="Add" onclick="var selPortletId = document.layout_n1_fm.add_n1_sel[document.layout_n1_fm.add_n1_sel.selectedIndex].value; if (selPortletId != '') { addPortlet('1', selPortletId, 'n1'); };" class="portlet-form-button" type="button">]:1)
[clickButton] 	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
[clickButton] 	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
[clickButton] 	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:151)
[clickButton] 	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
[clickButton] 	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.host.EventHandler.call(EventHandler.java:95)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:363)
[clickButton] 	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:318)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:736)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.HtmlPage.runEventHandler(HtmlPage.java:1489)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.HtmlPage.runEventHandler(HtmlPage.java:1465)
[clickButton] 	at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:103)
[clickButton] 	at com.canoo.webtest.steps.request.ClickButton.findTarget(ClickButton.java:160)
[clickButton] 	at com.canoo.webtest.steps.request.AbstractTargetAction$1.call(AbstractTargetAction.java:108)
[clickButton] 	at com.canoo.webtest.steps.request.TargetHelper.protectedGoto(TargetHelper.java:88)
[clickButton] 	at com.canoo.webtest.steps.request.AbstractTargetAction.gotoTarget(AbstractTargetAction.java:106)
[clickButton] 	at com.canoo.webtest.steps.request.AbstractTargetAction.doExecute(AbstractTargetAction.java:78)
[clickButton] 	at com.canoo.webtest.steps.Step.execute(Step.java:104)
[clickButton] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[clickButton] 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
[clickButton] 	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
[clickButton] 	at com.canoo.webtest.steps.Step.execute(Step.java:104)
[clickButton] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[clickButton] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:164)
[clickButton] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[clickButton] 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at org.apache.tools.ant.Target.execute(Target.java:357)
[clickButton] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
[clickButton] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[clickButton] 	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[clickButton] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[clickButton] 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
[clickButton] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[clickButton] 	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[clickButton] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[clickButton] 	at java.lang.reflect.Method.invoke(Method.java:597)
[clickButton] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[clickButton] 	at org.apache.tools.ant.Task.perform(Task.java:348)
[clickButton] 	at org.apache.tools.ant.Target.execute(Target.java:357)
[clickButton] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
[clickButton] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[clickButton] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[clickButton] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[clickButton] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[clickButton] 	at org.apache.tools.ant.Main.runBuild(Main.java:698)
[clickButton] 	at org.apache.tools.ant.Main.startAnt(Main.java:199)
[clickButton] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[clickButton] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[clickButton] == CALLING JAVASCRIPT ==
[clickButton] function () {
[clickButton] 	[native code, arity=0]
[clickButton] }
[clickButton] 
[clickButton] ======= EXCEPTION END ========
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira