Feature Requests item #996031, was opened at 2004-07-23 04:42
Message generated for change (Comment added) made by jevonwright
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=996031&group_id=61302
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core API
Group: Release 2.1
Status: Open
Priority: 7
Private: No
Submitted By: Nicholas Neuberger (nneuberger)
Assigned to: Jevon Wright (jevonwright)
Summary: Add a clickLinkWithExactText()
Initial Comment:
Proposed by Laurent Duperval.
Currently, clickLinkWithText is a "contains" search.
Because httpunit has a getLinkWith method. Which is a
contains search.
A new clickLinkWithExactText is necessary to click the
exact text within the link url or the inner text.
The associated convience methods will be applied
including: is / has Link With Exact Text. Assertion
conveinces, etc.
//BEGIN snippet from e-mail.
Not quite. If you have dynamically generated links on a
page (like I do)
this is very fragile. I want something like this. If I
have a page that
says:
<a href="foo">A Link</a>
<a href="bar">Link</a>
<a href="foobar">Another Link</a>
I'd like something like this:
clickLinkWithExactText("Link") which would
click the second link only. As it is now, if I have
dynamically
generated links, I have to manually figure out which
one comes first. If
for any reason the order changes, but not the text of
the link, then the
test will fail. Since I mostly use jWebUnit for testing
behaviour, not
page structure, I find this approach to be very cumbersome.
//END snippet from e-mail.
----------------------------------------------------------------------
Comment By: Jevon Wright (jevonwright)
Date: 2008-11-24 14:41
Message:
clickLinkWithExactText(...) has already been added into trunk and tests now
exist.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497985&aid=996031&group_id=61302
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development