mld has asked for the wisdom of the Perl Monks concerning the following question:

I am using Win32::IEAutomation::Table for accessing the web table

Following is the code written to access cell of a table

$tblcell= $IE->getTable('id:','G_ctl00xContentPlaceHolder1xUserControl +1xGrid1xGrid')->tableCells(2,2); $cltext=$tblcell->cellText; print "cltext=$cltext\n"

on execution the following is printed

Win32::IEAutomation::Table=HASH(0x22704a4)cltext=ef80c8a5-0ad0-4b97-9894-e532335c155dA1-100abcd-qwerrfemale4

The grid consists of 3 column and one row with the following data

Name:A1-100,ID=100abcd-qwerr , sex=female

Name - textbox , ID - textBox and Sex - Combo

Replies are listed 'Best First'.
Re: Accessing a cell of a web Table
by 1Nf3 (Pilgrim) on Jul 16, 2009 at 10:32 UTC

    Try this. It's untested, but should work according to the docs.

    my $table = $IE->getTable('id:','G_ctl00xContentPlaceHolder1xUserContr +ol1xGrid1xGrid'); my $targetCell = $table->tableCells(2,2); my $cltext = $targetCell->cellText; print "cltext=$cltext\n"

    Regards
    Luke

Re: Accessing a cell of a web Table
by Anonymous Monk on Jul 16, 2009 at 08:39 UTC

      How to access the particular cell of the table

      The code above returns the value of all the three cells of the grid

      sorry for the iconvenience