TestProject Forum

Counting elements in a list

Hi! I’m currently creating a test case for UI. Is there a way to count the number of element present on the list (inside the green box) to validate if the count is right (where the arrow is pointing).

I tried the count element, but I cannot make it work based on type. I was thinking the class attribute could work, but it is not included on the type.

Is there another way to do this?

This is already solved! It confuses me for the list of types to use. Instead of class I should use the class name for the type.

Hi @elisse.eusebio,

First I’m happy to hear that you managed.
Second, you did it the right way!
For everyone who wants to know how to do that:

Create a new Count elements action, choose the type to be Classname and the ByString to be the class name value which is projectItem in your case.