Forum Discussion

omerj28's avatar
omerj28
Occasional Contributor
14 years ago

How to click an HTML table when the link's position is changed

In an html table if somehow the column sort order is changed or the if data is deleted from above or below the desired link, TestComplete clicks the wrong link on playback since the original link has a different X,Y position now.



I need to search for the particular link on the web page and click it even if it appears a row below or above when the test is played back.

1 Reply

  • omerj28's avatar
    omerj28
    Occasional Contributor
    I was able to click a particular link in the grid using the following option



    Find child of Aliases.IEXPLORE1.pageSystemUsers.formAspnetform.tableTblmain.cell.panelIdareapagecontainer.table.cell.panelDivgrid.panelNgvsysuserBodyContent Click ... Simulates a left-button single click in a window or control as specified (relative position, shift keys).



    TC searched for the innerText value and when it existed in the table area, it successfully clicked it irrespective of its position in the table.