PageSourceSearch

https://docs-production-katalon.netlify.app/assets/js/e8b393c5.5e342973.js

js docs-production-katalon.netlify.app collected 2026-10-03 10:43:00 UTC 6,037 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[12437],{28453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>r});var n=o(96540);const i={},s=n.createContext(i);function a(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(s.Provider,{value:t},e.children)}},63366:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>w,frontMatter:()=>a,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-switch-to-window-index","title":"[WebUI] Switch To Window Index","description":"Description","source":"@site/docs/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-switch-to-window-index.md","sourceDirName":"keywords/keyword-description-in-katalon-studio/web-ui-keywords","slug":"/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-switch-to-window-index","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-switch-to-window-index","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1750151284000,"frontMatter":{"title":"[WebUI] Switch To Window Index"},"sidebar":"katalon-studio","previous":{"title":"[WebUI] Switch To Frame","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-switch-to-frame"},"next":{"title":"[WebUI] Switch To Window Title","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/web-ui-keywords/webui-switch-to-window-title"}}');var i=o(74848),s=o(28453);const a={title:"[WebUI] Switch To Window Index"},r=void 0,d={},c=[{value:"Description",id:"description",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Example",id:"example",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"description",children:"Description"}),"\n",(0,i.jsx)(t.p,{children:"Switch to the window with given index."}),"\n",(0,i.jsxs)(t.p,{children:["Keyword name:\xa0",(0,i.jsx)(t.code,{children:"switchToWindowIndex"})]}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsx)(t.p,{children:"Window index is counted by order of window's appearance and starts from 0. After switching, window index does not change: the first window still has index 0, the second window still has index 1 and so on."})}),"\n",(0,i.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:(0,i.jsx)(t.strong,{children:"Parameter"})}),(0,i.jsx)(t.th,{children:(0,i.jsx)(t.strong,{children:"Parameter Type"})}),(0,i.jsx)(t.th,{children:(0,i.jsx)(t.strong,{children:"Required"})}),(0,i.jsx)(t.th,{children:(0,i.jsx)(t.strong,{children:"Description"})})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"index"}),(0,i.jsx)(t.td,{children:"int"}),(0,i.jsx)(t.td,{children:"Yes"}),(0,i.jsx)(t.td,{children:"The index of the window to switch to, the index is a 0-based number."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"flowControl"}),(0,i.jsx)(t.td,{children:"FailureHandling"}),(0,i.jsx)(t.td,{children:"Optional"}),(0,i.jsxs)(t.td,{children:["Specify\xa0",(0,i.jsx)(t.a,{href:"https://docs.katalon.com/katalon-studio/maintain-tests/configure-failure-handling-settings-in-katalon-studio",children:"failure handling"}),"\xa0schema to determine whether the execution should be allowed to continue or stop."]})]})]})]}),"\n",(0,i.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,i.jsx)(t.p,{children:"You want to switch to the second window (Index 1):"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-jsx",children:"import static com.kms.katalon.core.checkpoint.CheckpointFactory.findC
1heckpoint\nimport static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase\nimport static com.kms.katalon.core.testdata.TestDataFactory.findTestData\nimport static com.kms.katalon.core.testobject.ObjectRepository.findTestObject\nimport com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint\nimport com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory\nimport com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords\nimport com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile\nimport com.kms.katalon.core.model.FailureHandling as FailureHandling\nimport com.kms.katalon.core.testcase.TestCase as TestCase\nimport com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory\nimport com.kms.katalon.core.testdata.TestData as TestData\nimport com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory\nimport com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository\nimport com.kms.katalon.core.testobject.TestObject as TestObject\nimport com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords\nimport com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS\nimport com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords\nimport com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI\nimport internal.GlobalVariable as GlobalVariable\n\n'Open browser and navigate to website katalon.com'\nWebUI.openBrowser('https://www.katalon.com/')\n\n'Click on Documentation to open another window'\nWebUI.click(findTestObject('Page_Katalon Studio/a_Documentation'))\n\n'Switch to Documentation window'\nWebUI.switchToWindowIndex(1)\n\n'Close browser'\nWebUI.closeBrowser()\n"})})]})}function w(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.