Forum Discussion

bloodycritic's avatar
bloodycritic
New Contributor
13 years ago

How to assign the object value in settext

I have called for an object using dim



now can you let me how to assign the object in the settext.

I need the syntax for the object called








Otp = RS("notp")



 Sys.Process("iexplore", 2).Page("textboxpath").SetText(("Otp"))



 



 


5 Replies


  • Hi Subhasis,


     


    Could you please share the solution you found? It may help Ravi and other TestComplete users!


     

  • Ravik's avatar
    Ravik
    Super Contributor
    Hi Tanya,



    In VbScript we can set the variable data like below -




    Otp = RS("notp")



     Sys.Process("iexplore", 2).Page("textboxpath").SetText(aqConvert.varToStr(Otp))



    using like above script, I am able to assigned value .



  • Hi Guys,


     


    For JScript, it will look like this:




    var page = Sys.Process("iexplore", 2).Page("textboxpath");

    var obj = page. // ...obtain the object here

    obj.SetText("(\"Otp\")");




     

  • Tanya!!



    I asked for VBscript and not javascript

    anyway, i found the solution