Ah.  I see your trouble.  I didn't know clickLinkWithText("L") is a
"contains" search.  My bad.

It looks like the following is provided by httpunit.
resp.getLinkWith(linkText);
resp.getLinkWithID(linkText);
resp.getLinkWithImageText(linkText);
resp.getLinkWithName(linkText);

Yeah.  I agree, a need for your suggestion is necessary.
clickLinkWithExactText().

I'll add it to the new features and implement the change in the next couple
of weeks.

Nick



> -----Original Message-----
> From: Laurent Duperval [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 20, 2004 1:22 PM
> To: Nick Neuberger
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Jwebunit-users] Selecting a specific link in a table
> 
> 
> Nick Neuberger wrote:
> 
> >You should still be able to use my suggestion, I think 
> anyway.  ;-)  All of
> >our hyperlinks are completely dynamic as well with no 
> problems.  Our href
> >attributes for all of our links are completely 
> dynamic....and to long.
> >
> >In our application we always have at least 3 or four 
> "delete" operations but
> >they are in a certain order always.
> >get the first delete link and it deletes the account
> >get the second delete link and it deletes the application.
> >get the third delete link and it deletes the claim.
> >
> >Can't you use the clickLinkWithText("Link") instead of a new
> >clickLinkWithExactText("Link")????
> >
> >  
> >
> 
> Well, our link contains the text "L" only. Sometimes it's on 
> the page, 
> sometimes it isn't. But depending on the page I'm looking at, 
> there may 
> be one to 12 other links with "L" somewhere in the linked text. But 
> chances are there will only be one with "L" as the text (not a 
> guarantee, though for our tests it is). It is also a problem 
> if I want 
> to make sure that the "L" link isn't there. Since the other 
> links with a 
> "L" in it will always be on the page, I think that test will always 
> fail. I'm not up to that test yet, so I don't know.
> 
> >Do you have leading and trailing spaces within the inner 
> text of the a tag?
> >Ie.
> ><a href="bar">   Link   </a>
> >
> >  
> >
> 
> No, I have a link that says "Master List", another that says 
> "List 1" up 
> to "List 10", another says "New List", another says "Invalid 
> List". The 
> problem is that clickLinkWithText("L") will match any of the above, 
> depending on which one appears first. And it's not always the 
> same one. 
> The other option is to add ids for every link, but that's not 
> ideal. I 
> may end up having to do this anyway.
> 
> L
> 
> 


- - - - - - 
This e-mail message is intended only for the use of the individual or entity
identified in the alias address of this message and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution of this e-mail message is strictly prohibited. If you have
received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message from your system. Thank you.


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Jwebunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to