AnyWin class.
Returns a list of locator strings for the window.
This functionality is supported only if you are using the Open Agent.
lsLocators = GetLocators()
Variable | Description |
---|---|
lsLocators | The locator strings for the window. LIST OF STRING. |
GetLocators returns complete locator strings even when shortened locators are specified in the window declaration.
Each entry in the list represents the locator of one hierarchy in the hierarchy of the window.
GetLocators is similar to the GetTag function, which returns the complete tag for a window.
[-] window MainWin TestApplication [ ] locator "Test Application" [-] DialogBox CheckBox [-] locator "Check Box" [-] PushButton Exit [ ] locator "Exit" [ ] [ ] ListPrint(TestApplication.CheckBox.Exit.GetLocators()) [ ] //Window[@caption='Test Application'] [ ] //Dialog[@caption='Check Box'] [ ] //PushButton[@caption='Exit']