copy paste a text in truclient

Hi,

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

Parents
  • Hi  ,

     

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

    see more about IO.read

     

    Thanks,

    Penn

  • 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.

    Regards

  •  ,

    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")

    001.png

     

     

     

     

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

    002.png

     

     

     

     

     

     

    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.

    003.png

     

     

     

     

     

    5. Navigate to your target web page.

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

    004.png

     

     

     

     

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

    005.png 

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

    006.png

     

     

     

     

    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

    007.png

     

    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.

     

     

    Thanks,

    Penn

Reply
  •  ,

    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")

    001.png

     

     

     

     

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

    002.png

     

     

     

     

     

     

    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.

    003.png

     

     

     

     

     

    5. Navigate to your target web page.

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

    004.png

     

     

     

     

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

    005.png 

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

    006.png

     

     

     

     

    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

    007.png

     

    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.

     

     

    Thanks,

    Penn

Children