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")????

Do you have leading and trailing spaces within the inner text of the a tag?
Ie.
<a href="bar">   Link   </a>

maybe this is why you are getting the error.  This may be a bug in
httpunit....or a feature....within httpunit.

Any help now?

Nick

> -----Original Message-----
> From: Laurent Duperval [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 20, 2004 10:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Jwebunit-users] Selecting a specific link in a table
> 
> 
> Nick Neuberger wrote:
> 
> >Use:
> >
> >clickLinkWithText(String linkText, int index)
> >
> >clickLinkWithText("Delete", 2)
> >
> >This will click the 2nd link with the "Delete" as the text.
> >
> >  
> >
> 
> 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.
> 
> L
> 
> >HTH.
> >
> >Nick
> >
> >
> >  
> >
> >>-----Original Message-----
> >>From: Laurent Duperval [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, June 22, 2004 8:25 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: [Jwebunit-users] Selecting a specific link in a table
> >>
> >>
> >>Hi,
> >>
> >>I have a table with many rows, where the last column is a 
> >>link with the 
> >>text "Delete". I want to click the "Delete" link for a 
> >>specific row in 
> >>the table. How do I do that? For example, if I have this table:
> >>
> >>Entry 1 | Delete
> >>Entry 7 | Delete
> >>Entry 5 | Delete
> >>
> >>How to I click the link that corresponds to entry 7?
> >>
> >>L
> >>    
> >>
> 
> 
> 
> -------------------------------------------------------
> 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
> 


- - - - - - 
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