How to pass more than one test object as argument to a method in Katalon

Hi,

I tried to pass two test objects to a method but it accepts only one Test Object.How to pass two test objects to a method?

Hello,

which method do you try to pass two parameters to?

I have created a custom keyword which accepts two Test Objects:

def selectMonthAndYear(TestObject testObj1,TestObject testObj2){
//code definition
}

While calling the customkeyword in a TestCase(created under Testcase folder), I tried to pass two test objects but it accepts only one testobject as parameter.

What error do you get when you enter two TestObjects?

Thanks for your time and support.I understood that under object column in test case we can give only one test object but under input we can give remaining test objects.

Oh, I see. Simply switch to script mode and put parameters directly to keyword method.

Thanks. And I have a small doubt:

Is there any possible way to create dynamic test objects instead of writing them in scripts?

Ex: Create a test Object under ObjectRepository folder with xpath as “div[@id=’%s’]” and pass values dynamically to that TestObject in script

It is, but having them in scripts is IMO better.

Read the chapter about parametrizing objects.