From: <asa...@us...> - 2012-12-11 09:57:55
|
Revision: 7852 http://sourceforge.net/p/htmlunit/code/7852 Author: asashour Date: 2012-12-11 09:44:23 +0000 (Tue, 11 Dec 2012) Log Message: ----------- HtmlElement: deprecate getElementById() and hasHtmlElementWithId(). Modified Paths: -------------- trunk/htmlunit/src/changes/changes.xml trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFormTest.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java Modified: trunk/htmlunit/src/changes/changes.xml =================================================================== --- trunk/htmlunit/src/changes/changes.xml 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/changes/changes.xml 2012-12-11 09:44:23 UTC (rev 7852) @@ -9,6 +9,9 @@ <body> <release version="2.12" date="???" description="Bugfixes"> <action type="update" dev="asashour"> + HtmlElement: deprecate getElementById() and hasHtmlElementWithId(). + </action> + <action type="update" dev="asashour"> BrowserVersion: deprecate INTERNET_EXPLORER_6, INTERNET_EXPLORER_7, FIREFOX_10, CHROME_16, and make INTERNET_EXPLORER_8 the default one. Add INTERNET_EXPLORER_9, FIREFOX_17 and CHROME. Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlElement.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -649,7 +649,9 @@ * @param <E> the sub-element type * @return the element in this element's page with the specified ID * @exception ElementNotFoundException if no element has the specified ID + * @deprecated as of 2.12, please use {@link HtmlPage#getHtmlElementById(String)} */ + @Deprecated @SuppressWarnings("unchecked") public <E extends HtmlElement> E getElementById(final String id) throws ElementNotFoundException { return (E) ((HtmlPage) getPage()).getHtmlElementById(id); @@ -672,7 +674,9 @@ * * @param id the id to search for * @return <tt>true</tt> if there is an element in this element's page with the specified ID + * @deprecated as of 2.12, please use {@link HtmlPage#getElementById(String)} */ + @Deprecated public boolean hasHtmlElementWithId(final String id) { try { getElementById(id); Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlLabel.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -128,7 +128,7 @@ final String elementId = getForAttribute(); if (!ATTRIBUTE_NOT_DEFINED.equals(elementId)) { try { - return getElementById(elementId); + return ((HtmlPage) getPage()).getHtmlElementById(elementId); } catch (final ElementNotFoundException e) { return null; Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DisabledElementTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -125,7 +125,7 @@ final HtmlPage page = loadPage(BrowserVersion.FIREFOX_3_6, htmlContent, collectedAlerts); final HtmlForm form = page.getHtmlElementById("form1"); - final DisabledElement element = (DisabledElement) form.getElementById("element1"); + final DisabledElement element = (DisabledElement) page.getHtmlElementById("element1"); assertEquals(expectedIsDisabled, element.isDisabled()); } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomNodeTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -52,7 +52,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); Assert.assertTrue("Element should have attribute", node.hasAttributes()); } @@ -65,7 +65,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode parent = node.getParentNode(); Assert.assertFalse("Element should not have attribute", parent.hasAttributes()); } @@ -79,7 +79,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode child = node.getFirstChild(); Assert.assertFalse("Text should not have attribute", child.hasAttributes()); } @@ -93,7 +93,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode child = node.getFirstChild(); Assert.assertEquals("Text should not have a prefix", null, child.getPrefix()); } @@ -107,7 +107,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode child = node.getFirstChild(); Assert.assertEquals("Text should not have a prefix", null, child.getNamespaceURI()); } @@ -121,7 +121,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode child = node.getFirstChild(); Assert.assertEquals("Text should not have a prefix", null, child.getLocalName()); } @@ -135,7 +135,7 @@ final String content = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode child = node.getFirstChild(); child.setPrefix("bar"); // This does nothing. Assert.assertEquals("Text should not have a prefix", null, child.getPrefix()); @@ -154,7 +154,7 @@ + "</table></p></body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); node.removeAllChildren(); Assert.assertEquals("Did not remove all nodes", null, node.getFirstChild()); } @@ -169,7 +169,7 @@ + "<br><div id='tag'></div><br><div id='tag2'/></body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode previousSibling = node.getPreviousSibling(); final DomNode nextSibling = node.getNextSibling(); @@ -208,7 +208,7 @@ + "<br><div id='tag'/></body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final AttributesImpl attributes = new AttributesImpl(); attributes.addAttribute(null, "id", "id", null, "newElt"); @@ -247,7 +247,7 @@ + "<br><div><div id='tag'></div></div><br></body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode parent = node.getParentNode(); @@ -277,7 +277,7 @@ + "<br><div id='tag'></div><br></body></html>"; final HtmlPage page = loadPage(content); - final DomNode node = page.getDocumentElement().getElementById("tag"); + final DomNode node = page.getElementById("tag"); final DomNode previousSibling = node.getPreviousSibling(); final DomNode nextSibling = node.getNextSibling(); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/DomTextTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -183,7 +183,7 @@ + "<br><div id='tag'></div><br></body></html>"; final HtmlPage page = loadPage(html); - final DomNode divNode = page.getDocumentElement().getElementById("tag"); + final DomNode divNode = page.getElementById("tag"); final DomText node = new DomText(page, "test split"); divNode.insertBefore(node); @@ -217,7 +217,7 @@ + "<br><div id='tag'></div><br></body></html>"; final HtmlPage page = loadPage(content); - final DomNode divNode = page.getDocumentElement().getElementById("tag"); + final DomNode divNode = page.getElementById("tag"); final DomText firstNode = new DomText(page, "test split"); divNode.appendChild(firstNode); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlElementTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -52,7 +52,7 @@ final String html = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertTrue("Element should have attribute", node.hasAttribute("id")); } @@ -65,7 +65,7 @@ final String html = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertFalse("Element should not have attribute", node.hasAttribute("foo")); } @@ -79,7 +79,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertTrue("Element should have attribute", node.hasAttributeNS("http://foobar", "foo")); } @@ -92,7 +92,7 @@ final String html = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertFalse("Element should not have attribute", node.hasAttributeNS("http://foobar", "foo")); } @@ -105,7 +105,7 @@ final String html = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertEquals("Element should have attribute", "tag", node.getAttribute("id")); } @@ -118,7 +118,7 @@ final String html = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertEquals("Element should not have attribute", "", node.getAttribute("foo")); } @@ -132,7 +132,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertEquals("Element should have attribute", "bar", node.getAttributeNS("http://foobar", "foo")); } @@ -145,7 +145,7 @@ final String html = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); Assert.assertEquals("Element should not have attribute", "", node.getAttributeNS("http://foobar", "foo")); } @@ -159,7 +159,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("ns:foo".equals(attr.getName())) { Assert.assertEquals("Element should have a namespace URI", "http://foobar", attr.getNamespaceURI()); @@ -179,7 +179,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("id".equals(attr.getName())) { Assert.assertEquals("Element should not have a namespace URI", null, attr.getNamespaceURI()); @@ -199,7 +199,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("ns:foo".equals(attr.getName())) { Assert.assertEquals("Element should have a local name", "foo", attr.getLocalName()); @@ -219,7 +219,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("id".equals(attr.getName())) { // This is not standard, but to change it now would break backwards compatibility. @@ -240,7 +240,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("ns:foo".equals(attr.getName())) { Assert.assertEquals("Element should have a prefix", "ns", attr.getPrefix()); @@ -260,7 +260,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("id".equals(attr.getName())) { Assert.assertEquals("Element should not have a prefix", null, attr.getPrefix()); @@ -280,7 +280,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); for (final DomAttr attr : node.getAttributesMap().values()) { if ("ns:foo".equals(attr.getName())) { attr.setPrefix("other"); @@ -302,7 +302,7 @@ = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.setAttribute("id", "other"); Assert.assertEquals("Element should have attribute", "other", node.getAttribute("id")); } @@ -317,7 +317,7 @@ = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.setAttribute("foo", "other"); Assert.assertEquals("Element should have attribute", "other", node.getAttribute("foo")); } @@ -332,7 +332,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.setAttributeNS("http://foobar", "ns:foo", "other"); Assert.assertEquals("Element should have attribute", "other", node.getAttributeNS("http://foobar", "foo")); } @@ -347,7 +347,7 @@ = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.setAttributeNS("http://foobar", "ns:foo", "other"); Assert.assertEquals("Element should not have attribute", "other", node.getAttributeNS("http://foobar", "foo")); } @@ -362,7 +362,7 @@ = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.removeAttribute("id"); Assert.assertEquals("Element should not have removed attribute", "", node.getAttribute("id")); } @@ -377,7 +377,7 @@ = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.removeAttribute("foo"); Assert.assertEquals("Element should not have attribute", "", node.getAttribute("foo")); } @@ -392,7 +392,7 @@ = "<html><head></head><body xmlns:ns='http://foobar' id='tag' ns:foo='bar'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.removeAttributeNS("http://foobar", "foo"); Assert.assertEquals("Element should not have removed attribute", "", node.getAttributeNS("http://foobar", "foo")); @@ -408,7 +408,7 @@ = "<html><head></head><body id='tag'>text</body></html>"; final HtmlPage page = loadPage(html); - final HtmlElement node = page.getDocumentElement().getElementById("tag"); + final HtmlElement node = page.getHtmlElementById("tag"); node.removeAttributeNS("http://foobar", "foo"); Assert.assertEquals("Element should not have attribute", "", node.getAttributeNS("http://foobar", "foo")); } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFileInputTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -120,7 +120,7 @@ final HtmlForm f = firstPage.getForms().get(0); final HtmlFileInput fileInput = f.getInputByName("image"); fileInput.setValueAttribute(fileURL); - f.getElementById("clickMe").click(); + firstPage.getHtmlElementById("clickMe").click(); final KeyDataPair pair = (KeyDataPair) webConnection.getLastParameters().get(0); assertNotNull(pair.getFile()); assertTrue(pair.getFile().length() != 0); @@ -299,8 +299,7 @@ client.setWebConnection(webConnection); final HtmlPage firstPage = client.getPage(URL_FIRST); - final HtmlForm f = firstPage.getForms().get(0); - f.getElementById("clickMe").click(); + firstPage.getHtmlElementById("clickMe").click(); final KeyDataPair pair = (KeyDataPair) webConnection.getLastParameters().get(0); assertEquals("image", pair.getName()); assertNull(pair.getFile()); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFormTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFormTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFormTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -839,9 +839,9 @@ final HtmlForm form = page.getHtmlElementById("form1"); - Assert.assertEquals("First textarea with name 'ta1'", form.getElementById("ta1_1"), + Assert.assertEquals("First textarea with name 'ta1'", page.getElementById("ta1_1"), form.getTextAreaByName("ta1")); - Assert.assertEquals("First textarea with name 'ta2'", form.getElementById("ta2_1"), + Assert.assertEquals("First textarea with name 'ta2'", page.getElementById("ta2_1"), form.getTextAreaByName("ta2")); try { @@ -872,9 +872,9 @@ final HtmlForm form = page.getHtmlElementById("form1"); - Assert.assertEquals("First button with name 'b1'", form.getElementById("b1_1"), + Assert.assertEquals("First button with name 'b1'", page.getElementById("b1_1"), form.getButtonByName("b1")); - Assert.assertEquals("First button with name 'b2'", form.getElementById("b2_1"), + Assert.assertEquals("First button with name 'b2'", page.getElementById("b2_1"), form.getButtonByName("b2")); try { @@ -932,7 +932,7 @@ final MockWebConnection webConnection = getMockConnection(page); final HtmlPage secondPage = - (HtmlPage) page.getFormByName("form").getElementById("clickMe").click(); + (HtmlPage) page.getHtmlElementById("clickMe").click(); assertNotNull(secondPage); Assert.assertEquals("parameters", Collections.EMPTY_LIST, webConnection.getLastParameters()); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java 2012-12-10 11:11:01 UTC (rev 7851) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlIsIndexTest.java 2012-12-11 09:44:23 UTC (rev 7852) @@ -60,7 +60,7 @@ final HtmlIsIndex isInput = form.<HtmlIsIndex>getElementsByAttribute( "isindex", "prompt", "enterSomeText").get(0); isInput.setValue("Flintstone"); - final Page secondPage = form.getElementById("clickMe").click(); + final Page secondPage = page.getHtmlElementById("clickMe").click(); final List<NameValuePair> expectedParameters = new ArrayList<NameValuePair>(); expectedParameters.add(new NameValuePair("enterSomeText", "Flintstone")); |