Jiffie: Java InterFace For Internet Explorer

net.sf.jiffie
Class IHTMLAnchorElementTest

Package class diagram package IHTMLAnchorElementTest
java.lang.Object
  extended by TestCase
      extended by net.sf.jiffie.JiffieTestCase
          extended by net.sf.jiffie.JiffieDataDirTest
              extended by net.sf.jiffie.IHTMLAnchorElementTest

public class IHTMLAnchorElementTest
extends JiffieDataDirTest

Tests to exercise the functionality implemented in the IHTMLAnchorElement class. Note that for some of these tests to complete successfully, you will need to set the Internet Explorer security option "Allow Web Sites to prompt for information using scripted windows"


Field Summary
 
Fields inherited from class net.sf.jiffie.JiffieDataDirTest
m_datadir
 
Fields inherited from class net.sf.jiffie.JiffieTestCase
m_explorer
 
Constructor Summary
IHTMLAnchorElementTest()
           
 
Method Summary
 void testAnchors()
          Exercise IHTMLAnchorElement functionality.
 void testModalDialog()
          This test demonstrates how a modal dialog can be managed.
 void testModelessDialog()
          This test illustrates how modeless dialogs are managed.
 
Methods inherited from class net.sf.jiffie.JiffieDataDirTest
setUp
 
Methods inherited from class net.sf.jiffie.JiffieTestCase
assertFalse, assertNull, assertTrue, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IHTMLAnchorElementTest

public IHTMLAnchorElementTest()
Method Detail

testAnchors

public void testAnchors()
                 throws java.lang.Exception
Exercise IHTMLAnchorElement functionality.

Throws:
java.lang.Exception

testModalDialog

public void testModalDialog()
                     throws java.lang.Exception
This test demonstrates how a modal dialog can be managed. In order for this to work, the dialog needs to pass a reference to the document it contains back to the document in the browser that opened the dialog. Jiffie can then retrieve this reference and work with the document in the dialog window. Unfortunately this means that if you don't have the ability to change the web pages you want to test to add this kind of code, modal dialogs will remain out of bounds for Jiffie. The files anchor.htm and dialogtarget.htm show how this technique works using an onload function on the dialog document, and a div in anchor.htm which receives a reference to the dialog's document as an attribute.

Throws:
java.lang.Exception

testModelessDialog

public void testModelessDialog()
                        throws java.lang.Exception
This test illustrates how modeless dialogs are managed. The only difference between this case abd the previous test is that the anchor which launches the dialog does not block when clicked.

Throws:
java.lang.Exception


Copyright © 2004-2009 Packwood Software. All Rights Reserved.