Ask a Question

Iterating through rows and clicking on specific row element

Occasional Contributor

Iterating through rows and clicking on specific row element

Hi Team,


I am a beginner in TestComplete and coding too. Was creating one basic script and didnt know which method to use:


I have data available in rows (example : 10 rows) and I have to iterate through these rows one by one and verify the row details and navigate to desired row to click on the element.

I am unable to understand which method to use FindAll or Find Elements and what to define inside the method. can anyone help me on this.


xpath - //table/tbody/tr - common for all rows





A side note: XPath is far not the best way to search for web elements in TestComplete's world unless you are considering cross-browser testing in the cloud (CrossBrowserTesting, BrowserStack, etc.). For the latter case you just have no other option.


class = "ui-button" and when it got disabled the property is updated as class = "ui-button disabled"

Assuming I imagine the UI of your tested application correctly, you need to identify Next_Button using selector that does not rely on presence or absence of the 'disabled' substring in the value of the class property. Then you should check if class property contains 'disabled' substring, i.e. determine if the found button is enabled or not. And branch then appropriately.


  /Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
SmartBear Alumni (Retired)

Thanks for helping here, Marsha, Alex!


Hi @Vars01 ! How did you solve this one? Please share your solution with the community.

Sonya Mihaljova
Community and Education Specialist

Showing results for 
Search instead for 
Did you mean: