Ask a Question

Unable to use wild card (*) in Mapped Name.

Azeddin_Margani
Contributor

Unable to use wild card (*) in Mapped Name.

Hi, 

 

Please advise on how to use wild card * on already Mapped Name in TestComplete 14. Example below: 

 

Aliases.browser.pageTest8.buttonCancelled.

 

The value pageTest8 keeps changing. I tried to add  Aliases.browser.pageAtlas*.buttonCancelled but getting red cross against this line. 

 

Many Thanks,

Az.

A.M.
4 REPLIES 4
mattb
Staff

Re: Unable to use wild card (*) in Mapped Name.

Generally we use the wildcard for name mapping properties, not names themselves. 

It seems like we are using a web based application. 

I would recommend adding the wildcard at the page level like you suggested. So in the object repository once we find Page8, I assume it will be something like http://www.google.com/123123 Instead map it as http://www.google.com/* where the * is the dynamic nodes. 

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/inde... 

Best,
Matt

Marsha_R
Community Hero

Re: Unable to use wild card (*) in Mapped Name.

try

Aliases.browser.page*.buttonCancelled

or

Aliases.browser.*.buttonCancelled

Azeddin_Margani
Contributor

Re: Unable to use wild card (*) in Mapped Name.

Hi Matt, 

Below is the MappedName:

Aliases.browser.pageCustomert8.buttonCancelled

The dynamic value that keeps changing is pageCustomert8 . If i use * like below in JavaScript editor. 

Aliases.browser.pageCustomert*.buttonCancelled, I'm getting Unexpected Token * error like below.

 

Azeddin_Margani_2-1634116293204.png

or like

Azeddin_Margani_3-1634116361998.png

 

In previous releases of TestComplete (e.g. 12), i was able to do this but not when using TestComplete 14.18. 

Do i need to declare the use of * somewhere in TestComplete?. Or any suggestion?. 

 

Many Thanks, 

Az.

 

A.M.
Marsha_R
Community Hero

Re: Unable to use wild card (*) in Mapped Name.

Since this worked in previous versions and not in the newer one, this is a good question to ask Support directly.  Here's the link:

https://support.smartbear.com/testcomplete/message

cancel
Showing results for 
Search instead for 
Did you mean: