Updating a Dynamic Object during run time

During Run time I want to include the “instance” property for this object.

String instanceValue = “2”
TestObject to = new TestObject(“Object Repository/Android/ExternalSource/TEST/external.webviewTwitter_TEST - Copy”) to.addProperty(“instance”, ConditionType.EQUALS, instanceValue)

Am I doing it right…seems to not be working

Will this also “check” the detected by

Hello,

by default, Detect object is set to true. To make it inactive, use overloaded method.

addProperty(String name, ConditionType condition, String value, boolean isActive)

do you have an example?

What do you want to achieve?

Alot of our objects are name the same however, the only property are different for example: xpath and “instance”. I don’t want to use the xpath. So my goal is to see if katalon studio can change a property during runtime, when I try to parameterization with Mobile.tap(findTestObject()) – it dose not work. I know for sure that Mobile.verifyElementText(findTestObject()) works. But my action is to “tap” and not to verify.

What about this - is it what you need?

TestObject to = findTestObject("Misc/test1")
to.findProperty("instance").setValue("newValue")

In my case, I want to get the child data by using parent Index. So by updating TestObject property i.e.

String dynamicIdPath = “//android.widget.LinearLayout[contains(@index,‘2’)]/*”

child.addProperty(“xpath”,ConditionType.EQUALS,dynamicIdPath,true)

Its is not working in my case. Is there is any way to get child data using parent TestObject i.e. using index attribute