olga_ulchina
11 years agoOccasional Contributor
How to return object's mapped name (vbscript)
I mapped an element on a webpage, lets say it's Aliases.browser.page.button. In my script I have a function which checks if this element is present on page. Something like: Function IsPre...
- 11 years agoHi Olga,
A possible solution is to change IsPresent to accept the object name as a string. You can convert a string to an object using Eval.
IsPresent("Aliases.browser.page.button")
Function IsPresent(AliasStr)
Dim element
Set element = Eval(AliasStr)
...
' In case it does not exist log its name
Log.Error AliasStr
End Function