Hi!

It's probably better to use an approach like Mark's suggestion in my case, 
given that I have no idea the IDs of the elements, because these depend on the 
database.
But, the problem here is that I don't know the position in the Grid of the 
elements. So, is there a way to iterate the rows of a Grid, looking for a 
particular element?

Thanks for the responses! Cheers!

Matias.


--- El mar 25-ene-11, Mark <mark-li...@xeric.net> escribió:

> De: Mark <mark-li...@xeric.net>
> Asunto: Re: Testing Tapestry webapps with Selenium
> Para: "Tapestry users" <users@tapestry.apache.org>
> Fecha: martes, 25 de enero de 2011, 20:36
> Using the userId as shown above is
> probably your best bet. However, if
> you don't have a userId an you are getting ids like:
> modifyUserLink_f8ab4c23
> 
> You might try something like this:
> click("xpath=(//a[starts-with(@id,'modifyUserLink')])[3]");
> 
> That would click on the third item that is found with an id
> starting
> with modifyUserLink.
> 
> Mark
> 
> On Tue, Jan 25, 2011 at 2:10 PM, Igor Drobiazko
> <igor.drobia...@gmail.com>
> wrote:
> > If you don't like to provide client-ids besides t:id,
> you might create a
> > mixin which will force t:id to be id as well.
> >
> > On Tue, Jan 25, 2011 at 9:03 PM, Matias Moran 
> > <matiasmo...@yahoo.com.ar>wrote:
> >
> >> Thanks a lot Thiago!
> >>
> >> I will try something like this, I was hoping I
> didn't need to use IDs, but
> >> if there is no other solution, it is better than
> nothing.
> >>
> >> Thanks again! Greetings!
> >>
> >> Matias.
> >>
> >>
> >> --- El mar 25-ene-11, Thiago H. de Paula
> Figueiredo <thiag...@gmail.com>
> >> escribió:
> >>
> >> > De: Thiago H. de Paula Figueiredo <thiag...@gmail.com>
> >> > Asunto: Re: Testing Tapestry webapps with
> Selenium
> >> > Para: "Tapestry users" <users@tapestry.apache.org>
> >> > Fecha: martes, 25 de enero de 2011, 17:57
> >> > On Tue, 25 Jan 2011 17:51:53 -0200,
> >> > Matias Moran <matiasmo...@yahoo.com.ar>
> >> > wrote:
> >> >
> >> > > The code generated by Selenium is
> something like
> >> > this:
> >> > >
> >> >
> >>
> selenium.click("//a[@id='modifyUserLink']/div");selenium.waitForPageToLoad("30000");
> >> >
> >> > When inside a loop, if you don't provide the
> id for your
> >> > ActionLinks, they'll generate different ids
> for them.
> >> >
> >> > Try something like this:
> >> >
> >> > <t:actionLink t:id="modifyUserLink"
> context="user.id"
> >> > id="actionLink-${user.id}"/>
> >> > selenium.click("actionLink-1"); // or some
> valid user id
> >> > instead of 1
> >> >
> >> > --Thiago H. de Paula Figueiredo
> >> > Independent Java, Apache Tapestry 5 and
> Hibernate
> >> > consultant, developer, and instructor
> >> > Owner, Ars Machina Tecnologia da Informação
> Ltda.
> >> > http://www.arsmachina.com.br
> >> >
> >> >
> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
> > http://tapestry5.de
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to