Name Mapping: Map two of the same objects to name mapping
Hi,
Our software has a dynamic menu. This menu wil l have different tools on it depending on wether the user is on "Standard Tools" or "Maths Tools" for example.
This means that in the object browser if I'm currently on standard tools then the button "BorderContainer("imgBg")" referes to tool x but when I am on maths tools the same name refers to tool y. This means that I can't map both tools in name mapping.
Is there a way around this? Or a way in which TestComplete can auto click these buttons on start up and map these objects with different names?
My hope was to create a script similar to this:
if (BorderContainer("imgBg").Exists) { BorderContainer("imgBg").Click(); } else { BorderContainer("imgBg", 1).Click(); BorderContainer("imgBg", 2).Click(); BorderContainer("imgBg").Click(); }
This would click tool x if it exists or on screen maybe? And if not then it would navigate to the correct tool menu and click tool x. But right now tool x has the same name mapping as tool y so it will always "Exist" or be "OnScreen".
Take a look at the "Conditional mode" button at the bottom of the name mapping dialog where you can "AND" or "OR" object conditions to pass the logic.
Cheers
Lino