Forum Discussion

Jager's avatar
Jager
New Contributor
8 years ago

Searching similar text box

Hi, I have text box where pice of name is random generating. How can I definie this box?  My problem appears every single time when i run TestComplete. 

6 Replies

  • Bobik's avatar
    Bobik
    Frequent Contributor

    Try read about "Name mapping" feature in TestComplete and how to make good mapping criteria.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Edit your name mapping for the object. The easiest thing to do is replace the randomized part of the name with a wildcard (*) character. This usually works in most cases.

    A more robust solution is to edit the mapping and select properties to use for your mapping criteria where the combination of those properties will uniquely identify your object. This takes a bit more skill and may require the use of selecting required children, wildcarding, and possibly building regular expressions.

    Probably the BEST solution is that, if you have a good relationship with the developers, have them create some sort of property on the object hat you can use as an identifier or have them modify their code to reduce or eliminate the randomization.
    • Jager's avatar
      Jager
      New Contributor

      Where i should replace name with wildcard (*)? I am using a TestComplete (for Websites) 2 days and i am not good in this kind of software. Can I ask you for step by step instruction? My textbox name is: textboxAdressIdTemplate14774739400

      (this numbers are randomized). What should I do?

       

      Thanks for you time.

       

      Simon