Skip to main content

Web Switch Frame

Description

Web Switch Frame changes the browser's focus to a different HTML frame or iframe on the web page in a Web GUI [Classic] workflow. Use this step when the elements you need to interact with are inside a frame and are not accessible from the default page context. You can locate the target frame by its Name, ID, Index, or by specifying an Element inside it. The step also provides Default (return to the outermost page context) and Parent (move up one frame level) options for navigating back out of nested frame structures.

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.
Criteria*Locate element on web page.
Criteria valueRelevant criteria value must be specified.
TextHere you can specify the text you want to enter into the element you have located.
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.

*Locate By The following table contains the description of each Locate By option:

Field NameDescription
DefaultNavigate to default context of the page i.e. outer most region of web page.
ParentNavigate to parent frame.
NameSpecify name of the frame to switch to.
IdSpecify id of the frame to switch to.
ElementSwitch to frame where element of specific criteria is present.
IndexIndex of the frame you want to switch to.

*Criteria The table below contains the description of criteria.

Field NameDescription
XpathXpath 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
IdId 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
NameName is another attribute of a web element which can be used to identify an element.
Link 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.
Partial Link textThis criterion is same as Link, just that, in this case, you can give partial string for finding a match.
Tag 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>.
Class 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’.
Css 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”