Ask a Question

Where exactly can regular expressions be used in TestComplete? NameMapping? Elsewhere?

SOLVED
randall
Contributor

Where exactly can regular expressions be used in TestComplete? NameMapping? Elsewhere?

My test application is MFC based and comes with all of the warts and defects therein.  I am having problems name mapping the application and its controls because after creating them, they don't seem to work.  Every time my test app is invoked is has different classname values.  I thought I could solve the problem via the use of a regular expression.  I've tried using the regular expression as a constant and as a project variable value and referencing the variable.   Neither appear to work.

 

I am trying to represent the classname

 

Afx:01320000:8:00010003:00000000:05F32707

 

with a regular expression since this value changes with each instance of the test application.  My regular expression is 

 

Afx:[0-9]{8}:[0-9]{1}:[0-9]{8}:[0-9]{8}:*

 

Am I attempting something that is not supported or attempting it in the wrong place?  

 

TIA,

Randall Bowen

3 REPLIES 3
Marsha_R
Champion Level 2

TestComplete has regular expressions but I don't see any reference for name mapping, only for testing.

https://support.smartbear.com/testcomplete/docs/reference/misc/regular-expressions.html

 

I think what  you want for NameMapping is wildcards:

https://support.smartbear.com/testcomplete/docs/reference/misc/using-wildcards.html

 

 

tristaanogre
Esteemed Contributor

Are there other properties you can use to map the component other than class name?  Text or labels or something else?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
NisHera
Valued Contributor

I also think in same line as @tristaanogre says.

How dose a user identify those fields? obviously some comprehensible name.....

isn't it easy to use that?   

cancel
Showing results for 
Search instead for 
Did you mean: