Forum Discussion
How about now?
Yup, as I suspected... all your control objects are present all the time, regardless of how you navigated. So, your best bet is to map each one individually. As for your problem you need to solve, I'd solve that with code, specifically, using WaitAliasChild:
function clickHomeButton(navigationSourceControl){ var navigationRoot; navigationRoot = Aliases.QuickDesign_ConfigurationManager.BreadScrumpTree.WaitAliasChild(navigationSourceControl, -1); navigationRoot.HomeButton.Click(); }
The parameter you pass in is a string that corresponds to the control name (NavigationControl, AutomationBindingControl, etc). Now, I'm making assumption that the HomeButton is mapped as a direct child of the control object but this is how I would go about solving your problem. Regardless of where you come from, call this function and pass in the desired string and you'll get your button click.
EDIT: An alternative to using WaitAliasChild (since you're not really waiting for anything) is to use bracket notation... something like
function clickHomeButton(navigationSourceControl){ var navigationRoot; navigationRoot = Aliases.QuickDesign_ConfigurationManager.BreadScrumpTree[navigationSourceControl]; navigationRoot.HomeButton.Click(); }
While it's JavaScript code, one "trick" of the implementation in TestComplete is that you can interchange the bracket notation with the dot notation to be able to achieve effects like this.
Related Content
- 3 years agoenriquebravo
- 12 years agoTESTUS
- 5 years agohrothrock
Recent Discussions
- 8 hours agoSvetaG