Ask a Question

Reuse desktop objects on different environments

chrisg29
New Contributor

Reuse desktop objects on different environments

I have a desktop application (using Java forms) that runs on different environments. The functionality is the same, but when I try to run the same test, the object that is needed is slightly different.

 

Here is an example:

 

Env1:

Aliases.jp2launcher.Frame.FndFormsEngine.MDIContainer.EwtComponent.ScrollBox.ScrollBox_1.FormDesktopContainer.ExtendedFrame.LWComponent.EwtComponent.FScrollBox.ScrollBox_1.DrawnPanel.FScrollBox.ScrollBox_1.DrawnPanel.textBoxStatus

 

Env2:
Aliases.jp2launcher.Frame3.FndFormsEngine.MDIContainer.EwtComponent.ScrollBox.ScrollBox_1.FormDesktopContainer.ExtendedFrame.LWComponent.EwtComponent.FScrollBox.ScrollBox_1.DrawnPanel.FScrollBox.ScrollBox_1.DrawnPanel.textBoxStatus

 

The only difference seems to be that it finds a different frame when using a different environment. Is there a way that I can make the object reusable on different environments?

 

I'm currently capturing the objects with the object spy.

6 REPLIES 6
Marsha_R
Community Hero

Yes, you can use a wildcard in your alias to allow Frame* to match

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


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

Hi Marhsa,

 

Thanks for the reply.

I had a look at the documentation, but I couldn't figure out how to use a wildcard in my scenario.

 

I've added a screenshot below of the object when I edit it, should I be adding the wildcard somewhere there?

 

chrisg29_0-1624318066175.png

 

Close.  You want to find where that Frame3 (or another one of the frames) is listed in the Properties so you can edit it

 

Marsha_R_0-1624320254133.png

 


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

Do you know which of these properties I'll need to update to use a wildcard?

 

chrisg29_0-1624321296760.png

 

if that first one is the one that varies 

e.g.  JFrame1, JFrame2   etc

then change it to JFrame*


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

Hi,

 

I have doubts as for the AWTComponentAccessibleName property: everything after the 'Oracle Applications - ' substring seems to be environment-specific and I would try to replace it with the '*" wildcard.

I.e. I would set value for the AWTComponentAccessibleName property to 'Oracle Applications - *'.

Also, you may compare mapping for Frame and Frame3 objects and find out the differences between properties' values.

 

 

Regards,
  /Alex [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
================================
cancel
Showing results for 
Search instead for 
Did you mean: