Update xpath index value run time

Hi

(//button[@id = ‘btnKitType’ and (text() = ‘Config Kit Type’ or . = ‘Config Kit Type’)])[2]

in above xpath i want update index value at run time. how can i update index value?

Please let me know if any other information is required.
Appreciate your help!

hello,
it’s in documentation here:
https://docs.katalon.com/display/KD/Manage+Test+Object
to be quick:

basic - xpath=(//button[@id = 'btnKitType' and (text() = 'Config Kit Type' or . = 'Config Kit Type')])[${INDEX}]findTestObject('OR/path/to/yourObject', ['INDEX' : 1])
1 Like

Andrej Podhajský said:

hello,
it’s in documentation here:
https://docs.katalon.com/display/KD/Manage+Test+Object
to be quick:

basic - xpath=(//button[@id = 'btnKitType' and (text() = 'Config Kit Type' or . = 'Config Kit Type')])[${INDEX}]findTestObject('OR/path/to/yourObject', ['INDEX' : 1])

Thanks Andrej Podhajský