Install Appium with WebDriverIO

Install Appium with WebDriverIO

In this article we will install Appium with WebDriverIO, TypeScript and Cucumber.

Step 1: Navigate to the directory where you want to create the project. My current directory is

/Users/tarungoswami/git

Step 2: Create new directory. I am creating appiumdemo1.

mkdir appiumdemo1

Step 3: Open created directory or folder with Visual Studio Code. You still have a choice to continue on command line.

Open Folder in Visual Studio Code

Step 4: Open Visual Studio Terminal. Navigate to Terminal -> New Terminal

Open Terminal in Visual Studio Code

Step 5: Type pwd in terminal or cd in command prompt. We will use this path later

Check current directory in Mac Terminal

Step 6: Type below command

npm init wdio .

Here dot for current folder. You will see Wdio is installing. You will see Success message in few seconds.

Install WebDriverio IO

Step 7: Select No for A project was detected at "/Users/Username", correct (Y/n)

WebDriverIO Default Installation Directory

If you will type Y sometimes it will start installing in directory installing a level above.

Step 8: Now you will see message "? What is the project root for your test project? (/Users/tarungoswami)". Here paste path of the current directory. We get it using step 1. Here you can see it is one or two level level up. (/Users/tarungoswami). While my desired directory is /Users/tarungoswami/git/appiumdemo1

Change Directory of WebDriverIO Installation

Step 9: Now select down arrow to select option E2E Testing - of Web or Mobile Applications and press enter.

WebDriverIO E2E Installation

Step 10: Now select On my local machine for option Where is your automation backend located? (Use arrow keys) and press enter

Install WebDriverIO on Local Machine

Step 11: Now select Mobile - native, hybrid and mobile web apps, on Android or iOS  for option Which environment you would like to automate?

Install WebDriverIO for Mobile Apps

Step 12:  Which mobile environment you'ld like to automate?  Here you can select any option.

Install WebDriverIO for Android Automation

Step 13: Here for Which framework do you want to use? select  Cucumber (https://cucumber.io/)

Use Cucumber with WebDriverIO

Step 14: Select TypeScript for Select Do you want to use a compiler?

Install WebDriverIO with TypeScript

Step 15: Select Y for Do you want WebdriverIO to autogenerate some test files?

Autogenerates cucumber files druing WebDriverIO installation

Step 16: What should be the location of your feature files? Here press Enter to keep it default.

WebDriverIO Default location for Cucumber Feature File

Step 17: Let's keep step definition file location also default for question What should be the location of your step definitions?

WebDriverIO Default Location for Step Definition

Step 18: Select Y for Do you want to use page objects

WebDriverIO Default Location for Page Objects

Step 19: Press enter and select default value for Where are your page objects located?

WebDriverIO location for page objects

Step 20: Let's select allure by pressing space bar for Which reporter do you want to use?. you can select multiple reporter here

WebDriverIO Default Reporting Allure

Step 21: Let's keep default value for  Do you want to add a plugin to your test setup?

Install WebDriverIO wait-for plugin

Step 22: Let's use appium for Do you want to add a service to your test setup?

Install Appium with WebDriverIO

Step 23: Type Y for Do you want me to run `npm install`. You will see success and it will generate tsconfig.json

Install WebDriverIO with TypeScript

It will also install few more packages. which will take few minutes.

Step 24: You will see few more success message. Let's type Y for Continue with Appium setup using appium-installer

Appium with WebDriverIO Installation

Step 25: Let's exit for now we have covered lots of steps and continue with more setup in next article.

Appium WebDriverIO Installation

Say Hello, to Appium.

How to Install Appium with WebDriverIO

Video Tutorial: Install Appium with WebDriverIO

Managed ad


Tarun Goswami
Tarun possesses over 12+ years of extensive expertise in software testing and automation utilizing diverse JavaScript and Java technologies. Concurrently, he has dedicated his free time to crafting insightful blogs within the field.