Menu

Problem with ie-click-link

Help
wanted
2008-06-02
2013-04-25
  • wanted

    wanted - 2008-06-02

    Hello.
    I have a link called 'close' which calls a javascript function on a pop-up window which closes the pop-up window opened. The pop-up window closes but throws a NullPointerException.
    wat should i do.

    thanks

     
    • wanted

      wanted - 2008-06-02

      here is the code..

      (i)open.htm

      <html>
      <head><head>
      <body>
          <a href="close.htm" target="_blank">open</a>
      </body>
      </html>
      <!-- ************************************************** -->

      (ii)close.htm

      <html>
      <head>
      <script>
      function closeWin()
      {
          window.close()
      }
      </script>
      <head>
      <body>
          <a onClick="closeWin()">close</a>
      </body>
      </html>

      <!-- ************************************************** -->

      (iii)close.xml

       
      • Christian Hargraves

        You could always just pass in 'expectException="true"' to the tag that is failing if that is the desired behavior. I think I can into this with the Jiffie plug-in a while back and that fixed it.

         
    • wanted

      wanted - 2008-06-02

      (iii)close.xml

      <jm:testcase xmlns:jm="jelly:jameleon">
      <jm:ie-session baseUrl="D:\Jam-tests\open.htm" beginSession="true" sessionDelay="1000">
      <jm:ie-click-link
          functionId="click open"
          link="open"
          functionDelay="5000"
      />

      <jm:ie-click-link
          functionId="click close"
          link="close"
          functionDelay="5000"
      />
      </jm:ie-session>
      </jm:testcase>

      After click close is executed i get the following error..
      java.lang.NullPointerException
          at com.tapsterrock.jiffie.IDispatch.getBooleanProperty(IDispatch.java:159)
          at com.tapsterrock.jiffie.InternetExplorer.getBusy(InternetExplorer.java:352)
          at com.tapsterrock.jiffie.InternetExplorer.waitWhileBusy(InternetExplorer.java:398)
          at com.tapsterrock.jiffie.IHTMLElement.click(IHTMLElement.java:59)
          at net.sf.jameleon.plugin.jiffie.IEFunctionTag.executeClickLink(IEFunctionTag.java:2819)
          at net.sf.jameleon.plugin.jiffie.IEFunctionTag.clickLink(IEFunctionTag.java:1700)
          at net.sf.jameleon.plugin.jiffie.tags.IEClickLinkTag.testBlock(IEClickLinkTag.java:89)
          at net.sf.jameleon.function.FunctionTag.doTag(FunctionTag.java:261)
          at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
          at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
          at net.sf.jameleon.SessionTag.doTag(SessionTag.java:189)
          at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
          at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
          at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
          at net.sf.jameleon.TestCaseTag.invokeChildren(TestCaseTag.java:658)
          at net.sf.jameleon.TestCaseTag$1.run(TestCaseTag.java:868)
          at net.sf.jameleon.TestCaseTag.executeBody(TestCaseTag.java:929)
          at net.sf.jameleon.TestCaseTag.executeNoCSV(TestCaseTag.java:866)
          at net.sf.jameleon.TestCaseTag.doTag(TestCaseTag.java:815)
          at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
          at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:706)
          at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:670)
          at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:579)
          at net.sf.jameleon.ExecuteTestCase.runScript(ExecuteTestCase.java:271)
          at net.sf.jameleon.ui.TestCasePane$ExecuteButtonAction$2.run(TestCasePane.java:293)

       
      • Christian Hargraves

        I think the problem might be due the fact that Jiffie is waiting for a response from the click action, but one isn't given and the window it was listening to is now gone. You might also be able to set "WAIT='false'" http://jameleon.sourceforge.net/jiffie-plugin/syntax-reference.html#ie-click-link

         
    • wanted

      wanted - 2008-06-02

      thanks a lot christian.. it worked

       
      • Christian Hargraves

        Which one work? setting WAIT='false' or expectException='true'?

         
    • wanted

      wanted - 2008-06-03

      setting WAIT='false'

       

Log in to post a comment.