Hi Chang,

I am quite new to XPath, but I know that there are expressions like first()
and last() that you could use on that table. Of course, you need to make
sure that there is some recurring view, in this case some rows that are for
sure at the beginning and the end. Besides this, I think you can count() in
Xpath (not 100% sure, but please check). If that is the case, then you could
script your webtest to Groovy and do something like:

def count = .... xpath to get the count
count.times() { counter ->

//access the right tr with tr[$counter] and save to property

}


Just my 2 cents, there might be way easier solutions... for our webtests, I
am lucky to be able to memorize only one id (of teh element i created) and i
later look this one up again and verify it.

Cheers\
Sven

On 2/6/07, Chang Su <[EMAIL PROTECTED]> wrote:

Hi,

I think I was not clear on my question before.

I need to store/save table cell value as webtest
property or to a file that I can use later.

I tried to use <storeXPath> it worked with a table
with fixed rows and columns.

<storeXPath

xpath="string(//[EMAIL PROTECTED]'form2:table1:row0:0:col1:_id14'])"
property="first_device" />

<storeXPath

xpath="string(//[EMAIL PROTECTED]'form2:table1:row0:1:col0:_id13'])"
property="first_type" />

it worked with a table with fixed small number of rows
and columns.

My table has fixed number of columns but could have 1
row or 50 rows.

How do I store XPATH of a table with dynamic number of
rows?? Should I use some <scriptStep> here (because it
is better to put in a loop, right?)


any suggestion is appreciated!!



Chang




--- Michael Habbert <[EMAIL PROTECTED]>
wrote:

> Hi Chang Su,
>
> Chang Su wrote:
> > did not get any reply so I resend this.
> >
> > I would think this is a common task..someone had
> to
> > encounter this before.
> If no one answers to your question - it may imply,
> that your question is
> not sufficiently understood or no one has a
> solution.
>
>
> [..]
> >> When I navigate bui pages using webtest, how do I
> >> dump
> >> tables in a BUI page to a file (or save somwhere)
> ?
> >> I mean besides using 'save' in webtest which
> >> generally
> >> saves the whole html file, is there a way to jsut
> >> save
> >> table contents to a file or somewhere??
> [...]
> so what I your purpose? So we may understand your
> problem better.
> Why do you want to save the table?
>
> --
> Mit freundlichen Grüßen
>
------------------------------------------------------------------------
> Michael Habbert
>
> Senior Developer
> Netpioneer GmbH, Beiertheimer Allee 18, D-76137
> Karlsruhe
> Geschäftsführer: Axel Jahn
> HRB: 107521 Handelsregister Mannheim
>
> Tel: 0721 / 920 60 21
> Fax: 0721 / 920 60 30
> E-Mail: [EMAIL PROTECTED]
> www: http://www.netpioneer.de
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>





____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest




--
Sven Haiges
[EMAIL PROTECTED]

Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de

Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss

Reply via email to