Did you check the response.How do the links appear in the response.
On 3/7/06, Rachel Swailes <[EMAIL PROTECTED]> wrote:
> Hi there
>
> I'm busy writing tests with JWebUnit to test a tapestry application that
> we're writing.
>
> On this specific page, there are (amongst other things) two links;
>
> <a
> href="/app?service=direct/1/BCBookingPage/$Edit.$DirectLink$0&sp=l4003">Master
> rooming list</a>
> <a
> href="/app?service=direct/1/BCBookingPage/$DirectLink&sp=l5024">Rooming
> list</a>
>
> Now I am trying to click on the second link. When I try
> clickLinkWithText("Rooming list") expecting the second link to be
> clicked, the first link is in fact clicked. (I work this out by getting
> the dialog and viewing the resultant html.) I have also tried looping
> through all of the available links and clicking on the link that matches
> the url. When I do this, no failures or exceptions are thrown, but it is
> as if the link is not actually followed.
>
> WebResponse webResponse = dialog.getResponse();
> boolean linkFound = false;
> try {
> WebLink[] webLinks = webResponse.getLinks();
> for(WebLink wl: webLinks){
> if(wl.getURLString().equals(url)){
> wl.click();
> linkFound = true;
> }
> }
> } catch (SAXException e) {
> e.printStackTrace();
> } catch (IOException e) {
> e.printStackTrace();
> }
>
> If anyone has any suggestions as to how to get the second link clicked
> it would be greatly appreciated.
>
> Many thanks,
> Rachel
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Jwebunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
--
sreedhar
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users