The attached java file illustrates this issue. It provides several experiments, each experiment consisting of:
downloading a page
locating the element with a particular anchor text
clicking on that element
Two of the experiment involve an element that is inside of a <li>. The first one works fine, but in the second experiment, the anchor text of the element appears as an empty string.
JBrowserDriverExperiment.java.zip
It seems findElemenByLinkText() is sometimes unable to correctly parse the anchor text of links that are inside of
elements. For example:
- downloading a page
- locating the element with a particular anchor text
- clicking on that element
<ul>
<li><a href="somurl">anchor text</a></li>
</ul>
The attached java file illustrates this issue. It provides several experiments, each experiment consisting of:
Two of the experiment involve an element that is inside of a
<li>
. The first one works fine, but in the second experiment, the anchor text of the element appears as an empty string.