Update of /cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3131/test/net/sourceforge/jwebunit
Added Files:
HtmlParsingTest.java
Log Message:
Added test for different types of html.
Also isolated some odd behaviour in HttpUnit, where a single submit button can
not be idenfied. The line that would fail is commented out.
--- NEW FILE: HtmlParsingTest.java ---
/* Copyright 2005 Optime data Sweden
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.sourceforge.jwebunit;
import junit.framework.Test;
import junit.framework.TestSuite;
import net.sourceforge.jwebunit.util.JettySetup;
/**
* Tests the use of HttpUnit and the types of html documents accepted.
*/
public class HtmlParsingTest extends JWebUnitAPITestCase {
// URL: getDialog().getWebClient().getCurrentPage().getText()
public static Test suite() {
Test suite = new TestSuite(HtmlParsingTest.class);
return new JettySetup(suite);
}
public void setUp() throws Exception {
super.setUp();
getTestContext().setBaseUrl(HOST_PATH + "/HtmlTest/");
}
public void testSimpleForm() {
beginAt("SimpleForm.html");
assertFormPresent();
submit();
}
public void testInvalidForm() {
beginAt("InvalidForm.html");
assertFormPresent();
submit();
}
public void testInvalidFormNoDoctype() {
beginAt("InvalidFormNoDoctype.html");
assertFormPresent();
submit();
}
public void testValidComplexForm() {
beginAt("ValidComplexForm.html");
assertFormPresent();
submit();
}
public void testValidFormNoDoctype() {
beginAt("ValidFormNoDoctype.html");
assertFormPresent();
// TODO looks like HttpUnit can not find the single submit button in
all kinds of pages
//submit();
}
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development