Hi!
Can you please help be on this?
I’m using Object.findPropertyValue(‘xpath’) to get the value from the ‘Attributes’ but how can I get the value from the ‘XPath’ here?
Hi!
Can you please help be on this?
I’m using Object.findPropertyValue(‘xpath’) to get the value from the ‘Attributes’ but how can I get the value from the ‘XPath’ here?
i generally use
TestObject to=findTestObject(“path to object”)
String selector=to.getSelectorCollection().get(to.getSelectorMethod())
for the specific case where you want the XPATH selector, i believe it would be
String selector=to.getSelectorCollection().get(SelectorMethod.XPATH)
Thanks for the prompt response mate! Really appreciate your help
Also, I checked in documentation its there if anyone might want to check further.
Link of docs below:
https://docs.katalon.com/javadoc/com/kms/katalon/core/testobject/TestObject.html#getSelectorMethod()