Appium 1.6.5安装

Download and Install Appium 1.6.5 (updated)

September 6,2017 by anish 6 Comments

If you have been working on Appium orhave been actively following Appium updates, then you might be aware that anewer version of Appium was released in October 2016 (Appium v 1.6.0). Thislatest release was an important milestone because it added support for new iOSand Android frameworks and it also introduced support for Windows desktopapplications and You.i TV. In this article, we will provide detailed step bystep guide for Appium installation using which you will be able to download andinstall Appium’s latest version (version 1.6.5 in this case).

The latest version of Appium is Appium1.6.5 (which was released on 26th May 2017). However, you can use this articlefor both Appium 1.6.4 and Appium 1.6.3. The steps would remain the same (thecontent in the screenshots might be bit different based on what version you areusing)

Are you looking for complete Appiumsetup from scratch? Use our step by stepAppium Tutorial to setup all the tools, inspectelements on your mobile app and write your first test script.

Update [01 June, 2017]: Appium 1.6.5 isnow available in GUI form as well. Check out our Appium Desktop app article for details

Before we begin, please note that thisarticle doesn’t cover the entire Appium setup from scratch, using which you canstart automation of your test scripts (the entire setup is covered in our Appium tutorial series, as mentioned in the yellowbox above). This article just covers the download and setup of Appium1.6.3/Appium 1.6.4/Appium 1.6.5 on a Windows machine.

Why download or upgrade to Appium 1.6?

If you are new to Appium and downloadingit for the first time, or if you are already working on some previous versionsof Appium, then you would be wondering why you should switch to the latestversion of Appium rather than sticking with older versions some of which comewith GUIs as well. Well, the most important reason to use the latestversion of Appium is that it supports newer versions of iOS and Android.Appium1.6.5 fixes multiple issues with the previous versions of Appium & supportsiOS 10.3 and Android 7.1 (Nougat). So if your device or emulator uses any ofthese latest versions, then you have to switch to Appium 1.6’s latest version.Other than this, the newer version of Appium provides –

·        XCUITest support for iOS 9.3 and iOS 10

·        UI Automator 2 support for Android

·        support for Windows desktop applications and You.i TV

·        … and many other improvements and bug fixes

Different ways in which you can downloadand setup Appium

A very important thing to keep in mindabout Appium versions is that they come in 2 different flavors – some Appiumversions are GUI based and some are non-GUI based (ie operated from commandprompt). If youhave worked with Appium 1.6.3 or the versions before that, then you would haveobserved that all the Appium versions were not GUI based. Only few Appiumserver versions were GUI based, and to work with the rest of them, you wouldhave had to use command prompt or Node js.

Fortunately, this is not the case anymore. Starting from Appium 1.6.4 beta, all the Appium versions have had a GUIversion well.

Installing Appium 1.6.5/1.6.4 or anyNon-GUI version of Appium

Installation of non-GUI version ofAppium is a 2 step process. The first step is to install Node.JS. The secondstep is to use Node.JS to install Appium.

Let’s have a look at each of these stepsin detail.

Step 1 – Download and Install Node.JS

Follow the steps given below to downloadand install Node.JS. If you have already installed Node.JS, then you can skipthis and move to the next section.

1. Open Node.JS website using this link– https://nodejs.org/

2. Click on the LTS version’s link todownload the latest version.

Note: The screenshots are shown for thelatest version (v6.11.0, as on 28 June 2017). Even if you want to download someother version, please go ahead and do it. The steps given below would remainthe same, even though the screenshot content might change a bit.

3. Click on Save File tosave the msi file on your machine

4. Open the msi file to start theinstallation process

5. Click on Next button, accept the LicenseAgreement, select default values in all the screens to install Node.JS.

6. The installation would proceed as shownbelow. Once its complete, click on Finish button

7. To verify that the installation wassuccessful, open Start menu. You will see a folder for Node.js. Expand thefolder and check that it shows Node.js and Node.js command prompt among otherthings. This shows that your installation is successful

This completes the process of downloadand installation of Node.js. Let’s now check the steps on how to installAppium.

Step 2 – Install Appium using Node.js

Unlike Node.js, we don’t have todownload Appium first to install it. We will just run the command in Node.js,and it will automatically download and install Appium. Let’s see how this isdone –

1. Go to Start menu > My Programs >Node.js folder and open Node.js command prompt.

2. Once you have opened the command prompt,you have to just provide the command to install Appium. There are 2 differentvariations in which you can provide this command –

·        Variation 1 : Install the latest version of Appium– With thisapproach, Node.js will always install the latest version. The command that youcan use for this is –npm install -g appium

·        Variation 2 : Install a specific Appium version – Here, you can install any version ofAppium. To do this you will have to provide the version number of Appiumtogether with the command we mentioned above. Suppose, you want to installversion 1.6.0, then the command that you will use is – npm install [email protected]

Since we will be installing the latestversion of Appium, we will use variation 1

3. In Node.js command prompt, type thiscommand – npm install -g appium and hit Enter

4. Once you hit Enter, you will see thatNode will start installing Appium (you might have to wait a few seconds to seethe actual installation happening). Some screenshots of the installation stepsare given below –

NPM adding few dependencies for Appium…

5. Once the installation is complete, youwill see that command prompt screen as shown in the below screenshot

6. As a last step, to check that Appium(and that too it’s latest version) has been installed, run this command : appium-v

In the above image, you can see thatrunning Appium -v command shows the version number as 1.6.5.This confirms that the latest version of Appium has been successfully installedon your machine.

Starting Appium server from CommandPrompt

Since you have downloaded a non-GUIversion of Appium, the only way you can start the server is through commandprompt. You can either use the default windows command prompt or the Node.jscommand prompt, which we used in the previous section to install Appium.

Once you open command prompt, you cansimply run command – Appium, which will start the Appium server asshown in the below image. Please note that this command starts Appium on thedefault address and port which is 0.0.0.0:4723

If you want to run Appium on a specificserver and port of your choice, then you can provide it with the command like this– appium -a 127.0.0.1 -p 4723. This command starts appium server onaddress 127.0.0.1

Stopping the Appium server

Stopping of the Appium server is a twostep process as mentioned below –

1. In the command prompt window, press thekeys Ctrl and C. This will show the Terminatebatch job(Y/N) message as shown below

2. Press ‘Y’ and then hit enter. This wouldstop the Appium server


This completes the article on downloading and installing non GUI version ofAppium 1.6.x. Let us know if you found this article helpful and the steps easyto understand. Your feedback would help us improve our content and make it moreuseful for all our readers.

Related: If you use the non-GUI version ofAppium, then you would also be interested in learning how you can start andstop Appium server from Java. Have a look at this article for complete details– Start and StopAppium server from Java

From: http://www.automationtestinghub.com/download-and-install-appium-1-6/

猜你喜欢

转载自blog.csdn.net/wb96a1007/article/details/78993966