Forum Discussion

jgabriel's avatar
jgabriel
New Contributor
7 years ago

find an object using a parameter then click

Hello-

 

I'm a new user and would like to ask for suggestions.  I need to be able to search for an item on a grid/table and then click it.  I am trying to implement this on a Keyword test by using Find Object and Call Object but I'm stuck at the part on how to access the "contentText" property of a cell and compare it to a value (a parameter or variable).  My grid has some 8 rows and I need to search through the list and then click on the matching row.

 

Thanks.

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Use a for loop, from 0 to grid.Rows -1, each time through the loop, compare the contentText of the contents of the column for that row to the desired contentText.  If you find what you're looking for, click on that row and then break out of your for loop.