Is there any way to get value of the locator?
when i try :
KeywordUtil.logInfo("Element used " + locator )
i got :
Element used -> TestObject - ‘Object Repository/text’
But i need value of the object like: //input[@id=‘gsc-i-id1’]
Is there any method that can do it?
Assuming you already have reference to your Test Object, you can get the value for any property in the object by it’s name. For example, if I have reference to the following Test Object :
I can get the value of the xpath as follows:
This will return “//div” as a String.
Hope this helps!
Thanks for the help. Work like this, but i want dynamically to be detected the value. Like this i am only limited to XPath, which is not the only identifier which i am using. Is it possible somehow the rest of the identifiers to be covered (id, name…)?
Have you tried with
Yes, by the way i am using is: One method for all the Click actions, with the whole logic inside.
I am not using separate Methods for the all the actions.
I guess in that case some check is needed before display the value.