1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[13652],{20801:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"manage-projects/set-up-projects/mobile-testing/android/mobile-set-up-android-real-devices","title":"[Mobile] Set up Android real devices","description":"This article shows you how to set up real Android devices to test Android applications with Katalon Studio.","source":"@site/docs/katalon-studio/manage-projects/set-up-projects/mobile-testing/android/mobile-set-up-android-real-devices.md","sourceDirName":"manage-projects/set-up-projects/mobile-testing/android","slug":"/manage-projects/set-up-projects/mobile-testing/android/mobile-set-up-android-real-devices","permalink":"/katalon-studio/manage-projects/set-up-projects/mobile-testing/android/mobile-set-up-android-real-devices","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1785926056000,"frontMatter":{"title":"[Mobile] Set up Android real devices"},"sidebar":"katalon-studio","previous":{"title":"Testing Web App on Mobile Browsers in Katalon Studio","permalink":"/katalon-studio/manage-projects/set-up-projects/mobile-testing/testing-web-app-on-mobile-browsers-in-katalon-studio"},"next":{"title":"[Mobile] Configure Android Emulator","permalink":"/katalon-studio/manage-projects/set-up-projects/mobile-testing/android/mobile-configure-android-emulator"}}');var t=o(74848),s=o(28453);o(86025);const r={title:"[Mobile] Set up Android real devices"},l=void 0,a={},d=[{value:"1. Install Appium",id:"1-install-appium",level:2},{value:"2. Set up the device",id:"2-set-up-the-device",level:2},{value:"3. Verify successful Android devices connection",id:"3-verify-successful-android-devices-connection",level:2},{value:"Next step",id:"next-step",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"This article shows you how to set up real Android devices to test Android applications with Katalon Studio."}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["For mobile testing with Android Studio Emulator, refer to this document: ",(0,t.jsx)(n.a,{href:"/katalon-studio/manage-projects/set-up-projects/mobile-testing/android/mobile-configure-android-emulator",children:"[Mobile] Configure Android Studio (Emulator)"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"1-install-appium",children:"1. Install Appium"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Download and install the suitable version of Node.js for your system from the Node.js website: ",(0,t.jsx)(n.a,{href:"https://nodejs.org/en/download/",children:"Downloads"}),". Make sure you install Node.js into a location where you have full ",(0,t.jsx)(n.code,{children:"Read/Write"})," permissions."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Install Appium 3 and the Appium UiAutomator2 Driver (v7.0.0+) with the following commands in the Terminal:"}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-jsx",children:"npm i --location=global [email protected]\nappium driver install [email protected]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Some emulators come with Appium installed. If you want to run an application on an emulator, check your emulator settings before installing Appium."}),"\n",(0,t.jsx)(n.admonition,{title:"For Linux machine",type:"note",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["If you see an ",(0,t.jsx)(n.code,{children:"EACCES error"})," with the Appium installation command, follow the instructions of npm documentation here: ",(0,t.jsx)(n.a,{href:"https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally",children:"Resolving EACCES permissions errors when installing packages globally"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["If you encounter an error where the Java ",(0,t.jsx)(n.code,{children:"jar"})," file can't be found, you might need to add the environment variable: ",(0,t.jsx)(n.code,{children:"KATALON_JAVA_HOME= <JRE_location>"}),". See related discussion on Ask Ubuntu: ",(0,t.jsx)(n.a,{href:"https://askubuntu.com/questions/175514/how-to-set-java-home-for-java?utm_medim=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa",children:"How to set JAVA_HOME for Java?"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Set the Appium directory manually in Katalon Studio Preferences. The default directory should be ",(0,t.jsx)(n.code,{children:"/u
1sr/lib/node_modules/appium/"}),"."]}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"2-set-up-the-device",children:"2. Set up the device"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings > Developer options"})," to turn on developer mode on your Android device."]}),"\n",(0,t.jsx)(n.p,{children:"On a Windows machine, you also need to enable the following settings:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"USB debugging"})," \u2013 Debug mode when USB is connected."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Install via USB"})," \u2013 Allow installing apps via USB.USB debugging"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"(Security Setting)"})," \u2013 Allow granting permissions and simulating input via USB debugging."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Connect your Android phones to your computer via a USB cable and confirm to accept or trust the device."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Install Android SDK."}),"\n",(0,t.jsx)(n.p,{children:"Katalon Studio will automatically detect and ask you to install Android SDK if your current machine does not have it."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"3-verify-successful-android-devices-connection",children:"3. Verify successful Android devices connection"}),"\n",(0,t.jsx)(n.p,{children:"After completing setting up your environment, to check whether Katalon successfully recognizes your Android devices, open a sample Android project in File > New Sample Project."}),"\n",(0,t.jsx)("img",{alt:"Open Android sample project",src:"https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/mobile-on-macos/KS-Android-Open--Sample-project.png",width:"600"}),"\n",(0,t.jsx)(n.p,{children:"On the main toolbar, open the dropdown list next to Run and select the Android device."}),"\n",(0,t.jsx)("img",{alt:"selecting android device in Katalon Studio",src:"/13c3c680-9b15-11ee-b8c3-0242c7a41fd4/ks-toolbar-Android.png",width:"200"}),"\n",(0,t.jsx)(n.p,{children:"You should see the name of your Android device in a pop-up dialog."}),"\n",(0,t.jsx)("img",{alt:"Katalon recognizes Android devices",src:"https://github.com/katalon-studio/docs-images/raw/master/katalon-studio/docs/mobile-on-macos/device.png",width:"500"}),"\n",(0,t.jsx)(n.h3,{id:"next-step",children:"Next step"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{href:"/katalon-studio/get-started/sample-projects/mobile/mobile-create-and-run-android-test-case-in-katalon-studio",children:"Create your first Android test case"})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>l});var i=o(96540);const t={},s=i.createContext(t);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]);
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.