[Webtest] how to dump table contents to a file

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Mon, 09 Jul 2007 21:22:46 +0200


Hi,

for instance:

<groovy>
def f = new File('/path/to/your/file')
f.withWriter() {
   it << 
step.context.currentResponse.getHtmlElementById('yourTableId').asXml()
}
</groovy>

should do the job.

Marc.

Kathy Wasden wrote:
> 
> -----Original Message-----
> From: "Chang Su" <changsu0822@yahoo.com>
> To: webtest@lists.canoo.com
> Sent: 2/3/07 8:27 PM
> Subject: [Webtest] how to dump table contents to a file
> 
> Hi, all,
> 
> 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??
> 
> really need help here!
>  
> thanks,
> 
> Chang
> 
> 
>  
> ____________________________________________________________________________________
> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>