WebUI.verifyElementPresent - Number of elements


I test the presence of an element type of “class” in the DOM.

I use WebUI.verifyElementPresent and the element id correctly found. However, the number of this element is not ok.

There is 4 elements with class “searchResultsWrapperProducts” in the Dom, but the function in the console found only 2 elements.

[INFO] - Found 2 web elements with id: ‘Object Repository/Page de resultat/Classic/Bloc de resultat de recherche’ located by ‘By.xpath: //div[@class = ‘searchResultsWrapperProducts’]’ in ‘30’ second(s)

The selector editor : //div[@class = ‘searchResultsWrapperProducts’]
The Dom:

Can you help me please ?


Maybe the last answer in the following thread would help you: http://forum.katalon.com/discussion/2120/how-to-return-the-number-of-elements-present-in-the-website

1 Like