How to use a locator which returns more than one element in Katalon keywords

I understand that it can be possible by selenium web driver like below.

WebDriver driver = DriverFactory.getWebDriver()List<WebElement> pending = driver.findElements(By.xpath("<locator>"))for(WebElement elem in pending) {   //actions}

Using selenium script, I couldn’t save the elements in Object Repository.

Is there any Katalon specific function do fulfil this??

Using selenium script, I couldn’t save the elements in Object Repository.

I do not understand what you mean. What does your ‘selenium script’ mean? Do you want to serialize an instance of List into the Katalons Object Repository? Could you elaborate this?

@kazurayam Thanks for the reply.
I mean, using ‘findElements’ method, we can get the elements which match more than one element on the application.
Similarly, does Katalon has any builtin keyword or any method to get the list of matching elements from the locator.
So, I can save that locator in Object Repository which is not possible when I use ‘findElements’ method from WebDriver.

Similarly, does Katalon has any builtin keyword or any method to get the list of matching elements from the locator.

I wonder if you are aware or not; you can write in test case of Katalon Studio exactly what you presented above:

import org.openqa.selenium.WebDriverimport org.openqa.selenium.Byimport org.openqa.selenium.WebElementimport com.kms.katalon.core.webui.driver.DriverFactory
WebDriver driver = DriverFactory.getWebDriver()List pending = driver.findElements(By.xpath("locator"))for(WebElement elem in pending) {    //actions}

You do not necessarily use com.kms.katalon.core.testobject.TestObject and Object Repository. Why not you call WebDriver API immediately in Katalon Studio. It is just possible. I do it quite sometimes.


Update at 2019/10/31

List<WebElement> WebUI.findWebElements(TestObject testOBject, int timeout) method is available.

https://docs.katalon.com/javadoc/com/kms/katalon/core/webui/keyword/WebUiBuiltInKeywords.html#findWebElements(TestObject,%20int)

This seems to be equivalent to WebDriver#findWebElements(By).

does Katalon has any builtin keyword or any method to get the list of matching elements from the locator

No.

Previous post of mime may interest you:

Newly published article by Katalon