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
Community Hero

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.


Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
butoy07
Occasional Contributor

Hello,

 

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

 

butoy07_2-1636074792746.png

 

 

 

try

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


Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
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: