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.
Step 4: Open Visual Studio Terminal. Navigate to Terminal -> New Terminal
Step 5: Type pwd in terminal or cd in command prompt. We will use this path later
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.
Step 7: Select No for A project was detected at "/Users/Username", correct (Y/n)
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
Step 9: Now select down arrow to select option E2E Testing - of Web or Mobile Applications and press enter.
Step 10: Now select On my local machine for option Where is your automation backend located? (Use arrow keys) and press enter
Step 11: Now select Mobile - native, hybrid and mobile web apps, on Android or iOS for option Which environment you would like to automate?
Step 12: Which mobile environment you'ld like to automate? Here you can select any option.
Step 13: Here for Which framework do you want to use? select Cucumber (https://cucumber.io/)
Step 14: Select TypeScript for Select Do you want to use a compiler?
Step 15: Select Y for Do you want WebdriverIO to autogenerate some test files?
Step 16: What should be the location of your feature files? Here press Enter to keep it default.
Step 17: Let's keep step definition file location also default for question What should be the location of your step definitions?
Step 18: Select Y for Do you want to use page objects
Step 19: Press enter and select default value for Where are your page objects located?
Step 20: Let's select allure by pressing space bar for Which reporter do you want to use?. you can select multiple reporter here
Step 21: Let's keep default value for Do you want to add a plugin to your test setup?
Step 22: Let's use appium for Do you want to add a service to your test setup?
Step 23: Type Y for Do you want me to run `npm install`. You will see success and it will generate tsconfig.json
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
Step 25: Let's exit for now we have covered lots of steps and continue with more setup in next article.
Say Hello, to Appium.