Skip to main content

Web Switch Window

Description

The Web Switch Window step is useful when you want to switch between multiple browser windows in Legacy Web GUI. This basically gives the handle of desired window to perform further activity on that window.

Configurations

Field NameDescription
Web Browser NameYou can select any one Web Browser Name from the given list. Basically, you must select the same Web Browser Name which was selected in Start Browser Step.
Switching options*Options to switch window.
Criteria*Locate element on web page. By default, this field will be disabled and will be enabled only when Element is selected as a switching option.
ValueRelevant value for the specified Switching option.
Clear text before set?Select Yes if you want to remove previously set value in the element you have located and No, if you want to append the text in the element.

*Switching Options The following table contains the description of each switching option:

Field NameDescription
Window TitleOption can be used when window title is known.
ElementTries 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.
URLIf 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.
IndexEvery window open in the browser has the index starting from zero you can switch to any window using this index.

*Criteria The table below contains the description of criteria.

No.Field NameDescription
1XpathXpath defines the hierarchy of the tags through which you can reach to a particular element. For example
/html/body/div[1]/div/div[3]/div[2]/div/div[2]/div/div/div[2]/div[2]/div[1]/div[1]/div[1]/span/span
2IdId attribute of a web element can be best way to identify an element if it is present and is going to constant and unique. There are cases however when it is either absent or its value changes every time you access the application in the browser
3NameName is another attribute of a web element which can be used to identify an element.
4Link TextIf a HTML page contains a hyperlink element <a href=www.google.com>Search On Google</a>, you can identify this href element by providing complete text ‘Search On Google’ as the Link value.
5Partial Link textThis criterion is same as Link, just that, in this case, you can give partial string for finding a match.
6Tag NameEvery HTML element has a tag associated with it. The element can be located using that tag name. For example, textbox has a tag <input>.
7Class NameClass name is the css class associated with an HTML element. If there is a div element <div class=’someclass’>MyDiv</div>, you can locate it by giving class name ‘someclass’.
8Css SelectorThis criterion is useful when an HTML element has multiple associated css classes. Consider an HTML element <div class="btn primary-btn submit"></div>. To identify this div element you can use Css selector as “.btn.primary-btn.submit”