Index

  1. Selenium Framework Setup & Usage Guidelines

  2. Required Software Tools and Specifications

  3. Install Visual Studio

  4. Install Java.

  5. Install Node.js and NPM

  6. Install Android Studio

  7. Appium Desktop Installation and Configurations

Selenium Framework Setup & Usage Guidelines

Required Software Tools and Specifications

1. Visual Studio 2022

2. UiAutomator2 Driver for Android

3. Java 8

4. Mac, Windows, or Linux OS with the ability to run the Android SDK

5. Node.js

6. NPM

7. Android Studio

8. Appium

Install Visual Studio

Windows

1. Download Visual Studio Community Edition from Microsoft official website.

2. Click on Free Download, and the .exe file will be downloaded.

3. Click on the .exe file to start the Visual Studio Installer.

4. Click on the installer file, the Privacy and License Terms window appears, click on Continue to start installation.

5. Visual Studio Installer downloads and prepares Visual Studio for installation.

6. Once the Preparation is complete, the Visual Studio installation window appears. Users will have to choose a set of tools. To build an automation framework one can choose the Asp.net and Web development option. Click on Install to proceed.

7. Installation begins and its progress percentage will be shown accordingly.

8. Once the installation is complete, the Restart pop up window appears. Click on Restart.

9. After a successful restart of the system, the Visual Studio setup pop up will appear. Click on Not now, Maybe later.

Note: Sometimes after restart the above window doesn’t appear. If it doesn’t appear automatically just Open Visual Studio from the Windows Start Menu.

10. Choose a Theme for Visual Studio and click on Start Visual studio.

11. Visual Studio prepares settings for First Use.
Note: This stage takes some time to finish.

12. Once the above step is completed, the Get Started Window opens.

13. Visual Studio Installation is complete.

MacOS

1. Download Visual Studio Community Edition from Microsoft official website.

2. Click on Free Download, and the .dmg file will be downloaded.

3. Click on the .dmg file to start the Visual Studio Installer.

4. Once the download is complete, click the VisualStudioForMacInstaller_<build_number>.dmg to mount the installer, then run it by double-clicking the arrow logo:

5. You may be presented with a warning about the application being downloaded from the Internet. Select Open.

6. An alert will appear asking you to acknowledge the privacy and license terms. Follow the links to read them, then select Continue if you agree:

7. The list of available workloads is displayed. Select .NET component:

8. After you've made your selections, select the Install button.

9. The installer will display progress as it downloads and installs Visual Studio for Mac and the selected workloads. You'll be prompted to enter your password to grant the privileges necessary for installation.

10. Once installed, Visual Studio for Mac will prompt you to personalise your installation by signing in and selecting the key bindings that you'd like to use:

11. Visual Studio for Mac will launch, and you can open the project.

Install Java

Windows

Follow below steps to complete your Java installation.

  • In the next page, select the Accept License Agreement radio button, accept it and click the download link against your matching system configuration.

  • You can run the installer once the download is over and follow onscreen instructions.

    • Go to start and search for ‘System’

    • Click on ‘System’

    • Click on ‘Advanced system settings’

    • Click on ‘Environment Variables’ under ‘Advanced’ tab as shown below:

  • Next, under system variables choose new and enter the variable name as ‘JAVA_HOME’ and the full path to Java installation directory as per your system as shown below:

  • Below figure depicts the configuration of environment variable name and value.

  • Next thing that you have to do is to configure your environment variables. Let’s see how to do that. Here, you have to edit the path of the system variable as shown below.

  • Under ‘Variable value’, at the end of the line, enter the following path –%JAVA_HOME%bin;
    Now, you can click ‘OK’ and you are done.

  • Now to cross-check the installation, just run following command in cmd – java -version. It should display the installed version of Java in your system.

MacOS

1. To check the JAVA_HOME variable execute the following command in Terminal:

echo $JAVA_HOME

2. If the output is not empty, it means that JAVA_HOME is set. But you should make sure that it points to the JDK version 1.8. Compare it with the output from the execution following command in Terminal:

/usr/libexec/java_home -v 1.8

3. Otherwise, if the output is empty or it differs from the actual JDK path, you should add the following line to the ~/.bash_profile file:

export JAVA_HOME=$(/usr/libexec/java_home)

Linux

1. To check the JAVA_HOME variable execute the following command in Terminal:

echo $JAVA_HOME

2. If the output is not empty, it means that JAVA_HOME is set. But make sure that it points to the JDK version 1.8.

3. Otherwise, if the output is empty or it differs from the actual JDK path, you should add the following line to the ~/.bashrc file:

export JAVA_HOME=<path to JDK 1.8>

Install Node.js and NPM

Windows

The first step in using Node.js is the installation of the Node.js libraries on the client system. Below are the steps to download and install Node.js in Windows:


Step 1) Download Node.js Installer for Windows

