Appium installation document

  • View
    46

  • Download
    0

Embed Size (px)

Text of Appium installation document

AppiumAppium in windows to run native/web ios/android software automation tests using selenium webdriver. Below given steps will guide you to install appium in windows.Step 1: Install the Java Development Kit (JDK)Step 2: Set Up Java Environment Variable PathStep 3: Install Android Studio on WindowsStep 4: Download and Install NodeJsStep 5: Install Microsoft .net FrameworkStep 6: Download And Install Appium Desktop ClientStep 7: Enabling Developer Mode Options on Android Phone or TabletStep 8: Install PdaNet to Connect with Android DeviceStep 9: Install Eclipse IDE And Set up a ProjectStep 10: Set Up Appium Project in EclipseStep 11: First Appium Test to Launch Amazon App

Step 1: Install the Java Development Kit (JDK)First of all you need to installJDK(Java development kit) in your system.The Java Software Development Kit (Java SDK or JDK) is an application created by Sun Microsystems to create and modify Java programs. So your next question will be How to download Java or JDK.

Install JDKa. Visit theJava downloads page on Oracleswebsite to find theJDK environment download. Scroll down until you findJava SE Latest Versionand downloadJDK.Click on JDK download button as shown in below image.

b. Select the radio button to Accept License Agreement and choose the JDK that corresponds to Windows.

c. The File Download dialog box appears prompting you toSavethe download file.

d. To run the installer, clickRun.

e. The installation process starts. Click theNextbutton to continue the installation.

f. On the next screen you will encounter some options. Just leave these alone and clickNextunless you know what you are doing.

g. After the initial installation is done, a pop up asking you where your source java files will be. You can choose to change where you want to keep your folder but its best to stick with what you were given first. ClickNextto continue.

Note: Make a note of this location, as this location of JDK installation will be required to Set up Java Environment Variableh. Let the installation finish.

i. A few brief dialogs confirm the last steps of the installation process; clickCloseon the last dialog. This will complete Java installation process.

Step 2: Set Up Java Environment Variable PathEnvironmental variables are used by the operating system to save settings (default values, locations of resources) to be used by Windows or by processes launched by users.There are two types of environmental variables: User Variables :Specific to a particular Windows user account System variables :For all the user of the machine

After youve installed the Java Environment Kit (JDK) in Windows, you must set theJAVA_HOMEenvironment variableto point to the JDK installation directory.1) Open theControl Panel -> System or Security > System; the same thing can be done byright-clickingon MyComputerand choosingProperties.

2) Choose Advanced system settings.

3) Under theAdvancedtab Choose the Environment Variable option.

4) SelectNewIn theSystem variables.

5) Define theVariable nameas JAVA_HOME andVariable valueas C:\Program Files\Java\jdk1.8.0_45(for this example JDK version 1.8.0 was installed in C:\Program Files\Java\jdk1.8.0_45 folder; if needed, modify this value to reflect the real location).

Note: Look at the previous chapter Install the Java Development Kit to check the location of the JDK installation.6) Now we need to specify the location in thePATHvariable. ForPATH, most probably it will already exists in your machine. So just select it and choose theEditoption.

7) In the editor add the value ;%JAVA_HOME%\bin or ;C:Program Files\Java\jdk1.8.0_45\bin.

Note: The new values are separated by a semicolon from the existing ones and be careful and do not make any changes in the existing string, as it is a very sensitive information.8) Now go toStartand typecmdin theRunand hitEnter. It will launch theCommand Prompt. Type java -version, it will display the following information.

Step 3: Install Android Studio on WindowsAndroid Studio is Google's officially supported IDE for developing Android apps.Android Studio is freely available under Apache License 2.0. The most recent stable version is 2.1.1 .1. Navigate to the Android Studio Download to download Android Studio. If you are new to installing Android Studio on windows, you will find a file, which is named asandroid-studio-bundle-143.3101438-windows.exe.So just download and run on windows machine according to android studio wizard guideline.2. Launch the downloaded Android Studio.exe

3. Once you launched Android Studio, its time to mention JDK7 path or later version in android studio installer.

