AnyWin.
Finds all objects specified by the locator or tag in the window declaration.
This function is supported only in scripts that use the Open Agent and dynamic object recognition.
LIST OF WINDOW result = window.ResolveAll ()
Returns all objects that match the locator or tag. As long as no object matches the locator or tag, the agent tries to find an object until the default timeout, which is specified by the option OPT_WINDOW_TIMEOUT, expires. If no object is found an E_WINDOW_NOT_FOUND exception is thrown.
The ResolveAll function returns a handle for each matching object, which is only valid as long as the object in the application exists. For example, a handle to a button on a dialog box is invalid once the dialog box is closed. Any attempts to execute functions on this handle after the dialog box closes will throw an E_WINDOW_INVALIDATED exception. Since it is a common practice to design test cases to be independent of each other and of the order of execution, get new handles for the objects in each test case.
ResolveAll is similar to the FindAll function. ResolveAll uses the locator or tag from the window declaration rather than using an XPath locator as a parameter.
[-] testcase ResolveExamples() [ ] // finds all menuItems [ ] LIST OF WINDOW menuItems = TestApplication.AllMenuItems.ResolveAll() [ ] WINDOW menuItem [-] for each menuItem in menuItems [ ] Print("{menuItem.GetParent().GetCaption()} -> {menuItem.GetCaption()}")