Skip to main content

Appium Configuration with Visual studio for selenium C# development

Prerequisites: 1. Visual Studio Ultimate (2010 or above) (Because MSTest is present in that) 2. Android SDK For Windows (Download Link) (Website link) 3. Appium For Windows (Website Link) (Download Link) 4. A Real Android Device running Android 4.2 or Above 5. A USB Cable to attach your Android Phone to Your PC. 6. ADB Interface Drivers for your device (Link on how to get that ) (very important Step) Some Configurations for Android SDK and Appium: • When you have installed Android SDK, go to My Computer, right click, click Properties, click Advanced System Settings, and click Environment Variables. • Create a new User Variable with the name “ANDROID_HOME”. Give path to your sdk folder in the value. The default path is C:\Program Files (x86)\Android\android-sdk • Edit the PATH variable in “System Variable” Section. Append the path to your tools folder and platform-tools folder. Separated with “;” The paths are C:\Program Files (x86)\Android\android-sdk\tools C:\Program Files (x86)\Android\android-sdk\platform-tools See the image below. • Connect your Android Device with USB Cable. To make sure your android Device is connected with your PC, we have to do following. Go to C:\Program Files (x86)\Android\android-sdk\tools. Click on “uiautomatorviewer.bat”. A window will open. See Image. You can use this window to inspect the elements of your app in android. Open the appropriate app in your android device and click on “Device Screenshot” button on this screen. If you receive this error message “No Android devices were found by adb” That means adb interface drivers are not installed on your system. You have to read again point number 6 in the Prerequisites section. If android device is successfully connected, you should see a snapshot along with Object Map in this window like this. •Unzip in a folder. Open Appium.exe, you should see a window like this. Click on the android Icon on the top left of this window. You will see a window in which you can configure the platform and version of your android on which you want to test. I have filled the following configurations there. Now click on the Play button on the top right corner of the window. Appium server will start with the configurations you have provided. •Developer options should be enabled on your android device, with these two options. Usb Debugging should be enabled. Stay Awake should be enabled. Now it is time to code. Open Visual Studio Ultimate (2010 or above) Create a UnitTest project. Install “Appium Web Driver” and “Selenium WebDriver” using NuGet package manager. (The easiest way) If you don’t want to use NuGet package manager, you can manually download Appium dot net driver and selenium web driver c# libraries and add them to your solution Your reference section should look like this. For every application you want to test, you must know its package name and app activity name. So to know about these attributes, you need to download a little android app on your phone. It is called apkInfo. It will show you the package name and activity name of any android app installed on your phone. Just pass these parameters here and that app will launch on your phone by automation code. Conclusion. If you are familiar with Selenium WebDriver, coding in Appium is not so different. Only problem was the configuration. If you have done this right, you should be able start writing scripts for your android. I tried to explain this as simply as possible.


Your blog was very interesting & easy to understand. Thank you so much sharing that informative blog.Inventory Audit

selenium training in chennai

aws training in chennai

sumathi s said…
You rock particularly for the high caliber and results-arranged offer assistance. I won't reconsider to embrace your blog entry to anyone who needs and needs bolster about this and safety course in chennai
Swetha Gauri said…
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
nebosh course in chennai

Popular posts from this blog

Internet is harmful for you: Google thinks so

Click the image to see it in full size:

Today, for a few minutes Google suddenly started warning all of its indexed sites as Harmful to your computer! Perhaps it was a glitch in their algorithm, but we managed to make a snap of it for the record.

test coverage matrix vs traceblity matrix

Test coverage matrix:

Test coverage matrix is a checklist which ensures that the functionality of the given screen(unit) is checked in all possible combinations (positive and negative) which have not been covered in test cases. Test coverage matrix is usually prepared for a screen having large number of controls (textboxes, dropdowns, buttons etc) usually, test coverage matrix is prepared in a spread sheet having all the controls (textboxes, dropdowns, buttons etc) in the columns and then all possible entries in those fields in the rows with an ''yes'' or ''no'' in the rows against the controls listed in the columns. For example, consider a ''login'' screen wherein we have ''username'' and ''password" textfields.

While preparing test coverage matrix, the first column will be '''' and the second will be ''username" and ''password" will be the third field followed by …

Cyclomatic complexity

Cyclomatic complexity is a software metric (measurement). It was developed by Thomas McCabe and is used to measure the complexity of a program. It directly measures the number of linearly independent paths through a program's source code. It is computed using a graph that describes the control flow of the program. The nodes of the graph correspond to the commands of a program. A directed edge connects two nodes if the second command might be executed immediately after the first command.


M = E − N + 2P


M = cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of the graph
P = the number of connected components.

"M" is alternatively defined to be one larger than the number of decision points (if/case-statements, while-statements, etc) in a module (function, procedure, chart node, etc.), or more generally a system.

Separate subroutines are treated as being independent, disconnected components of the program's control flow graph.