Forum Discussion

kavansays's avatar
kavansays
Contributor
9 years ago

Click on selected uitableview row

Hi All,

I am trying to click on UITableView object row, problem is if i scroll the page TestComplete considers only visible rows and consider top visible row as first row after scroll.

 

for Eg: i have 200 rows in UITableView, currently first row is at index '0', now if i scroll down then currently visible row index is '55', so in this case Testcomplete considers Row no 55 as first row..

 

The solution i found is to click on selected row "JavaFXObject("uiTableView").selectionModel.oldValue.selectedIndex.value" as i am able to find actual selected row index.

 

 

here if i directly try to click on selected row(24) by call tableView.JavaFXObject("TableRow", "", 24).Click  is throwing error as its out of bound after table scroll down.

 

Please suggest.

 

Cheers..

3 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

     

    Hi Kavansays,

     

    TestComplete works with grid controls in a different way. If your control allows us to show only the visible rows, I'm not sure if we can do anything here. However, I recommend that you contact our Support team and provide them with a sample application containing the control. It will help them analyze the possible ways you can use to test the control.

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Is this a data driven table?

       

      I have several Delphi grids that behave like this. There are total rows, available rows and visible rows. I have to use various checks and counts from the underlying datagrid/dataset object, in combination with the visible on screen parts, to work out whats available, whats selectable and whats selected.

       

      They're bit a awkward to work with, but it's just the nature of the control.

      • kavansays's avatar
        kavansays
        Contributor

        Yes colin behavior is same as you described.