Another alternative extension would be to support regex on some
of the fields. This is done in some of the plugin steps which
need regex on more than one field. How it would work in this case
is you would just go label="/A/" and because of the '/' characters
it would treat it as a regex but in this case containing just
a static string. If you wanted the current behaviour you could
go "/.*A.*/" instead. I'll have to check we don't need "/^A$/"
now that we have switched over to the Sun regex package, but
whatever the syntax we would have two alternatives.

Note that in other places in WebTest we support an additional
regex="true" attribute but if we wanted to support regex for
both label and href, this approach no longer works (easily).

The code for '/' parsing is probably in the email and excel
steps but could be pulled into the main codebase in which case
this change could be very simple - but would probably need
better doco.

Cheers, Paul.

Siegfried Goeschl wrote:
Hi Dierk,

I came across the same problem (again) and it took a while to figure out the problem

+) I have a navigation bar containing link "Artist", "Genres", ....
+) there is a quick name search facility providing links "A", "B", "C"

When I used <clickLink label="A"/> it pick up the "Artist" link and not my requested "A" - IMHO the current implementation looking for substring to locate the link is non-intuitive.

Your proposed workaorund <clickElement xpath="//a[text()='A']" /> but <clickLink> is still much more intuitive.

I would like to get my hands dirty by providing an extension to the <clickLink> step ...

+) <clickLink exactMatch="true" label="A"> would look for an exact match without using trim as previously proposed

+) updating the docs


Any suggestions

Siegfried Goeschl


Dierk Koenig wrote:
Hi Sigi,


I finally got an excuse to work with Canoo WebTest again by setting up a
continuous integration platform using CC, JUnit, Canoo WebTest and JMeter


;-)


I updated the Maven plug-in to work with the CC Build 1177 - the
official release will take some time though


cool. To get around the snapshot problem with ibiblio we consider
installing a 'repository' for the webtest pom under webtest.canoo.com. (no final decision, yet)


<a>Madonna & Otto Von Wernherr</a>
<a>Fortress Madonna</a>


You have really interesting projects!


i.e. the implementation seems to be happy with a matching substring
therefore picking <a>Madonna & Otto Von Wernherr</a> and never the
<a>Madonna</a> in question.


Yep. that's on purpose, although the according doc seems to have
vanished from the attribute description (?).

You can use
<clickElement xpath="//a[text()='Madonna']" />

The purpose of the substring match in clickLink is to get
around problems with excessive whitespace in the label.

cheers
Mittie
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to