Ask a Question

Problems with random IDs

SOLVED
jdwather
Contributor

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.
4 REPLIES 4
AlexKaras
Community Hero

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)
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
jdwather
Contributor

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


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



jdwather
Contributor

Thank you very much.

Questions resolved.
cancel
Showing results for 
Search instead for 
Did you mean: