net.sourceforge.jwebunit.tests
Class FormAssertionsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.jwebunit.junit.WebTestCase
              extended by net.sourceforge.jwebunit.tests.JWebUnitAPITestCase
                  extended by net.sourceforge.jwebunit.tests.FormAssertionsTest
All Implemented Interfaces:
junit.framework.Test

public class FormAssertionsTest
extends JWebUnitAPITestCase


Field Summary
 
Fields inherited from class net.sourceforge.jwebunit.tests.JWebUnitAPITestCase
HOST_PATH, JETTY_PORT, JETTY_URL, NOARGS
 
Fields inherited from class net.sourceforge.jwebunit.junit.WebTestCase
customTester, tester
 
Constructor Summary
FormAssertionsTest()
           
 
Method Summary
 void setUp()
           
static junit.framework.Test suite()
           
 void testAssertButtonNotPresent()
           
 void testAssertButtonPresent()
           
 void testAssertButtonWithTextPresent()
           
 void testAssertFormElementEquals()
           
 void testAssertFormParameterNotPresent()
           
 void testAssertFormParameterPresent()
           
 void testAssertFormPresent()
           
 void testAssertFormPresentByName()
           
 void testAssertRadioOptionNotPresent()
           
 void testAssertRadioOptionNotSelected()
           
 void testAssertRadioOptionPresent()
           
 void testAssertRadioOptionSelected()
           
 void testAssertResetButtonNotPresent()
           
 void testAssertResetButtonPresent()
           
 void testAssertSelectedOptionEquals()
           
 void testAssertSelectedOptionValueEquals()
           
 void testAssertSelectOptionNotPresent()
           
 void testAssertSelectOptionPresent()
           
 void testAssertSelectOptionsEqual()
           
 void testAssertSelectOptionsNotEqual()
           
 void testAssertSelectOptionValueNotPresent()
           
 void testAssertSelectOptionValuePresent()
           
 void testAssertSelectOptionValuesEqual()
           
 void testAssertSelectOptionValuesNotEqual()
           
 void testAssertSubmitButtonNotPresent()
           
 void testAssertSubmitButtonPresent()
           
 void testAssertSubmitButtonValue()
           
 void testCheckboxNotSelected()
           
 void testCheckboxNotSelectedByName()
           
 void testCheckboxSelected()
           
 void testCheckboxSelectedByName()
           
 void testComplicatedElementNames()
          Test elements with complicated names.
 void testIssue1996193()
          Testing for issue 1996193: clickRadioOption does not work as expected
 void testLabeledEmptyElement()
          Even though the element has no value set (i.e.
 void testLabels()
          tests for label elements
 void testSetLabels()
          Test setting elements retrieved through labels
 
Methods inherited from class net.sourceforge.jwebunit.tests.JWebUnitAPITestCase
assertException, assertFail, assertFail, assertPass, assertPass, assertPassFail, assertPassFail
 
Methods inherited from class net.sourceforge.jwebunit.junit.WebTestCase
assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCommentNotPresent, assertCommentPresent, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHeaderEquals, assertHeaderMatches, assertHeaderNotPresent, assertHeaderPresent, assertHiddenFieldPresent, assertImagePresent, assertImagePresentPartial, assertImageValid, assertImageValidAndStore, assertKeyInTable, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeysInTable, assertKeysInTable, assertLabeledFieldEquals, assertLabelMatches, assertLabelPresent, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatch, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertNotMatch, assertNotMatch, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertResponseCode, assertResponseCodeBetween, assertSelectedOptionEquals, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertSelectOptionValuesPresent, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleEqualsKey, assertTitleEqualsKey, assertTitleMatch, assertTitleNotSame, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getAllHeaders, getComments, getDialog, getElementAttributByXPath, getElementAttributeByXPath, getElementById, getElementByXPath, getElementsByXPath, getElementTextByXPath, getFieldsForLabel, getFormElementValue, getHeader, getImage, getLabeledFieldValue, getMessage, getMessage, getPageSource, getServerResponse, getServeurResponse, getTable, getTestContext, getTester, getTestingEngine, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOption, selectOptionByValue, selectOptionByValue, selectOptions, selectOptions, selectOptionsByValues, selectOptionsByValues, setBaseUrl, setBaseUrl, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setHiddenField, setIgnoreFailingStatusCodes, setLabeledFormElementField, setScriptingEnabled, setTestContext, setTestingEngineKey, setTextField, setTimeout, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, tearDown, uncheckCheckbox, uncheckCheckbox
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormAssertionsTest

public FormAssertionsTest()
Method Detail

suite

public static junit.framework.Test suite()

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class JWebUnitAPITestCase
Throws:
java.lang.Exception

testAssertButtonWithTextPresent

public void testAssertButtonWithTextPresent()

testAssertFormParameterPresent

public void testAssertFormParameterPresent()
                                    throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertFormParameterNotPresent

public void testAssertFormParameterNotPresent()
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertFormPresent

public void testAssertFormPresent()
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertFormPresentByName

public void testAssertFormPresentByName()
                                 throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertFormElementEquals

public void testAssertFormElementEquals()
                                 throws java.lang.Throwable
Throws:
java.lang.Throwable

testCheckboxSelected

public void testCheckboxSelected()
                          throws java.lang.Throwable
Throws:
java.lang.Throwable

testCheckboxSelectedByName

public void testCheckboxSelectedByName()
                                throws java.lang.Throwable
Throws:
java.lang.Throwable

testCheckboxNotSelected

public void testCheckboxNotSelected()
                             throws java.lang.Throwable
Throws:
java.lang.Throwable

testCheckboxNotSelectedByName

public void testCheckboxNotSelectedByName()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSubmitButtonPresent

public void testAssertSubmitButtonPresent()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSubmitButtonNotPresent

public void testAssertSubmitButtonNotPresent()
                                      throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSubmitButtonValue

public void testAssertSubmitButtonValue()
                                 throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertResetButtonPresent

public void testAssertResetButtonPresent()
                                  throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertResetButtonNotPresent

public void testAssertResetButtonNotPresent()
                                     throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertRadioOptionPresent

public void testAssertRadioOptionPresent()
                                  throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertRadioOptionNotPresent

public void testAssertRadioOptionNotPresent()
                                     throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertRadioOptionSelected

public void testAssertRadioOptionSelected()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertRadioOptionNotSelected

public void testAssertRadioOptionNotSelected()
                                      throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionPresent

public void testAssertSelectOptionPresent()
                                   throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionNotPresent

public void testAssertSelectOptionNotPresent()
                                      throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionValuePresent

public void testAssertSelectOptionValuePresent()
                                        throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionValueNotPresent

public void testAssertSelectOptionValueNotPresent()
                                           throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionsEqual

public void testAssertSelectOptionsEqual()
                                  throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionsNotEqual

public void testAssertSelectOptionsNotEqual()
                                     throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionValuesEqual

public void testAssertSelectOptionValuesEqual()
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectOptionValuesNotEqual

public void testAssertSelectOptionValuesNotEqual()
                                          throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectedOptionEquals

public void testAssertSelectedOptionEquals()
                                    throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertSelectedOptionValueEquals

public void testAssertSelectedOptionValueEquals()
                                         throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertButtonPresent

public void testAssertButtonPresent()
                             throws java.lang.Throwable
Throws:
java.lang.Throwable

testAssertButtonNotPresent

public void testAssertButtonNotPresent()
                                throws java.lang.Throwable
Throws:
java.lang.Throwable

testComplicatedElementNames

public void testComplicatedElementNames()
Test elements with complicated names.


testIssue1996193

public void testIssue1996193()
Testing for issue 1996193: clickRadioOption does not work as expected


testLabels

public void testLabels()
tests for label elements


testSetLabels

public void testSetLabels()
Test setting elements retrieved through labels


testLabeledEmptyElement

public void testLabeledEmptyElement()
Even though the element has no value set (i.e. getAttribute("value") == null), it should still qualify as equal to an empty string.



Copyright © 2002-2011 SourceForge. All Rights Reserved.