Forum Discussion

Ty_K's avatar
Ty_K
Occasional Contributor
20 days ago

Copy Text into a Search Field

I have an application that creates Works Orders, that all have unique numbers

I can open the Work Order and Copy the number into the list of Orders on the orders main screen to search for it, but it pastes the exact text node into the field every time and stores that value in the keyword test. I want the keyword test to just paste the last number copied, and not store it as fixed value

21 Replies

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    When pasting the value, what property value are you using?

    • Ty_K's avatar
      Ty_K
      Occasional Contributor

       

      I copy the text from the header of the job and then paste it into the list of jobs screen

      I just really need to know what I'd put in the set text field, so that it pastes the text I've copied, which can be different every time as every order has a unique number

  • scot1967's avatar
    scot1967
    Icon for Champion Level 3 rankChampion Level 3

    Hi, when I was new to all this Record Keyword Test was useful.  It didn't always make the cleanest purpose built test but I was able to learn a lot of things like this by recording and then studying the output.  If this isn't what you are currently doing it might help expose and explain some of the things you are having trouble with.  If this is what you are doing then you need to learn how to use variables like rraghvani said.  Without that basic skill you wont be able to do much more than take what TestComplete hands you.

    ... If you find my posts helpful drop me a Like👍 Be sure to mark the post as the Solution✅ when you get one to help others out and to credit the one who helped you. 😎

    • Ty_K's avatar
      Ty_K
      Occasional Contributor

      Thanks for replying but I'm going to look at other automation tools as everything that rraghvani has tried to help with hasn't worked.

      I looked at the output in the logs and all there was showing was Type Mismatch

  • scot1967's avatar
    scot1967
    Icon for Champion Level 3 rankChampion Level 3

    Sorry to hear that, for what it's worth, a type mismatch indicates the use of a string where an integer should be or something similar.  It's a pretty common and usually easy to fix issue.  It sounds like you are very close.  Once you have your footing I bet this will work well.

    We will be here!  Have a great day or evening!