TestProject Forum
Powered by leading experts in the test automation community

Counting elements in a web page

Hello,
is it possible to count elements in page by specifying the CSS CLASS?
I am aware of this addon (https://addons.testproject.io/element-extensions) but it seems that it works only with ID or NAME,
Best regards,
Ondrej

Hi @ondrej.spalek,

The ‘Count Elements’ action can be used with the following locator types:
ID
NAME
CLASSNAME
CSSSELECTOR
LINKTEXT
PARTIALLINKTEXT
TAGNAME
XPATH
ACCESSIBILITYID
IOSUIAUTOMATION
ANDROIDUIAUTOMATOR
NAMEDTEXTFIELD

Hello,
thank you very much. I was able to resolve this by using CLASSNAME
It would be great if this information was written somewhere (e.g. in the description of the addon).
Best regards,
Ondrej

You are right @ondrej.spalek.
Most of our addons are well documented and we are currently working on document the rest of them. It’s a work in progress :slight_smile:

OK, great to hear that :slight_smile: