Forum Discussion
Hi,
You can
1) map Your objects, then edit the mapping and replace the window Id by an asterisk ("*")
2) just map the parent window (also use the asterisk), and save the control object into a variable.
To access the sub-objects, use customer-defined script routines, to which You hand in the parent variable.
In the routine, navigate to Your Button and hand it back.
Regards,
Manfred
- tristaanogre6 years agoEsteemed Contributor
You can also utilize "Extended Find" to bypass that Window entirely in your NameMapping.
- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
Hi meenakshiyadav1,
Did you resolve your question?
Here are my 2 cents:
You can watch this short video explaining possible options:
https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/
Also, I've found great suggestions from irina_lukina:
Below, are several approaches that you can use in this case:
tristaanogre1. Use wildcards inside the target grid name. For instance, if your grid may have the following names: Grid1, Grid2, and so on, you can use the following mask for the window name - Grid*.
tristaanogreFor more information, please refer to the Using Wildcards help topic.
tristaanogre2. Use the Find method to find the target window not by this name, but by the values of its properties.
tristaanogre3. Use wildcards in your name mapping scheme to map the window with the dynamic name. For more information, please refer to the Using Wildcards in Name Mapping help topic.
- meenakshiyadav16 years agoContributor
Thanks a lot tristaanogre . This has resolved my issue for many objects but for few of them I am still facing issue as these object do not have enough properties to be able to get recognized uniqly. So when I skip dynamic parent and map these object to closeset stable parant they do not get recognized.
- Manfred_F6 years agoRegular Contributor
hi,
some more hints:
If You use asterisks in mapping conditions, and You get an error that criteria was not unique, this may have 2 causes:
1) there are several controls visible on the screen (= You can see them) which fulfil the criteria
2) there is only one control visible on the screen, but one or more invisible ones are also there. This occurs if Your application leaves controls not needed anymore in the tree for a while and just sets them invisible - as mine does. In this case, try adding condition "Visible = true" to the mapping. In the object browser, You can activate/deactivate the depiction of invisible objects.
You can also have a look at the help topic for the RefreshMappingInfo Method.
- meenakshiyadav16 years agoContributor
Thanks a lot Manfred_F for taking time out to reply.Solution one is not working for me as I keep on getting a message that this does provide a unique maping criteria.
Can you please elaborate a little more (with an example if possible) on solution 2 .
Thanks in advance!!
Regarads,
Meenakshi
Related Content
- 5 years ago
- 5 years ago
Recent Discussions
- 5 days ago
- 5 days ago