4. Below the image initiating JDK to android SDK

5. Need to check the components, which are required to create applications, below the image has selectedAndroid Studio,Android SDK,Android Virtual Machineandperformance (Intel chip).

6. Need to specify the location of local machine path for Android studio and Android SDK

7. Need to specify the ram space for Android emulator by default it would take 512MB of local machine RAM.

8. At final stage, it would extract SDK packages into our local machine, it would take a while time to finish the task and would take 2626MB of Hard disk space.

9. After done all above steps perfectly, you must get finish button and it gonna be open android studio project with Welcome to android studio message as shown below

Step 4: Download and Install NodeJs.Appium is an HTTP server written in node.js which creates and handles multiple WebDriver sessions for different platforms like iOS and Android. Automating hybrid and native mobile applications for Android and iOS is a key function handled by Appium, a node.js server. One of the core tenets of Appium is that test codes can be written in any framework or language like Ruby on Rails, C# and Java without having to modify the apps for automation purposes. The interaction between node.js server and Selenium client libraries is what ultimately works together with the mobile application.

I. Visit theNode.JSwebsite to downloadNode.JS. Scroll down little bitto find the correct installer for your OS version.

II. The File Download dialog box appears prompting you toSavethe download file.

III. Once the downloading is complete,double clickthe file to begin the installation ofNode.JS.

IV. To run the installer, clickRun.

V. The installation process starts. Click theNextbutton to continue the installation.

VI. Select the radio button to Accept the terms in the License Agreement andclickonNextto proceed.

VII. During the initial installation, window will ask you where you want to install the files. You can choose to change where you want to keep your folder but its best to stick with what you were given first. ClickNextto continue.

VIII. On the next screen you will encounter some options. Just leave these alone and clickNextunless you know what you are doing.

IX. Click onNextto start the main installation.

X. Let the installation finish and now take the last steps of the installation process; clickCloseon the last dialog. This will complete Java installation process.

Step 5: Install Microsoft .net Framework1) To Install Microsoft .net Framework, visit theMicrosoft Download Centerwebsite to find the.Net Frameworkdownload.

2) Ignore suggestions andclickon No Thanks and Continue.

3) The File Download dialog box appears prompting you toSavethe download file.

4) Once the downloading is complete,double clickthe file to begin the installation of.Net Framework.

5) To run the installer, clickRun.

6) AcceptstheLicence termsand continue with the installation.

7) This will take few minutes to complete as per the speed of your system. Once done,clickonFinish.

Step 6: Download And Install Appium Desktop Client1) Visit theAppium Downloadpage to install theAppium Desktop client.ClickonAppium.exe for Windowsto download the .exe file forAppium.

2) Go with the latest version ofAppium.

Note:As of 6th June15, the latest version is 1.4

3) The File Download dialog box appears prompting you toSavetheZipfile.

4) Unzipthe Zip file andextracttheAppiumfolder on the same location to access the .exe file.Double clickon theAppiumfolder.

5) Double clickthe Appium Installerto start the installation process. A pop up window will display to select the appropriatelanguage. Leave it as it is and click onOK.

6) The installation process starts. Click theNextbutton to continue the installation.

After the initial installation is done, window will ask you where you want to install theAppium. You can choose to change where you want to keep your folder but its best to stick with what you were given first. ClickNextto continue.

7) Leave this as it is and clickNext.

8) If you wish to have a shortcut desktop icon for Appium, select the option for Create a desktop icon andclickNext.

9) ClickonInstallto initiate the final installation.

10) Selectthe check box forLaunch Appiumand click onFinish.

11) Appiumwill open up, once the installation is finished with the below message.

Note:I will suggest you to restart you machine now, or wait for next installation of Eclipse but make sure you restart your machine before the running the first test.

Step 7: Enabling Developer Mode Options on Android Phone or TabletEnabling Developer Mode Options on Android Phone or TabletThis is two step process , first step is toEnabling Developer Mode Options on Android Phone or Tabletand second is toSwitch On the USB Debuggingof the device. Lets see how to do both of the activities in the below tutorial.Enable Developer Opti