I get random id always when i run the code (randompincode),
i need to send that random id to xpath and with that xpath i need to get the text of an element
for ex:- RandomPincode = ‘8522’
WebUI.setText(findTestObject(‘Object Repository/History/SearchTab_InHistorySelection’), RandomPincode)
String xpath = ‘//div[text()=’+RandomPincode+‘]/preceding-sibling::div[10]’
TestObject to = new TestObject("object_name ")
to.addProperty(“xpath”,ConditionType.EQUALS,xpath)
xpath added in object repos :-
object_name =
//div[text()=‘${RandomPincode}’]/preceding-sibling::div[7]