[Httpunit-develop] WebResponse.getLinkWith() finding the wrong web link.
Brought to you by:
russgold
From: Corbin, K. <Ken.Corbin@Summit.Fiserv.com> - 2002-10-11 19:51:04
|
I have a web page with two hyperlinks, one of which is a proper subset of the the other one. Trying the find the "User" link is returning the link to "User Administration" because it happens to come first in the page. I've checked through the code and can see why this is happening, but I'm not sure what I should do about it. Probably going to have to add a new method that does a full text match, possibly after stripping out any html tags. Or possibly we could enhance the getLinkWith method to look for a best match instead of stopping at the first string that contains the requested string. Or maybe there already is a better method that will do what I want??? Anyone have any suggestions? |