Forum Discussion

jdwather's avatar
jdwather
Contributor
10 years ago
Solved

Problems with random IDs



Hello,



When performing tests on my web application, I came across a problem in a an editable grid, this grid has an ID that is randomly generated every time it is edited, and that various id 3-11 characters. In other cases when the ID is fixed I used the expression '???' to replace the random ID. In this case the various ID 3-11 characters there is any expression that can be used to treat this variation?

Currently I can not run my test script that every time you access this grid it is with a different id and amount of different characters.
  • Hi Jeferson,

     


    * ignores the variable part. For example, if you specify slickgrid_* as the property value, TestComplete will ignore everything after _. If you specify slickgrid_*profissional, TC will ignore only 432434.


     

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Jeferson,

     


    * ignores the variable part. For example, if you specify slickgrid_* as the property value, TestComplete will ignore everything after _. If you specify slickgrid_*profissional, TC will ignore only 432434.


     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,



    Have you tried an asterisk (*) as a wildcard?

    Note, that it can be used in the middle of the string as well. E.g.:

    Set grid = obj.FindChild("id", "grid_*_edit", 10)
  • Hi

    Thanks for help

    In my grid where i have a problem. Where is mapped and generated the value "slickgrid_432434profissional", With your tip i changed  the numbers for the asterisk(*) and apparently works



    But i have one question, if i put just asterisk(*) the application will disregard the "profissional" after the ID.