com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")

AppFuse JIRA | Ian Coleman | 1 decade ago
  1. 0

    I downloaded appfuse-1.8 from the current CVS HEAD, > > bash-2.05b$ cd <project_name> > bash-2.05b$ cd extras/spring > bash-2.05b$ ant install [modified properties files, etc...] > bash-2.05b$ cd ../../; ant setup When I run 'ant test-all' an exception is thrown when executing the test-canoo/EditUser target. <code> EditUser: BUILD FAILED /home/coleman/appfuse-cvs/momentum/build.xml:570: The following error occurred while executing this line: /home/coleman/appfuse-cvs/momentum/build.xml:543: The following error occurred while executing this line: /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:70: Test failed. Exception raised: com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke") at com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:399) </code> The exception is caused by a bug in the webtest_build574 packages. So I grabbed the latest version of webtest (781) and loaded that up. A couple of changes to properties files below. Then I got one final failure in JSP validation, which I fixed by adding a prepareDialogResponse tag in webtests.xml. >************************************************** >> Updating webtest libs (for JSP unit testing): >> >> o Downloaded webtest build 781 (the latest) >> >> o Updated <appfuse>/lib/lib.properties >> # >> # Canoo WebTest- http://webtest.canoo.com >> # >> webtest.version=build781 >> webtest.dir=${lib.dir}/webtest-${webtest.version} >> >> o Move jars to lib/webtest_build781/lib >> >> o Copy old lib/webtest_<oldbuild>/webtaskDefs.properties to >> lib/webtest_build781/ >> >> o Fix new path to StoreRegEx. [Was >> com.canoo.webtest.steps.StoreRegExMatch]: >> storeregex=com.canoo.webtest.steps.store.StoreRegExMatch >> storexpath=com.canoo.webtest.steps.store.StoreXPath >> >> ************************************************** >> Fixing final JSP validation error: >> >> o Append two taskdefs to >> lib/webtest_build781/webtestTaskdefs.properties: >> >> prepareDialogResponse=com.canoo.webtest.extension.PrepareDialogResponse >> >> verifyNoDialogResponses=com.canoo.webtest.extension.VerifyNoDialogResponses >> >> o Modify web-tests.xml so that the section @ line 150 reads: >> >> <!-- Delete user --> >> <invoke stepid="Click edit user link" >> >> url="/editUser.html?username=newuser&amp;from=list"/> >> <prepareDialogResponse stepid="Confirm deletion JS box" >> dialogType="confirm" >> saveProperty="confirmDialog"/> >> <clickbutton label="${button.delete}" stepid="Click >> button 'Delete'"/> >> <verifyNoDialogResponses stepid="No more confirm >> dialogs." /> >> >>

    AppFuse JIRA | 1 decade ago | Ian Coleman
    com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")
  2. 0

    I downloaded appfuse-1.8 from the current CVS HEAD, > > bash-2.05b$ cd <project_name> > bash-2.05b$ cd extras/spring > bash-2.05b$ ant install [modified properties files, etc...] > bash-2.05b$ cd ../../; ant setup When I run 'ant test-all' an exception is thrown when executing the test-canoo/EditUser target. <code> EditUser: BUILD FAILED /home/coleman/appfuse-cvs/momentum/build.xml:570: The following error occurred while executing this line: /home/coleman/appfuse-cvs/momentum/build.xml:543: The following error occurred while executing this line: /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:70: Test failed. Exception raised: com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke") at com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:399) </code> The exception is caused by a bug in the webtest_build574 packages. So I grabbed the latest version of webtest (781) and loaded that up. A couple of changes to properties files below. Then I got one final failure in JSP validation, which I fixed by adding a prepareDialogResponse tag in webtests.xml. >************************************************** >> Updating webtest libs (for JSP unit testing): >> >> o Downloaded webtest build 781 (the latest) >> >> o Updated <appfuse>/lib/lib.properties >> # >> # Canoo WebTest- http://webtest.canoo.com >> # >> webtest.version=build781 >> webtest.dir=${lib.dir}/webtest-${webtest.version} >> >> o Move jars to lib/webtest_build781/lib >> >> o Copy old lib/webtest_<oldbuild>/webtaskDefs.properties to >> lib/webtest_build781/ >> >> o Fix new path to StoreRegEx. [Was >> com.canoo.webtest.steps.StoreRegExMatch]: >> storeregex=com.canoo.webtest.steps.store.StoreRegExMatch >> storexpath=com.canoo.webtest.steps.store.StoreXPath >> >> ************************************************** >> Fixing final JSP validation error: >> >> o Append two taskdefs to >> lib/webtest_build781/webtestTaskdefs.properties: >> >> prepareDialogResponse=com.canoo.webtest.extension.PrepareDialogResponse >> >> verifyNoDialogResponses=com.canoo.webtest.extension.VerifyNoDialogResponses >> >> o Modify web-tests.xml so that the section @ line 150 reads: >> >> <!-- Delete user --> >> <invoke stepid="Click edit user link" >> >> url="/editUser.html?username=newuser&amp;from=list"/> >> <prepareDialogResponse stepid="Confirm deletion JS box" >> dialogType="confirm" >> saveProperty="confirmDialog"/> >> <clickbutton label="${button.delete}" stepid="Click >> button 'Delete'"/> >> <verifyNoDialogResponses stepid="No more confirm >> dialogs." /> >> >>

    AppFuse JIRA | 1 decade ago | Ian Coleman
    com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")
  3. 0

    [Webtest] Re: HTMLUnit

    canoo.com | 4 months ago
    com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: <BR>&gt; com.gargoylesoftware.htmlunit.ScriptException: Cannot convert null to an <BR>&gt; object., Step: ClickLink at <BR>&gt; C:\java\eplan\test\WebTest\SmokeTest\PlanAdminTourTest.xml:36: with <BR>&gt; (label="plan administration login", stepId="Click the Plan Administration Link", <BR>&gt; stepType="clicklink")
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.canoo.webtest.engine.StepExecutionException

      Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")com.canoo.webtest.engine.StepExecutionException: Unexpected exception caught: com.gargoylesoftware.htmlunit.ScriptException: Cannot read property "elements" from undefined, Step: InvokePage at /home/coleman/appfuse-cvs/momentum/test/web/web-tests.xml:74: with (stepId="click Edit Profile link", url="/editProfile.html", stepType="invoke")

      at com.canoo.webtest.steps.Step.handleUnexpectedException()
    2. com.canoo.webtest
      Step.handleUnexpectedException
      1. com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:399)
      1 frame