2 messages in com.canoo.lists.webtestRE: [Webtest] clicklink task demands ...
FromSent OnAttachments
Mikael Eriksson17 Feb 2003 08:10 
Dierk Koenig17 Feb 2003 11:25 
Subject:RE: [Webtest] clicklink task demands exact match if href specified
From:Dierk Koenig (dier@canoo.com)
Date:02/17/2003 11:25:28 AM
List:com.canoo.lists.webtest

oops :-)

Thanx for post.

Mittie

-----Original Message----- From: webt@lists.canoo.com [mailto:webt@lists.canoo.com]On Behalf Of Mikael Eriksson Sent: Montag, 17. Februar 2003 17:11 To: webt@gate.canoo.com Subject: [Webtest] clicklink task demands exact match if href specified

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