[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Watir too slow

mirthcyy

3/3/2008 4:57:00 PM

hi guys,

I'm using watir to get the result from a html table into an array like

$reportResult=frame.table(:id, "ReportTable").to_a.flatten

But it takes forever to run if that table's huge. For example, if that
table has 533,863 cells so it will be 533,863 objects in that
$reportResult array. It will take over 20 minutes to run that line of
code. Sometimes, it will just give up and give exception.

So my question is: Is there any better way to get result from the html
table that could run faster? Any suggestion is high appreciated!

Thanks,
YY

1 Answer

Paul Rogers

3/3/2008 11:03:00 PM

0

On Mar 3, 9:56 am, mirth <mirth...@gmail.com> wrote:
> hi guys,
>
> I'm using watir to get the result from a html table into an array like
>
>  $reportResult=frame.table(:id, "ReportTable").to_a.flatten
>
> But it takes forever to run if that table's huge. For example, if that
> table has 533,863 cells so it will be 533,863 objects in that
> $reportResult array. It will take over 20 minutes to run that line of
> code. Sometimes, it will just give up and give exception.
>
> So my question is: Is there any better way to get result from the html
> table that could run faster? Any suggestion is high appreciated!
>
> Thanks,
> YY

you could try hpricot - either by using net/http or by dumping the hml
from IE to it

Paul