Ask a Question

REGEX in wndCaption

Frequent Contributor

REGEX in wndCaption



how i do regex in wndCaption field in NameMapping??


I have one button with two other title... title1 - Odhlášení and title 2 - Odhlásiť


I need regex to wndCaption for this button title, i used regex OR  Odhlášení|Odhlásiť but TestComplete no find my button 😞


Please help, thank you.



Esteemed Contributor

I'm not sure how regex and NameMapping works together.  Documentation says that they are supported but I can't find examples.

However, instead, since the button could have either title, consider using Conditional NameMapping.

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
Champion Level 3



As Robert wrote, Conditional NameMapping should work.

Or just try "Odhlá*" for wndCaption (without quotes).


If you like to make one more try with regex for NameMapping, try to put this (exactly as provided) for the wndCaption:


P.S. Note, that regex search has significantly lower performance, thus, if you really need it, try to make search depth as short as possible.

  /Alex [Community Champion]
[Community Champions] 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 Champions]
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 Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Showing results for 
Search instead for 
Did you mean: