[HtmlUnit] [htmlunit:bugs] #1982 DomNodeIterator traverses Uncles of root
RBRi via HtmlUnit-develop <[email protected]> Thu, 09 Aug 2018 19:46:33 -0000
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | </p/htmlunit/bugs/1982/8e21c127d295d4e9e2ee4f1c6f691b317155d4b7.bugs@htmlunit.p.sourceforge.net> |
- Description has changed:
Diff:
~~~~
--- old
+++ new
@@ -3,6 +3,7 @@
I have attached an example. in this example i am searching a table from the td id='11' .
I suspect the issue is in th DomeNodeIterator.getFirstUncle, i *believe* this
+
final DomNode parent = node.getParentNode();
if (parent == null) {
return null;
~~~~
---
** [bugs:#1982] DomNodeIterator traverses Uncles of root**
**Status:** closed
**Group:** 2.32
**Created:** Thu Aug 09, 2018 04:42 AM UTC by Steve Harney
**Last Updated:** Thu Aug 09, 2018 07:46 PM UTC
**Owner:** RBRi
**Attachments:**
- [DocumentTraversalBug.java](https://sourceforge.net/p/htmlunit/bugs/1982/attachment/DocumentTraversalBug.java) (2.4 kB; application/octet-stream)
I have been working with a wrapper around htmlunit ( 2.32) it appears that the Document traversal is failng to stop at the root node during its back tracking. there appears to be no check to see if the
I have attached an example. in this example i am searching a table from the td id='11' .
I suspect the issue is in th DomeNodeIterator.getFirstUncle, i *believe* this
final DomNode parent = node.getParentNode();
if (parent == null) {
return null;
}
should read
final DomNode parent = node.getParentNode();
if (parent == null || parent == root) {
return null;
}
Steve
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/htmlunit/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop