Revision: 585
          http://svn.sourceforge.net/jwebunit/?rev=585&view=rev
Author:   henryju
Date:     2006-10-17 05:46:18 -0700 (Tue, 17 Oct 2006)

Log Message:
-----------
Refactor IJWebUnitDialog interface (much smaller).
Continue refactoring of unit tests.
PART 4 (due to sourceforge bug).

Modified Paths:
--------------
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlElementLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlOptionLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ExceptionWrapper.java

Added Paths:
-----------
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertNotSelectedException.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertSelectedException.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocatorByText.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlButtonLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocator.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocatorByName.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/TextFieldHtmlElementLocator.java

Removed Paths:
-------------
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/UnableToSetFormException.java
    
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ListTesterAsserts.java

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertNotSelectedException.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertNotSelectedException.java
                                (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertNotSelectedException.java
        2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.exception;
+
+import net.sourceforge.jwebunit.locator.Locator;
+
+/**
+ * This exception should be used when an element is not selected.
+ * @author Julien Henry ([EMAIL PROTECTED])
+ * 
+ */
[EMAIL PROTECTED]("serial")
+public class AssertNotSelectedException extends JWebUnitException {
+    
+    private Locator elementNotSelected;
+   
+    /**
+     * @return Returns the elementNotSelected.
+     */
+    public Locator getElementNotSelected() {
+        return elementNotSelected;
+    }
+
+    public AssertNotSelectedException(String msg) {
+        super(msg);
+    }
+
+    public AssertNotSelectedException(String msg, Exception cause) {
+        super(msg, cause);
+    }
+    
+    public AssertNotSelectedException(Locator elementNotSelected) {
+        super();
+        this.elementNotSelected=elementNotSelected;        
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertSelectedException.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertSelectedException.java
                           (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/AssertSelectedException.java
   2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.exception;
+
+import net.sourceforge.jwebunit.locator.Locator;
+
+/**
+ * This exception should be used when an element is selected.
+ * @author Julien Henry ([EMAIL PROTECTED])
+ * 
+ */
[EMAIL PROTECTED]("serial")
+public class AssertSelectedException extends JWebUnitException {
+    
+    private Locator elementSelected;
+   
+    /**
+     * @return Returns the elementSelected.
+     */
+    public Locator getElementSelected() {
+        return elementSelected;
+    }
+
+    public AssertSelectedException(String msg) {
+        super(msg);
+    }
+
+    public AssertSelectedException(String msg, Exception cause) {
+        super(msg, cause);
+    }
+    
+    public AssertSelectedException(Locator elementSelected) {
+        super();
+        this.elementSelected=elementSelected;        
+    }
+
+}

Deleted: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/UnableToSetFormException.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/UnableToSetFormException.java
  2006-10-17 12:45:24 UTC (rev 584)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/exception/UnableToSetFormException.java
  2006-10-17 12:46:18 UTC (rev 585)
@@ -1,23 +0,0 @@
-/******************************************************************************
- * jWebUnit project (http://jwebunit.sourceforge.net)                         *
- * Distributed open-source, see full license under LICENCE.txt                *
- 
******************************************************************************/
-package net.sourceforge.jwebunit.exception;
-
-import junit.framework.AssertionFailedError;
-
-/**
- * Represents a problem establishing a form on the current response for
- * which a request is to be built.
- *
- * @author Wilkes Joiner
- */
[EMAIL PROTECTED]("serial")
-public class UnableToSetFormException extends AssertionFailedError {
-    public UnableToSetFormException() {
-    }
-
-    public UnableToSetFormException(String s) {
-        super(s);
-    }
-}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocator.java
                           (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocator.java
   2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,26 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * An anchor locator is a way to locate a <a> element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlAnchorLocator extends ClickableHtmlElementLocator {
+    
+    public HtmlAnchorLocator() {
+        super("a");
+    }
+
+    public HtmlAnchorLocator(String id) {
+        super("a", id);
+    }
+
+    public HtmlAnchorLocator(int index) {
+        super("a");
+        setIndex(index);
+    }
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocatorByText.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocatorByText.java
                             (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlAnchorLocatorByText.java
     2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,24 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * An anchor text locator is a way to locate a <a> element in a page by 
its text.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlAnchorLocatorByText extends HtmlAnchorLocator {
+    
+    public HtmlAnchorLocatorByText(String text) {
+        super();
+        setText(text);
+    }
+
+    public HtmlAnchorLocatorByText(String text, int index) {
+        super(index);
+        setText(text);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlButtonLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlButtonLocatorByName.java
                             (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlButtonLocatorByName.java
     2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,30 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * This is the class for locating html buttons by name.
+ * A Html button corresponds to <button> element
+ * in an HTML page.
+ * 
+ * @see HtmlSubmitInputByName
+ * @see HtmlButtonInputByName
+ * @see HtmlResetInputByName
+ * 
+ * @author Julien Henry
+ */
+
+public class HtmlButtonLocatorByName extends HtmlButtonLocator {
+
+    public HtmlButtonLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+    public HtmlButtonLocatorByName(String name, int index) {
+        super(index);
+        addAttribut("name", name);
+    }
+}

Modified: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlElementLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlElementLocator.java
  2006-10-17 12:45:24 UTC (rev 584)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlElementLocator.java
  2006-10-17 12:46:18 UTC (rev 585)
@@ -28,6 +28,25 @@
     private List<HtmlElementAttribut> attributs = new 
LinkedList<HtmlElementAttribut>();
     
     /**
+     * Text representation of the childs of this node.
+     */
+    private String text;
+    
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * @param text the text to set
+     */
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    /**
      * @return Returns the index.
      */
     public int getIndex() {

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocator.java
                                (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocator.java
        2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+import net.sourceforge.jwebunit.IJWebUnitDialog;
+import net.sourceforge.jwebunit.exception.ElementNotFoundException;
+
+/**
+ * A file input locator is a way to locate a &lt;input type="file"&gt;
+ * element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlFileInputLocator extends TextFieldHtmlElementLocator {
+
+    public HtmlFileInputLocator() {
+        super("input");
+        addAttribut("type", "file");
+    }
+
+    public void setTextField(IJWebUnitDialog dialog, String value)
+            throws ElementNotFoundException {
+        dialog.setAttributeValue(this, "value", value);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocatorByName.java
                          (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlFileInputLocatorByName.java
  2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A file input locator is a way to locate a &lt;input type="file"&gt;
+ * element in a page by its name attribut.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlFileInputLocatorByName extends HtmlFileInputLocator {
+
+    public HtmlFileInputLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocator.java
                              (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocator.java
      2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,19 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A input locator is a way to locate a &lt;input&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlHiddenInputLocator extends HtmlElementLocator {
+    
+    public HtmlHiddenInputLocator() {
+        super("input");
+        addAttribut("type", "hidden");
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocatorByName.java
                                (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlHiddenInputLocatorByName.java
        2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,19 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A input locator is a way to locate a &lt;input&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlHiddenInputLocatorByName extends HtmlHiddenInputLocator {
+    
+    public HtmlHiddenInputLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlInputLocator.java
                            (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlInputLocator.java
    2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,22 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A input locator is a way to locate a &lt;input&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlInputLocator extends HtmlElementLocator {
+    
+    public HtmlInputLocator() {
+        super("input");
+    }
+
+    public HtmlInputLocator(String id) {
+        super("input", id);
+    }
+
+}

Modified: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlOptionLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlOptionLocator.java
   2006-10-17 12:45:24 UTC (rev 584)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlOptionLocator.java
   2006-10-17 12:46:18 UTC (rev 585)
@@ -29,4 +29,8 @@
         this.parentSelect=parentSelect;
         setIndex(index);
     }
+    
+    public HtmlSelectLocator getSelect() {
+        return parentSelect;
+    }
 }

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocator.java
                            (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocator.java
    2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,28 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+import net.sourceforge.jwebunit.IJWebUnitDialog;
+import net.sourceforge.jwebunit.exception.ElementNotFoundException;
+
+/**
+ * A password input locator is a way to locate a &lt;input type="password"&gt;
+ * element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlPasswordInputLocator extends TextFieldHtmlElementLocator {
+
+    public HtmlPasswordInputLocator() {
+        super("input");
+        addAttribut("type", "password");
+    }
+
+    public void setTextField(IJWebUnitDialog dialog, String value)
+            throws ElementNotFoundException {
+        dialog.setAttributeValue(this, "value", value);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocatorByName.java
                              (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlPasswordInputLocatorByName.java
      2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A password input locator is a way to locate a &lt;input type="password"&gt;
+ * element in a page by its name attribut.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlPasswordInputLocatorByName extends HtmlPasswordInputLocator {
+
+    public HtmlPasswordInputLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocator.java
                               (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocator.java
       2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,21 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A reset input locator is a way to locate a &lt;input type="reset"&gt;
+ * element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlResetInputLocator extends ClickableHtmlElementLocator {
+
+    public HtmlResetInputLocator() {
+        super("input");
+        addAttribut("type", "reset");
+    }
+
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocatorByName.java
                         (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlResetInputLocatorByName.java
 2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A reset input locator is a way to locate a &lt;input type="reset"&gt;
+ * element in a page by its name attribut.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlResetInputLocatorByName extends HtmlResetInputLocator {
+
+    public HtmlResetInputLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocator.java
                              (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocator.java
      2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,21 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A submit input locator is a way to locate a &lt;input type="submit"&gt;
+ * element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlSubmitInputLocator extends ClickableHtmlElementLocator {
+
+    public HtmlSubmitInputLocator() {
+        super("input");
+        addAttribut("type", "submit");
+    }
+
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocatorByName.java
                                (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlSubmitInputLocatorByName.java
        2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A submit input locator is a way to locate a &lt;input type="submit"&gt;
+ * element in a page by its name attribut.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlSubmitInputLocatorByName extends HtmlSubmitInputLocator {
+
+    public HtmlSubmitInputLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocator.java
                         (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocator.java
 2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,25 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+import net.sourceforge.jwebunit.IJWebUnitDialog;
+import net.sourceforge.jwebunit.exception.ElementNotFoundException;
+
+/**
+ * A textarea locator is a way to locate a &lt;textarea&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlTextAreaLocator extends TextFieldHtmlElementLocator {
+    
+    public HtmlTextAreaLocator() {
+        super("textarea");
+    }
+    
+    public void setTextField(IJWebUnitDialog dialog, String value) throws 
ElementNotFoundException {
+        dialog.setTextArea(this, value);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocatorByName.java
                           (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextAreaLocatorByName.java
   2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,19 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A textarea locator is a way to locate a &lt;textarea&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlTextAreaLocatorByName extends HtmlTextAreaLocator {
+    
+    public HtmlTextAreaLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocator.java
                                (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocator.java
        2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+import net.sourceforge.jwebunit.IJWebUnitDialog;
+import net.sourceforge.jwebunit.exception.ElementNotFoundException;
+
+/**
+ * A input locator is a way to locate a &lt;input&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlTextInputLocator extends TextFieldHtmlElementLocator {
+    
+    public HtmlTextInputLocator() {
+        super("input");
+        addAttribut("type", "text");
+    }
+    
+    public void setTextField(IJWebUnitDialog dialog, String value) throws 
ElementNotFoundException {
+        dialog.setAttributeValue(this, "value", value);
+    }
+
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocatorByName.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocatorByName.java
                          (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/HtmlTextInputLocatorByName.java
  2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,19 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+/**
+ * A input locator is a way to locate a &lt;input&gt; element in a page.
+ * 
+ * @author Julien Henry
+ */
+public class HtmlTextInputLocatorByName extends HtmlTextInputLocator {
+    
+    public HtmlTextInputLocatorByName(String name) {
+        super();
+        addAttribut("name", name);
+    }
+
+}

Added: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/TextFieldHtmlElementLocator.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/TextFieldHtmlElementLocator.java
                         (rev 0)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/locator/TextFieldHtmlElementLocator.java
 2006-10-17 12:46:18 UTC (rev 585)
@@ -0,0 +1,27 @@
+/******************************************************************************
+ * jWebUnit project (http://jwebunit.sourceforge.net)                         *
+ * Distributed open-source, see full license under LICENCE.txt                *
+ 
******************************************************************************/
+package net.sourceforge.jwebunit.locator;
+
+import net.sourceforge.jwebunit.IJWebUnitDialog;
+import net.sourceforge.jwebunit.exception.ElementNotFoundException;
+
+/**
+ * This is the type for all text field html elements.
+ * 
+ * @author Julien Henry
+ */
+public abstract class TextFieldHtmlElementLocator extends HtmlElementLocator {
+    
+    public TextFieldHtmlElementLocator(String tag) {
+        super(tag);
+    }
+    
+    public TextFieldHtmlElementLocator(String tag, String id) {
+        super(tag, id);
+    }
+    
+    public abstract void setTextField(IJWebUnitDialog dialog, String value) 
throws ElementNotFoundException;
+    
+}

Modified: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ExceptionWrapper.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ExceptionWrapper.java
       2006-10-17 12:45:24 UTC (rev 584)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ExceptionWrapper.java
       2006-10-17 12:46:18 UTC (rev 585)
@@ -13,6 +13,7 @@
  * Time: 2:05:07 PM
  */
 
[EMAIL PROTECTED]("serial")
 public class ExceptionWrapper extends RuntimeException {
     private Throwable thrown;
 

Deleted: 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ListTesterAsserts.java
===================================================================
--- 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ListTesterAsserts.java
      2006-10-17 12:45:24 UTC (rev 584)
+++ 
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/util/ListTesterAsserts.java
      2006-10-17 12:46:18 UTC (rev 585)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * jWebUnit project (http://jwebunit.sourceforge.net)                         *
- * Distributed open-source, see full license under LICENCE.txt                *
- 
******************************************************************************/
-package net.sourceforge.jwebunit.util;
-
-import net.sourceforge.jwebunit.WebTester;
-
-import java.lang.reflect.Method;
-
-public class ListTesterAsserts {
-    public static void main(String[] args) {
-        Method[] methods = WebTester.class.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-            if (method.getName().startsWith("assert")) {
-                Class[] argTypes = method.getParameterTypes();
-                String classes = "(";
-                for (int j = 0; j < argTypes.length; j++) {
-                    Class argType = argTypes[j];
-                    classes += argType.getName();
-                    if (j != argTypes.length - 1) {
-                        classes += ", ";
-                    }
-                }
-                classes += ")";
-                System.out.println(method.getName() + classes);
-            }
-        }
-    }
-}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to