Forum Discussion

Vishwavijet_san's avatar
Vishwavijet_san
Occasional Contributor
14 years ago

Unable to do any action using converted object from strings.

I getting aliases from excel sheet.

Then usuing eval() i am converting them to objects.



Using these when try to do some actions like click, enter text to fields, i am unable to do actions.




6 Replies

  • Hi,



    Exactly what happens when you're trying to perform actions?
  • Vishwavijet_san's avatar
    Vishwavijet_san
    Occasional Contributor
    Hello,



    I am Using Jscript.



    To enter text on textbox, i am using script like:



    eval(MappedObj).Keys("Username");



    I am getting MappedObj from excle sheet.



    After executing this line i am getting error as "Object doesn't support this property or method"
  • Hi,


    Make sure that you've obtained the correct object. Pause your script on a breakpoint and check eval's result (see the Debugging Tests help topic).

  • Vishwavijet_san's avatar
    Vishwavijet_san
    Occasional Contributor
    Hello,



    I tried with this, I am getting correct object after Eval.



    But unable to do any action with Method keys().



    Even i tried with value=() and Text = "";



    Unable to enter text on mapped object field.



    I am retrieving Mapped or aliases objects from Excel sheet as string and converting them to object and trying to apply Keys method on that.



    Still i am getting same error.
  • Hi,



    This means that you've obtained a wrong object. So, what full name do you get when you evaluate this object's properties at run time? Does this full name coincide with the name displayed in the Object Browser?
  • Vishwavijet_san's avatar
    Vishwavijet_san
    Occasional Contributor
    Hello Jared,



    There was problem with obtaining the objects.

    Now it is working fine.

    Thank you very much for suggestion.