Forum Discussion

svruss's avatar
svruss
Occasional Contributor
14 years ago

Can't take cell object from table

Hello again,



my problem today is with cell object from table. When I use follow script to take cell it return me in Watch list only [Object]:

page = Aliases["iexplore"];


findFirstName = page.FindChild( new Array( "ColumnIndex", "ObjectType", "RowIndex", "innerText" ), new Array( "0", "Cell", "7", name ),100);



I check for other objects with same parameters, but for this cell combinaion on parameters is absolutly unique and don't have any repetition. Also I do some tests with GetTable command as in Parsing HTML Tables chapter, but it return me exception when go on row with GetTable. Can you suggest me decision for this problem?



Besr Regard

Svetoslav





3 Replies

  • svruss's avatar
    svruss
    Occasional Contributor
    On same page there is a few tables, but this innerTextin cell is unique for all tables. Now I see that is possible same innerText to present in the other table. How I can to differ one table from other?
  • svruss's avatar
    svruss
    Occasional Contributor
    Today I have same problem when try to take object submit button from cell of the table. When I execute FindChild variable return unexpandeble object in the watch list.
  • svruss's avatar
    svruss
    Occasional Contributor
    Problem is solved. I obtain object from the table on two steps - first I take a table using class name property and then look in the table for object:

    tablePersons = page.Find( new Array( "className" ), new Array( "table-property-persons" ), 100);

    if( tablePersons["Exists"])

        {

            createBtn = tablePersons.Find( new Array("className"), new Array("js-add button add"),100);

            if( createBtn["Exists"])

                {

                    createBtn["Click"]();

                }

        }