Check element appearance more than once


I would like to check if my element is visible on the site more than once.

Here is the situation: (I can not show pics or code because of my company)

We have a library page where if I select a video, it will appear in the Selected videos also, which is next to the basic videos, so I see them on the same screen, in another part of the website. So I will see the video with its’ ID twice ic I successfully selected a video.

How could I check if I see it twice? Because as far as I know, Check if Visible only gives back bool. I would need something to count every appearance.

Thanks in advance!

This is what you’re looking for

int countOfElements = WebUiCommonHelper.findWebElements(findTestObject('Your/video/testobject'), 5).size()

Thank you, I will check it on Wednesday and let you know if it solved my problem!

Thanks Marek, also worked for me too!

count=WebUiCommonHelper.findWebElements(findTestObject(‘Page_Login/Input_userName’), 5).size()

WebUiCommonHelper since which katalon version was developed?

I don’t know, but it’s there for quite long time.