On Sep 4, 5:04 pm, [EMAIL PROTECTED] (Rob Dixon) wrote:
> Xbiton wrote:
> > Hi,
>
> > I've doing some tests with win32::IEAutomation. when I try to access a
> > Table:
>
> > for my $a (@atbl){
>
> > my @allRows = $a->rows;
>
> > for my $in(@allRows){
>
> > my @allCell = $in->cells;
>
> > for my $y (@allCell){
>
> > print $y->cellText;
> > }
>
> > }
> > }
> > Can't locate object method "rows" via package "Win32::IEAutomation::Element"
> > at C:\Documents and Settings\xxxx \Desktop\mechanize_tests\iebiofach.pl
> > line 19.
>
> Whatever you have done to populate your @atbl array has filled it with
> Win32::IEAutomation::Element objects, which have no rows() method. You
> should be calling
>
> @atbl = $ie->getAllTables;
>
> to get an array of Win32::IEAutomation::Table objects, which /does/ have
> a rows() method.
>
> HTH,
>
> Rob
Hi,
thks. for the answer.
actually I called the method on @atbl with @atbl = $ie->getAllTables;
the rest of the code look like this:
use strict;
use win32::IEAutomation;
my $ie = Win32::IEAutomation->new(visible=>1, maximize=>1);
$ie->gotoURL('xxxxxxxxxxxxxxxxxx');
$ie->getSelectList('name:', 'edb.countryid')->SelectItem("Germany");
$ie->getButton('name:',"edb.searchstart")->Click;
$ie->getSelectList('name:', 'edb.cpp')->SelectItem("Alle");
$ie->getButton('name:', "edb_action_NewSearchresult")->Click;
@atbl = $ie->getAllTables;
for my $a (@atbl){
my @allRows = $a->rows;
for my $in(@allRows){
my @allCell = $in->cells;
for my $y (@allCell){
print $y->cellText;
}
}
}
thks.
Xaver
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/