Forum Discussion

Mk1's avatar
Occasional Contributor
7 years ago

Hi SmartBear Team,How do i convert a string from property file to an Object? eval is not helping.

'undefined' is null or not an object this is the value i'm reading from my property file    genericAuthButton=Sys.Browser("iexplore").Page(Project.Variables.pPage).Object("app").PowerCardV3_1("app...
  • shankar_r's avatar
    7 years ago

    You can still test your scenario with the below code


    function test()

    function doStuff(genButPath)//Pass your hasp map string value { var localBtnPath = eval(genButPath);//here your genButPath shouold be your Object FullName if(localBtnPath.Exists) { localBtnPath.TextInput("period_codeTI").Keys(context.get("PeriodCode")); } else { Log.Error("Object not exists for the Fullname" + genButPath); } }