The method findPropertyValue brings the xpath from the Attributes Selection Method [1].
String parcialpath = field.findPropertyValue("xpath")
How to obtain (in script) the xpath defined at the Xpath Selection Metrod [2]?
[1] Attributes Selection Metrod:
[2] Xpath Selection Metrod:
KATALON 5.7.0 - Attributes Selection Metrod.jpg
KATALON 5.7.0 - Xpath Selection Metrod.PNG
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObjectimport com.kms.katalon.core.testobject.SelectorMethod
String path = findTestObject("test/object").getSelectorCollection().get(SelectorMethod.XPATH)
2 Likes
Does anyone know how to identify wich Selection Method is active?
It is similar.
SelectorMethod sm = findTestObject("Misc/test").getSelectorMethod()
1 Like