1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[4619],{28453:(e,t,a)=>{a.d(t,{R:()=>n,x:()=>r});var o=a(96540);const s={},i=o.createContext(s);function n(e){const t=o.useContext(i);return o.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(s):e.components||s:n(e.components),o.createElement(i.Provider,{value:t},e.children)}},34264:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"keywords/keyword-description-in-katalon-studio/mobile-keywords/mobile-switch-to-native","title":"[Mobile] Switch To Native","description":"Description","source":"@site/docs/katalon-studio/keywords/keyword-description-in-katalon-studio/mobile-keywords/mobile-switch-to-native.md","sourceDirName":"keywords/keyword-description-in-katalon-studio/mobile-keywords","slug":"/keywords/keyword-description-in-katalon-studio/mobile-keywords/mobile-switch-to-native","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/mobile-keywords/mobile-switch-to-native","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1758935351000,"frontMatter":{"title":"[Mobile] Switch To Native"},"sidebar":"katalon-studio","previous":{"title":"[Mobile] Switch To Landscape","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/mobile-keywords/mobile-switch-to-landscape"},"next":{"title":"[Mobile] Switch To Portrait","permalink":"/katalon-studio/keywords/keyword-description-in-katalon-studio/mobile-keywords/mobile-switch-to-portrait"}}');var s=a(74848),i=a(28453),n=a(86025);const r={title:"[Mobile] Switch To Native"},c=void 0,d={},l=[{value:'<a class="anchor_top_offset"></a>Description',id:"description",level:2},{value:'<a class="anchor_top_offset"></a>Parameters',id:"parameters",level:2},{value:'<a class="anchor_top_offset"></a>Example',id:"example",level:2}];function _(e){const t={h2:"h2",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.h2,{id:"description",children:[(0,s.jsx)("a",{id:"id_0__id_1",class:"anchor_top_offset"}),"Description"]}),"\n",(0,s.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"Switch the current device driver to native context."}),"\n",(0,s.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["Keyword name: ",(0,s.jsx)("code",{className:"ph codeph",children:"Mobile.switchToNative"})]}),"\n",(0,s.jsxs)(t.h2,{id:"parameters",children:[(0,s.jsx)("a",{id:"id_0__id_2",class:"anchor_top_offset"}),"Parameters"]}),"\n",(0,s.jsxs)("table",{xmlns:"http://www.w3.org/1999/xhtml",className:"table anchor_top_offset",id:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d",children:[(0,s.jsx)("caption",{}),(0,s.jsx)("thead",{className:"thead",children:(0,s.jsxs)("tr",{className:!0,children:[(0,s.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__1",children:"Param"}),(0,s.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__2",children:"Param Type"}),(0,s.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__3",children:"Required"}),(0,s.jsx)("th",{className:"entry anchor_top_offset",id:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__4",children:"Description"})]})}),(0,s.jsx)("tbody",{className:"tbody",children:(0,s.jsxs)("tr",{className:!0,children:[(0,s.jsx)("td",{className:"entry",headers:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__1 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__2 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__3 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__4 ",children:"flowControl"}),(0,s.jsx)("td",{className:"entry",headers:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__1 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__2 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__3 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__4 ",children:"FailureHandling"}),(0,s.jsx)("td",{className:"entry",headers:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__1 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__2 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__3 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__4 ",children:"Optional"}),(0,s.jsxs)("td",{className:"entry",headers:"id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__1 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__2 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__3 id_0__0068ea2a-75d2-455b-9593-0ee75575111d__entry__4 ",children:["Specify ",(0,s.jsx)("a",{className:"xref",href:"/katalon-studio/maintain-tests/configure-failure-handling-settings-in-katalon-studio",children:"failure handling"})," schema to determine whether the execution should be allowed to continue or stop."]})]})})]}),"\n",(0,s.jsxs)(t.h2,{id:"example",children:[(0,s.jsx)("a",{id:"id_0__id_3",class:"anchor_top_offset"}),"Example"]}),"\n",(0,s.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"You want to switch the current device driver to native context:"}),"\n",(0,s.jsxs)("ul",{xmlns:"http://www.w3.org/1999/xhtml",className:"ul",children:[(0,s.jsxs)("li",{className:"li",children:[(0,s.jsx)("p",{className:"p",children:"Manual view "}),(0,s.jsxs)("p",{className:"p",children:[(0,s.jsx)("img",{className:"image",src:(0,n.Ay)("https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/mobile-switch-to-native/image2017-3-3-143A433A55.png")}),(0,s.jsx)("br",{}),(0,s.jsx)("br",{})]})]}),(0,s.jsxs)("li",{className:"li",children:[(0,s.jsx)("p",{className:"p",children:"Script view "}),(0,s.jsx)("pre",{className:"pre codeblock",children:(0,s.jsxs)("code",{children:["import static com.kms.katalon.core.checkpoint.CheckpointFactory.findC
1heckpoint","\n","import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase","\n","import static com.kms.katalon.core.testdata.TestDataFactory.findTestData","\n","import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject","\n","import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint","\n","import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory","\n","import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords","\n","import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile","\n","import com.kms.katalon.core.model.FailureHandling as FailureHandling","\n","import com.kms.katalon.core.testcase.TestCase as TestCase","\n","import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory","\n","import com.kms.katalon.core.testdata.TestData as TestData","\n","import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory","\n","import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository","\n","import com.kms.katalon.core.testobject.TestObject as TestObject","\n","import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords","\n","import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS","\n","import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords","\n","import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI","\n","import internal.GlobalVariable as GlobalVariable","\n","\n","'Start application on current selected android device'","\n","Mobile.startApplication(GlobalVariable.G_AndroidApp, false)","\n","\n","'Switch the current device to native context'","\n","Mobile.switchToNative()","\n","\n","'Close application on current selected android device'","\n","Mobile.closeApplication()","\n","\n"]})})]})]})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(_,{...e})}):_(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.