selectWindow (UI Automation - Navigation)
- Purpose
Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window. To select the main window again, use null as the target. Window locators provide different ways of specifying the window object: by title, by internal JavaScript "name," or by JavaScript variable.
- Syntax
-
selectWindow(windowID)
- Target
-
windowID - the JavaScript window ID of the window to select.
Window ID here refers to the sequence of the windows that are opened during test execution where '-1' represents the first window where the test execution has started. Rest of the windows are marked as '0, 1, 2, 3, ....., n' sequentially. (Ex: index=5)
Windows can be selected based on the name. These names are assigned based on the value(s) in the value field of the 'openWindow' command. (Ex: name=customName)
Windows can also be selected using the title of the tab. (Ex: title=Worksoft SaaS : Test Run)
- Value
-
N/A
- Return Value
- N/A