copy paste a text in truclient


Hope you are doing fine.

I need to copy a text from my email and paste it on another page (textbox). how i can perform that task in truclient script?

kindly help.

Best Regards

  • Hi  ,


    I would like to suggest you use the TruClient javascript API, create your own logic in javascript, use to get your text from the email file, and keep it in a variable, then input your variable to the textbox.

    see more about




  • Hi  ,

    can your email be opened from browser window?

  • Yes Zhipeng Wang,

    we are accessing email from browser trying to copy its contents and pasting these copied clipboard values in a text box on another application page.


  •  ,

    I can understand your requirements now :),  here is the suggested steps:

    1. add a navigation step that open your email in browser.

    2. add a "Generic Object step", select the text object that you want. (in my case, I want to get the text "Examples in Every Chapter")






    3. expand the step, change the step's action to "Get Property"








    4. In the step's argument section, give your variable a name, in this way, a javascript variable "myVar" is created and it contains your text as its content.







    5. Navigate to your target web page.

    6. add a "Generic Object step" and select your target textbox.






    7. set the Action of the object step to "Type"


    8. in the step's arguments, set the value with your javascript variable, note the yellow highlight part.






    9. replay, in this way, the content of your javascript variable will be able to typed to your target textbox, in my case, the string "Examples in Every Chapter" is input to the textbox



    BTW, if your want to only paste part of your string, then you need to add "evaluate JS step", write javascript code to split your string, make sure your JS variable only contains string that you want to paste.





  • Hi Zipeng Wang,

    Thank you so much for all these efforts. really appreciate that.

    Actually my desired value is dynamic it would change on next reply. how i can handle it?

    you need to add "evaluate JS step", ok. how i will write java script code of copy text and paste text? kindly help.

    Best Regards

  • Hi,

    Actually you should write your code to get or set your text to the target web element, try to use the "AUT" API,

    e.g. var elem = AUT.document.getElementById('myInput');


    you can find more from Work With JavaScript in TruClient scripts




Reply Children
No Data