Setting Up and Configuring for Android Devices via Command Prompt

Modified on Tue, 27 Aug at 6:38 PM

Applicable to the Java Appium Framework for mobile automation on Android devices using Java.


TABLE OF CONTENTS

1. Overview

2. Prerequisite

3. Setting Up and Configuring Appium Server and Driver

1. Overview

This article provides you the details to set up Android devices via command prompt.

2. Prerequisite

You must install the latest version of Java and Maven. To download Java and Maven, click here. Make sure you set the environment variables and path.

3. Setting Up and Configuring Appium Server and Driver

Perform the following:

  1. Install Node.js: Node.js is a JavaScript runtime that is required to run Appium. Download the appropriate Node.js installer from nodejs.org. Run the installer and follow the prompts to install Node.js. After installation, open a command prompt and check if Node.js is installed by running node -v to see the installed version.

  2. Install Appium: To install Appium using npm, run the following command:
    npm install -g appium
    This command will install Appium on your system, allowing you to use the appium command to start the Appium server.
    After the installing Appium, you need to verify the Appium version by running the following command:
    appium -v
    
    Following image will be displayed with the appropriate version:
    
    
  3. Run the following command to install Appium installer: 
    npm install -g appium-installer
    This command will download and install the necessary dependencies for running Appium, such as the Appium server and various drivers for different platforms.

  4. Run the following command to display the appium installer packages:
    appium-installer
    The following screen will be displayed. In this screen, navigate to Install Appium Server option.

    When you select Install Appium Server, following screen is displayed and select latest server version and press Enter. Appium Server will be installed.
  5. Select the Install Appium Driver option to view multiple drivers.

    The following screen will be displayed. Select uiautomator2 option by pressing Spacebar and then Enter to indicate that this is selected and installed on your system.

  6. Run the Appium Doctor by selecting the Run Appium Doctor option and then select the android option for the platform. Appium Doctor will check your system for all the necessary dependencies required for Appium to run successfully with Android.

    Once Appium Doctor completes its checks, it will display a summary of the results, indicating whether your system meets the requirements for running Appium with Android.
    Note: The tick mark indicates that necessary dependencies are installed successfully.

  7. To inspect the elements of the Appium Server, you can download the Appium Inspector from the following link:

    Download Appium Inspector. Make sure to install this separately.

    After downloading, you can install and run the Appium Inspector.


  8. To run the Appium in your system, run the following command by launching a new command prompt window and exiting the old window.
    appium
    Following screen displays the Appium version, path and driver details confirming that the installation was successful.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article