Forum Discussion

anumolu9999's avatar
anumolu9999
Contributor
9 years ago

Accessing NameMapping objects in scripts

Hi, I had given the NameMapping alias name to a variable like aliasName="Aliases.page.button" Here actually I am passing text to the variable in above step. can i access the NameMapping object using a...
  • AlexKaras's avatar
    9 years ago

    Hi Anumolu,

     

    If I got the question right:

    Use eval() or evaluate() function (depending on the language of your test project, e.g.: http://www.w3schools.com/asp/func_eval.asp) :

    I.e.:

    VBScript - Set aliasName = Eval("Aliases.page.button")

    Other languages - aliasName = evaluate("Aliases.page.button")