Go to the site https://nodejs.org/en/download/ and download the necessary binary files.

In our example, we are going to Download Node.js on Windows with the 32-bit setup files.

Step 2) Run the installation

Double click on the downloaded .msi file to start the installation.

Click the Run button on the first screen to begin the installation.

Step 3) Continue with the installation steps

In the next screen, click the “Next” button to continue with the installation

Step 4) Accept the terms and conditions

In the next screen, accept the license agreement and click on the Next button.

Step 5) Set up the path

In the next screen, choose the location where Node.js needs to be installed and then click on the Next button.

1. First, enter the file location for the installation of Node.js. This is where the files for Node.js will be stored after the installation.

2. Click on the Next button to proceed ahead with the installation.

Step 6) Select the default components to be installed. Accept the default components and click on the Next button.

Step 7) Start the installation

In the next screen, click the Install button to start installing Node.js on Windows.

Step 8) Complete the installation

Click the Finish button to complete the installation.

MacOS

1. Open Terminal

2. Use the following Homebrew command to install Node & NPM:

brew install node

3. Execute the following command to ensure that Node has been installed, it should print the installed Node version:

node -v

4. Execute the following command to ensure that Node has been installed, it should print the installed NPM version:

npm -v

Linux

1. Open Terminal

2. Use the following command to install Node & NPM:

sudo apt-get install node

3. Execute the following command to ensure that Node has been installed, it should print the installed Node version:

node -v

4. Execute the following command to ensure that Node has been installed, it should print the installed NPM version:

npm -v

Install Android Studio

  • Let’s go to Android Studio Download and install Android Studio. After that, apply the following steps. Click the “Next” icons and finally click the “Finish“.

  • Click to download Android Studio based on your operating system Windows, macOS, Chrome OS, or Linux. We are going on with Windows.

  • After download the Android Studio, installation is straightforward. Click the next button.

  • Select all options and click the next button.

  • Select your directory or keep the default and click next. I kept it as default. ;)

  • And click the install button to start the installation process.

  • If it is your first time installing Android Studio then just select the “Do not import settings” option and click the OK button. If you are updating it, you can import your previous settings.

  • Click the next button and continue.

  • I installed the Android Studio with standard settings and configurations as shown below screenshot.

  • Select your UI Theme.

  • Click the “Finish” button and install the required tools.

  • Then, just wait until all libraries to be downloaded and the installation to be finished.

  • After all these steps, click the finish button.

  • After clicking the “Finish” button. Go to “Configure” > “SDK Manager” to get SDK information. It is required for Android SDK path settings.

  • Select your device’s or emulator’s Android API level (Version). We will go with Android 11 API, please install that one.

  • When took the below screenshot the latest version was 9.0 but for this example, we will go with Android 11. I am not using windows anymore thus I could not update the screenshot but I wanted to mention it to guide you correctly.

  • And select the required tools as shown below and click “OK.

  • Click OK one more time, please.

  • Click the Finish button and continue.

  • After the installation of the required tools, go to the SDK Manager page and copy the SDK path as shown below. We will use it. ;)

  • And then add ANDROID_HOME variable and its path should be Android SDK’s path. Also, check your JAVA_HOME variable. JAVA_HOME should equal to JAVA SDK’s path.

  • Then, you need to add required Android tools and JAVA JRE paths to your system path as shown below.

  • After that, check your settings and installations. Open a command prompt window and type “sdkmanager –list” command as shown below.

  • And type “uiautomatorviewer” to check uiautomatorviewer is working properly.

  • Then, create a sample project in Android Studio and then click the link as shown below to install missing libraries.

  • After installation, click the Finish button.

  • After installing missing libraries you will see the device and little and sweet android icon. :) When you click this icon, you will open the android virtual device manager.

  • Let’s create a virtual device. I will also explain how to do mobile automation with a real device too. Don’t worry. ;) Click to “+ Create a Virtual Device” button.

  • Then, select a virtual device in the device list.

After coming back to the above article and after installing your device, you will see the below result.

Until now, we installed JAVA and Android-related libraries and did their settings and configurations. Now, it is time to download Appium.

Appium Desktop Installation and Configurations

  • On the below page, click “appium-desktop-Setup-1.20.2.exe” file. (I am writing this article the latest release is 1.20.2, you can install the latest version when you are installing appium.)

  • When the installation file downloaded, click run and start to install appium desktop.

  • When installation finished, double-click the appium icon and open the appium server as shown below.

  • Let’s click the “Advanced” tab and change the Server Address to “127.0.0.1” and click Allow Session Override for override session when there will be problems and click “Start Server”. If you will use a real device and then use “0.0.0.0” for “Server Adress”.

  • Set Android and JAVA home in Appium Desktop.

  • Give the required permission to Appium Server.

  • You will see the server up and running.

Did this answer your question?