Menu

How to click button on modal dialog

Help
wanted
2008-07-01
2013-04-25
  • wanted

    wanted - 2008-07-01

    Hello.
    I have a code that when we click a button, it opens a Modal dialog.
    On that Modal dialog there is a button.
    The problem is that I am not able to click that button.

    I am getting the following error..
    java.lang.RuntimeException: There is no working form set!

    Here is the code..

    AlertWindow.htm
    ***************

    <html>
    <head>
    <title>Alert Window</title>
    </head>
    <body>
        <form name="alertForm">

        <input type="text" name="txt1">

            <input type="submit" value="show modal dialog" name="submitButton"
    onclick="window.showModalDialog('test.htm');">

        </form>
    </body>
    </html>

    test.htm
    ********

    <html>
    <head></head>

    <body>

    <form name="f">
        <input type="button" value="  Test  " name="testBtn">
    </form>

    </body>
    </html>

    Jameleon Script..

    Modal.xml
    *********

    <jm:testcase xmlns:jm="jelly:jameleon">
    <jm:test-case-summary></jm:test-case-summary>
    <jm:test-case-author></jm:test-case-author>
    <jm:test-case-level>UNIT</jm:test-case-level>
    <jm:test-case-bug>001</jm:test-case-bug>
    <jm:test-case-requirement>REQ001</jm:test-case-requirement>
    <jm:functional-point-tested>Feature A</jm:functional-point-tested>
    <jm:application-tested>MyTestApplication</jm:application-tested>

    <jm:ie-session baseUrl="D:/Jam-tests/AlertWindow.htm" beginSession="true" sessionDelay="1000">

        <jm:ie-click-button
            functionId="Click modal dialog button"
            value="show modal dialog"
            form="alertForm"
            eventToFire="onClick"
            functionDelay="2000"
        />

        <jm:ie-click-button
            functionId="Click Test"
            value="  Test  "
            form="f"
            eventToFire="onClick"
            functionDelay="2000"
        />

    </jm:ie-session>

    </jm:testcase>
    *****************************************************

    So how to click the button the modal dialog..
    Thanks

     
    • Christian Hargraves

      Modal dialogs in Jiffie seem to be a bit of a trick to get working. there is no plug-in specific for the Jiffie plug-in. Try going to the Jiffie Project's mailing list and searching for modal dialogs. You should find a simple description and a reference to some sample code in their CVS repo.

       

Log in to post a comment.