Is it possible to get a list of objects (web elements) using Katalon?


Recently I found a scenario where detecting multiple objects would come in handy but I noticed the “findElements” keyword is no longer available and the API documentation states that TestObject.findTestObject() will retrieve only one object. I’d like to have a list of objects retrieved so I can manipulate and perform validations on the test objects. Is there a keyword I’m missing that can do this? is there a way to script something using the Katalon API?

I figure I can just create a custom keyword using selenium and move forward but I wanna make sure I’m not skipping a Katalon based solution which would be better for my purpose.

Thanks in advance.

1 Like

Unfortunately and surprisingly enough, no. Katalon does not provide a wayt to get a list of Test Objects in the Object Repository directory.

This page may suggest something to you:


Here is my solution for my personal use.

I found this project is poorly documented.
It contains several useful (I believe) functionalities, but they are not documented at all.
Forgive me, this is for my own use.

Now I remember, I abandoned this project in March 2023 because I found Katalon Studio equips a feature of finding garbage Test Objects. The following doc explains their feature.


I realized my misunderstanding. You want to get a list of web elements in a page; you do not want to get a list of Test Objects in a Object Repository directory.


Where did you find it?

I believe v8.6.5 still has the keyword,%20int)

1 Like

You can use Selenium WebDriver API in Katalon Studio.


will enable you to get a list of matching WebElements (plural).


Yes, I do want to get a list of web elements.

I remember using findElements years ago but when looking through the built-in keyword I couldn’t find it anymore. I figure maybe it was replaced with something else, but apparently no. Also you can still find it in the documentation.

I think I’m gonna end up creating a work around in selenium, something like this:

import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.By as By
import org.openqa.selenium.WebElement as WebElement
import java.util.List as List

WebDriver driver = DriverFactory.getWebDriver()

xpath = findTestObject('Common/span_activeBlendAllocationList').getSelectorCollection().get(SelectorMethod.XPATH)

List<WebElement> elements = driver.findElements(By.xpath(xpath))

//to do validations

I appreciate the help and the code you shared.


Nice solution.

1 Like

You can find the source code of WebUI.findWebElements() keyword at

see Line 2860.

You can dig the source in detail. Ultimately you would find that the WebUI.findWebElements keyword does the same as what your code above does (call WebDriver.findElements(By)).

1 Like

@kazurayam - so how come WebUI.findWebElements is unable to get all elements? were infact they are having same underlying code.

Coz we are also facing same issue in WebUI.findWebElements were it cannot get the list of elements.


I have no idea. You haven’t explained your case to others. You haven’t showed your code. You haven’t shared your target URL and HTML source. The guys in the forum can not guess what’s happening to you without sufficient information disclosed.

I just guess that there is nothing wrong in the keyword implementation.

Possibly your code has something that gets you puzzled.

  1. your xpath could be wrong
  2. your code possilbly does not wait for the page to load

sorry for puzzling you… I was referring my reply from the thread issue in this topic. So the context revolves to the findWebElements if it has issue in determining test object. :slight_smile:

1 Like

I’m not sure if all the references use the same method, but you can also use:

import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.webui.common.WebUiCommonHelper as WebHelper

List<WebElement> list = WebHelper.findWebElements(findTestObject(...), 10)

@grylion54 thanks for this.