I can't count the rows

Sorry because my stupid question, i’m a newbie in Katalon.
I can’t count those rows.
Can you help me, pls.
Thank you so much.

Hi @vien.dat

Looks like it could use a CSS selector, call out to @Russ_Thomas

1 Like

This may be as easy as

int count = WebUiCommonHelper.findWebElements(commonTestObject, 1).size()

commonTestObject could be defined as similar xpath:

1 Like

Do you need to count the rows in the script? Than use Marek’s solution.

If you just need a quick count, try entering the following CSS selector in the search bar at the bottom of your screenshot:

.ag-body-container .ag-row
1 Like

Thank you so much, i can count success.
Can i add one more question?

In case that table have scrollbar, how can i count those rows, pls?

Thank you.

Thank you, i will note that.

It doesn’t matter. Webdriver works directly with DOM, so all elements would be counted, unless there is any paging, which may require some action to load new elements (click Next, scroll down etc.)

1 Like

Forgot to thank you.
Thank for you help so much.