2 messages in com.canoo.lists.webtest[Webtest] clicklink task demands exac...
FromSent OnAttachments
Mikael Eriksson17 Feb 2003 08:10 
Dierk Koenig17 Feb 2003 11:25 
Subject:[Webtest] clicklink task demands exact match if href specified
From:Mikael Eriksson (mik@connection.se)
Date:02/17/2003 08:10:26 AM
List:com.canoo.lists.webtest

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