1. Appium Introduction

1. Appium Introduction:

Webdriver+Mobile Features=Appium
Appium is an open-source, cross-platform test automation tool for native, hybrid and mobile web apps, 
tested on simulators (iOS, FirefoxOS), emulators (Android), and real devices (iOS, Android, FirefoxOS).

i. Supported Platforms
a. iOS
b. Android
c. FirefoxOS

ii. Why Appium?
You don't have to recompile your app or modify it in any way, due to the use of standard automation
APIs on all platforms.
You can use any testing framework.
You can write the code in any language Supported by Webdriver
If you use Apple's UIAutomation library without Appium you can only write tests using JavaScript
and you can only run tests through the Instruments application. Similarly, with Google's UiAutomator
you can only write tests in Java. 
Appium opens up the possibility of true cross-platform native mobile automation.

3.1 Appium Installation (Java Part)

3.1 Appium Installation (Java Part):
  1. Download jdk using URL: https://www.techspot.com/downloads/5553-java-jdk.html. Go to the Downloaded folder and double
    click on jdk file to install. Click the next button as shown below.




2. User can change the installation path of jdk, otherwise click the next button as shown below.



3. User can change the installation path of jre, else click on the next button as shown below.




4. Now click on the close button as shown below.


5. User can verify the installed jdk and jre folders by accessing the installed folder as shown below.  


6. Set Java environment variables (2 variables).
i. Go to My PC and click on properties as shown below.


Ii.  Now click on advanced system settings as shown below.


Iii. Now click on Environment variables


iv.  In System variables click on “New” button and add below in window opened.
Variable name: JAVA_HOME
Variable value: C:\ProgramFiles\Java\jdk1.8.0_191
And the click on ok button.


v. Now click on Path in System variables window as shown below.


vi. New window will be opened and here add below “New” Paths.
C:\Program Files\Java\jdk1.8.0_191\bin.

And the click on ok button.

3.2 Appium Installation (Android Studio Part)

3.2 Appium Installation (Android Studio Part):


Download and installation of Android Studio. Go to downloaded folder and double click on android studio
application. Click on the next button as shown below.  

8. User can select components to install and then click on the next button as shown below.  

9. User can change the installation folder else click on the next button as shown below.  


10. User can choose start Menu folder and can create shortcuts as shown below. User click on install button. 






11. After completed installation user clicks on next button as shown below.


12. User can uncheck to start android studio and then click on the Finish button as shown below.


13. User install missing SDK as shown below.



14. User clicks the OKbutton.

15. Components start downloading as shown below.


16. User click on the Finish button after completing downloading.

17. User click on start a new android studio project button to create new android project as shown below.


18. User can fill all the required fields and then click on next button.
19. User can select target android device e.g Phone and tablet, and then click on next button as shown below.


20. User add an activity to Mobile e.g. empty activity as shown below. 


21. User fill the required fields and then click on the next button as shown below. 


22. After completion user click on the Finish button. 
23. After finishing, windows defender window show and user click on allow access button.

24. User click on install missing platforms as shown below.

25. User fill Accept checkbox to accept the license agreement and then click on the next button.

26. After completion, user click on Finish button. 

27.User click on missing install build tools and it start downloading.

28. After completion, user click on Finish button. 

29. User access AVD Manager by clicking on mentioned button as shown below.


30. User create virtual device as shown below.


31. User select Phone from left side window as shown below.


32. User download an OS for Phone as shown below.


33. Downloading start and User click on the Finish button after completion.
34. User then click on downloaded OS and then click on the next button
35. User enter AVD name and then click on the Finish button as shown below.


36. There is an issue in latest android studio’s (3.5) HAXM(7.5 probably) so install HAXM (7.3.2).
37. User set four system variables in Environment variables.
i. Go to My PC and click on properties as shown below.


Ii.  Now click on advanced system settings as shown below.




Iii. Now click on Environment variables
iv.  In System variables click on “New” button and add below in window opened.
Variable name: ANDROID_HOME
Variable value: C:\Users\xxxxx\AppData\Local\Android\Sdk
And the click on the OK button.


v. Now click on Path in System variables window as shown below.




vi. New window will be opened and here add below “New” Paths.
C:\Users\xxxxx\AppData\Local\Android\Sdk\tools
C:\Users\xxxxx\AppData\Local\Android\Sdk\platform-tools
C:\Users\xxxxx\AppData\Local\Android\Sdk\build-tools
C:\Users\xxxxx\AppData\Local\Android\Sdk\tools\bin

And then click on the OK button.
41. User can launch Virtual Device emulator through command prompt.
i. Path emulator –avd name of emulator (C:\Users\xxxx\AppData\Local\Android\Sdk\platform-tools>
emulator –avd Demo).

4. Appium Installation (node.js):

4. Appium Installation (node.js): 
1. Go to downloaded folder and double click on Node.js. User click on the next button as shown below.  


2. User fill the check of license agreement and then click on the next button as shown below.


3. User can change the destination folder and then click on next button as shown below.


4. User again click on the next button as shown below.


5. User click on Install button to install node.js as shown below.


6. After completion user click on the Finish button.


7.  Set environment variable for node.js and npm
i. Go to My PC and click on properties as shown below.


Ii.  Now click on advanced system settings as shown below.


Iii. Now click on Environment variables
iv.  In System variables click on “New” button and add below in window opened.
Variable name: NODE_HOME
Variable value: C:\Program Files\nodejs
And the click on the OK button.




v. Now click on Path in System variables window as shown below.



vi. New window will be opened and here add below “New” Paths.
C:\Program Files\nodejs\
C:\Program Files\nodejs\node_modules\npm\bin


vii. Node is software and npm is command line installer(with npm you can download any Node module).
8. Install Appium from cmd using command “npm install –g appium” and then run it using command “appium”.




9.      Npm uninstall appium (Optional).

Cypress from beginning