GUI: Web Switch Window
Description
GUI: Web Switch Windowstep is useful when you want to switch between multiple browser windows in Web GUI automation. This basically gives the handle of desired window to perform further activity on that window.
Note
Switch window step is mostly not required when workflow is recorded using spy or recorder. It will be needed if we drag and drop step to workflow. This step can be used if and only if required.
Configurations
| No. | Field Name | Description |
|---|---|---|
| 1 | Step Name | Name of the step. This name has to be unique in a single workflow.The data type is String and the field is mandatory. |
| 2 | Web Browser Name | Select any one Web Browser Name from the given list. Note: Select the same Web Browser Name which was selected in Start Browser Step. |
| 3 | Switching Options | Select option from list to switch between windows: - Window List. - URL. - Element. Index Notes: Value Field is enabled for Window Title ,URL and Index. Criteria, Criteria Value, Element Index and Iframe Indices are enabled for Element option. For detail understanding on switching options, see Switching Options table. The field is mandatory. |
| 4 | Value | Relevant value for the specified Switching option. |
| 5 | Criteria | ‘Criteria’ is the criterion to locate elements on Web GUI. GUI Spy can capture it in the Generate Step dialog. Upon Step Generation, it is populated in the step configuration. You may change criteria by choosing from the drop-down list in the ‘Step Generation’ window or step configuration. |
| 6 | Criteria Value | Relevant criteria value has to be specified. |
| 7 | Element Index(Starts with 0) | Specify the index of the element you want to locate. Note: One can also specify First or Last. First, if you want the first element from the located element or specify Last if you want the last element.Default Value: 0. |
| 8 | Iframe Indices | Specify Iframe Indices value. Specifying iframe indices ensures that the target element is identified correctly within the nested frame structure. You can provide comma-separated values.For e.g. 0,1,2. |
| 9 | Iframe Xpath | Iframe Xpath is a uniquely generated path that represents the location of an <iframe> or <frame> relative to the top-level window. Iframe Xpath identifies each frame using a unique attribute such as id, name, or title if available, for example, iframe[@id='mainFrame']. If no such attributes exist, the frame is identified by its position among sibling frames, like iframe[2] for the second iframe. For nested structures, each frame is joined in sequence to form a full path. For example, if an element is inside an iframe[@id='outer'], which contains a frameset with a frame[@name='middle'], and that frame contains iframe[@title='inner'], the generated path would be: iframe[@id='outer'];frame[@name='middle'];iframe[@title='inner']. Note: If an iframe or frame has no id, name, or title, its origin (i.e., the src URL) will be used as a fallback in the path for unique identification. For example: iframe[@origin='https://example.com']. |
| 10 | Frame ID | Provide the current Iframe Id to target a specific iframe to perform the action. Default Value: frameID |
Switching Options
The following table contains the description of each switching option:
| No. | Field Name | Description |
|---|---|---|
| 1 | Window Title | Option can be used when window title is known. |
| 2 | URL | If there are multiple windows or tabs open in the browser with different URLs and you need to navigate to the window having specific URL. Specify URL in the value field. |
| 3 | Element | Tries to find the specified element in all open browser windows and stops on the window where this element is found. Criteria to locate element can be specified using criteria and value field. |
| 4 | Index | Use to switch the window base on the window index number provided. Note: Specify window index in number, for example, 0,1,2, … in Value. |