This patch fixes clickLinkWithTextAfterText when links have different attributes. Please apply.

Mark

diff -ur jwebunit-1.2/src/net/sourceforge/jwebunit/HttpUnitDialog.java jwebunit-1.2-patch/src/net/sourceforge/jwebunit/HttpUnitDialog.java
--- jwebunit-1.2/src/net/sourceforge/jwebunit/HttpUnitDialog.java 2004-06-13 23:16:30.000000000 -0700
+++ jwebunit-1.2-patch/src/net/sourceforge/jwebunit/HttpUnitDialog.java 2004-11-18 17:35:00.912185844 -0800
@@ -725,7 +725,7 @@
for (int i = 0; i < foundAttributes.getLength(); i++) {
Attr foundAttribute = (Attr) foundAttributes.item(i);
Attr givenAttribute = (Attr) givenAttributes.getNamedItem(foundAttribute.getName());
- if (!foundAttribute.getValue().equals(givenAttribute.getValue())) {
+ if (givenAttribute == null || !foundAttribute.getValue().equals(givenAttribute.getValue())) {
return false;
}
}
diff -ur jwebunit-1.2/test/net/sourceforge/jwebunit/NavigationTest.java jwebunit-1.2-patch/test/net/sourceforge/jwebunit/NavigationTest.java
--- jwebunit-1.2/test/net/sourceforge/jwebunit/NavigationTest.java 2004-06-13 23:16:30.000000000 -0700
+++ jwebunit-1.2-patch/test/net/sourceforge/jwebunit/NavigationTest.java 2004-11-18 17:33:20.592315900 -0800
@@ -67,8 +67,8 @@


public void testClickLinkWithTextAfterText() {
defineWebPage("pageWithLink",
- "First: <a href=\"/targetPage1.html\">link text</a>\n" +
- "Second: <a href=\"/targetPage2.html\">link text</a>)\n");
+ "First: <a href=\"/targetPage1.html\" class=\"foo\">link text</a>\n" +
+ "Second: <a href=\"/targetPage2.html\" tabindex=\"1\">link text</a>)\n");
defineWebPage("targetPage1", "");
defineWebPage("targetPage2", "");




-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to