Getting started with Appium 2.0

Vinay Madan - Aug 7 - - Dev Community

Appium 2.0 is a big update to the Appium framework, introducing new features. It focuses on becoming a platform with independent driver and plugin ecosystems while removing old and deprecated functions.

Image description

Appium 2.0 Server Setup:
There are two options available for installing the Appium server environment. The first method involves manually installing individual components, such as the Appium server, drivers, plugins, and appium-doctor, using separate commands.

However, in this blog, we will focus on the second method, which utilizes the Appium Installer NPM Package.

This approach simplifies the installation process by guiding us through each step via the Appium CLI. You no longer need to remember specific commands, as the installer takes care of everything seamlessly and sequentially. Additionally, it automatically sets necessary environment variables, further streamlining the setup.

  • Download the Latest Version of Node:
    Download the stable version of Node JS from its official website based on your OS.

  • Verify Node and NPM Installation:
    Open the terminal and enter “node -v”to check the Node.js version and “npm -v” for npm’s version. Note that npm is bundled with Node.js and should be automatically installed during the process.
    The version I used during setup might differ from the current one, as newer versions may have been released by the time you attempt the setup.

Image description

  • Install Appium Installer Package: Obtain the Appium installer package by executing the provided command, which installs it globally.

npm install appium-installer -g

Image description

  • Start Appium Installer and Setup: Launch the Appium installer using the given command to access various setup options. Follow the instructions for proper setup, skipping any steps that are already completed or unnecessary.

Image description

  • Set Up Android Environment: Set up the Android environment, which provides essential tools and infrastructure for communication with Android devices. Choose ‘Need help setting up Android Environment to run your Appium Test’ to download the required binaries and set up environment variables.

Image description

  • Set Up iOS Environment:
    Choose ‘Need help setting up iOS Environment to run your Appium Test’ to download the required binaries and set up environment variables.

  • Select Target Devices and Browsers:
    Choose target devices for running your Appium tests, including both virtual and real devices.

Image description

Also, specify the browser setup for emulators.

Image description

  • Install Appium Server: Selecting the option ‘Install Appium Server’ will download and install the latest Appium server, ensuring you have the most up-to-date version.

Image description

Image description

  • Install Appium Plugins: Opt for the ‘Install Appium Plugin’ option to view and select from a list of available Appium plugins that suit your requirements. Download the chosen plugins with a simple command.

Image description

Image description

  • Run Appium Doctor: Use the ‘Run Appium Doctor’ option to verify if your Appium setup is successful and ready for running tests.

Image description

  • Download Appium Inspector: Download Appium Inspector from the official website according to your operating system. Install the Inspector and utilize it to connect to devices (real or emulated) and inspect elements.

Image description

Image description

  • Start Appium Server: Run the ‘appium’ command to start the Appium server, and you are all set to begin your Appium tests with version 2.0.

Image description

. . . .