Ask a Question

Dynamic Page localhost

butoy07
Occasional Contributor

Dynamic Page localhost

I'm automating the mobile application using Record and Play and I observe that I encountered an error every time I rerun the application.

 

I always got an error  The object "formMiddle_Name_" does not exist.

 

Upon investigation I observe that every time I run the application, the number in page local host was changing(Please see the red font of the object)

 

This is my actual Object:

Aliases.Device.Process_allianzpnblife_azjourney.RootLayout.WebView_orgapachecordovaengineSystem.Page_localhostcreateeditlead9bad9.formMiddle_Name_.formMiddle_Name_

 

Please help me to solve this problem. Thank you!

4 REPLIES 4
Marsha_R
Champion Level 3

Wildcards will help you out

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

 

You can edit your test in the place where the number is changing so it will accept all numbers there instead of just the one you recorded.

butoy07
Occasional Contributor

Hello,

 

When I change page localhost to "*" I encountered an error again. Please see my screenshot.

 

butoy07_2-1636074792746.png

 

 

 

Marsha_R
Champion Level 3

try

Aliases.Device.Process_allianzpnblife_azjourney.RootLayout.WebView_orgapachecordovaengineSystem.Page_localhostcreateeditlead*.formMiddle_Name_.formMiddle_Name_

ebarbera
Staff

Hello @butoy07 - 

 

You would have to add the wildcard in the NameMapping section instead of in the aliases.

 

ebarbera_0-1639169127028.png

 

 

Please take a look at this page for more information on working with NameMapping properties: https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/basi...

 

Thanks, 

 

Emma

cancel
Showing results for 
Search instead for 
Did you mean: