[Webtest] clicklink task demands exact match if href specified
Mikael Eriksson
webtest@lists.canoo.com
Mon, 17 Feb 2003 17:10:48 +0100
Hi all.
The clicklink step seems to work different depending on if the href attribute
is specified or not.
If href is not specified then the label can be a substring of the text in
the link, but if href is specified, then an exact match is demanded.
Is it a bug or is it intentional?
It seems that this behaviour could be changed by changing
protected boolean followThis (WebLink checkedLink)
{
return checkedLink.asText().equals(getLabel())
&& checkedLink.getURLString().indexOf(getHref()) >= 0;
}
in ClickLink.java to
protected boolean followThis (WebLink checkedLink)
{
return checkedLink.asText().indexOf(getLabel()) >= 0
&& checkedLink.getURLString().indexOf(getHref()) >= 0;
}
Regards
/Mikael