Setting up Appium for testing mobile applications

Before we start testing mobile apps with Appium, we need to download and install Appium. We will use the GUI version of Appium. If you wish to run tests for iOS on iPhone or iPad, you need to install and set up Appium on a Mac OS X machine. To test Android applications, you can set up the test environment on a Windows or Linux machine. Setting up Appium is fairly easy with the new Appium App for Mac OS X.

Note

In addition to the GUI version, you can also install the Appium server, which runs with Node.js.

How to do it...

You can download the latest Appium binaries from http://appium.io/. Click on the Download Appium button on the front page. It will download the version based on your choice of operating system:

How to do it...

In the following examples, we will be using Appium on Mac OS X:

  1. You can install Appium on a Mac by launching the installer and copying Appium to the applications folder.

    When you launch Appium from the applications for the first time, it will ask for an authorization to run the iOS simulators.

    Tip

    By default, Appium starts at http://127.0.0.1:4723 or localhost. This is the URL to which your test should direct the test commands. We will be testing a mobile version of the sample application that we used in the book on the iPhone Safari browser.

  2. On the Appium main window, click on the Apple icon to open iOS Settings, as shown in the following screenshot:
    How to do it...
  3. On the iOS Settings dialog, select the Force Device checkbox and specify (iPhone 4s) in the iOS section. Also, select the Use Mobile Safari checkbox, as shown in the following screenshot:
    How to do it...
  4. Click on the Launch button in the Appium window to start the Appium server.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.31.239