Oracle Forms window with dynamic name - unable to click on subsequent runs

Originally posted by supergajit on April 02, 2026

I have this little beast…

The name of this is:

Aliases.java.bufferedframeOciDev1RemoteSiteTc.windowFormsCashDrawerNumberIs542.buttonbar.ClickItem(“OK”);

The next time I run this test it will be named:

Aliases.java.bufferedframeOciDev1RemoteSiteTc.windowFormsCashDrawerNumberIs543.buttonbar.ClickItem(“OK”);

I have tried several ways of replacing ‘543’ with the var drawerNo, but then the object isn’t found. If I do

var winName = windowFormsCashDrawerNumberIs + drawerNo

The object still can’t be found.

How can I get TC to recognize this window when it’s name changes each time I run the test? I’ve recorded a keyword test several times, converted it to a script (JS) and made adjustments with no luck.

Originally posted by caitlinrich on April 02, 2026

Hi,

You can wildcard the dynamic element in the NameMapping selectors. See documentation for using wildcards in NameMapping here. The Alias can be renamed to remove the number - the alias is meant for the human to read, not TestComplete.

Originally posted by rraghvani on April 03, 2026

Refer to the the name mapping of windowFormsCashDrawerNumberIs543, not the alias name. The property value you have defined, is most likely referencing “…543”. You need to replace the number with a wildcard i.e. asterisk (*) - which will look something like “Cash Drawer Number Is *”