
History & Origin of Selendroid
The Selenium is a collection of different tools and has contributions from different notable people. The long history of the selenium project has different stages with key individuals contributing immensely to the growth at different stages. Selenium was initially developed by Jason Huggins in 2004 while he was working as an Engineer in ThoughtsWork on a web application that requires frequent testing. He created the program using JavaScript, after using it he realized the shortcomings of manual testing and the need to curb monotony. He originally named the program JavaScriptTestRunner but after realizing the potential of the program, he made it an open-source program which he re-named Selenium Core.

What is Selendroid?
Selendroid is an open-source automation framework that drives off the UI of Android native, hybrid, and mobile web applications. It is based on the Android instrumentation framework. Furthermore, the tests are written using the API of the Selenium 2 client otherwise called as Selenium web driver. As a result, the existing Selenium framework is still reused by Selendroid. It also can be integrated with the selenium grid for parallel execution on multiple nodes.
Features of Selendroid are:
- Why use Selendroid?
- It is an open-source (free to use)
- Supports Selenium as a scripting language
- Supports web driver compatible languages such as Java, C#, Perl
- Supports all Android Versions
- Works both on an emulator as well as the real device
- Works on a native, hybrid, and web-based application
- It supports object recognition using object properties
- Easy to implement
Advantages of Selendroid
- Selendroid is completely compatible with JSON wire protocol and is selenium three-ready.
- Mobile testing using Selendroid does not require modifying the app that is to be tested for the automatic test procedure.
- Mobile web can be tested using the built-in web view app android driver.
- The framework applies the same concept to automate native or hybrid apps.
- Any UI element can be easily found using different types of locators in Selendroid.
- Selendroid supports gestures and advanced user interaction API.
- The framework automatically starts existing emulators.
- Full hot-plugging supports for hardware devices.
- Easy and complete integration into Selenium grid as a node, which facilitates scaling and parallel testing.
Disadvantages of Selendroid
- Slow testing speeds
- Requirement of high-end machines
- Unusable on systems with less than 4 GB RAM
Best Selendroid Alternative
- Xcode.
- UserTesting.
- Ranorex Studio.
- Sauce Labs.
- LambdaTest.
- TestComplete.
- Perfecto.
- TestFlight.
Best resources to learn Selendroid
http://selendroid.io/
https://www.devopsschool.com/blog/?s=Selendroid
Free Video Tutorials Selendroid
Selendroid Interview Questions and Answers
1) Explain what is Appium?
Appium is a freely distributed open-source mobile application UI testing framework.
2) List out the Appium abilities?
Appium abilities are
Test Web
Provides cross-platform for Native and Hybrid mobile automation
Support JSON wire protocol
It does not require recompilation of the App
Support automation test on a physical device as well as similar or emulator both
It has no dependency on a mobile device
3) List out the pre-requisite to use opium?
Pre-requisite to using appium is
- ANDROID SDK
- JDK
- TestNG
- Eclipse
- Selenium Server JAR
- Webdriver Language Binding Library
- APPIUM for Windows
- APK App Info On Google Play
- js
4) List out the limitations of using Appium?
- Appium does not support testing of Android Version lower than 4.2
- Limited support for hybrid app testing. E.g., not possible to test the switching action of application from the web app to native and vice-versa
- No support to run Appium Inspector on Microsoft Windows
5) Explain how to find DOM element or xPath in a mobile application?
To find the DOM element using “UIAutomateviewer” to find the DOM element for the Android application.
6) Explain the design concept of Appium?
- Appium is an “HTTP Server” written using the Node.js platform and drives iOS and Android sessions using Webdriver JSON wire protocol. Hence, before initializing the Appium Server, Node.js must be pre-installed on the system
- When Appium is downloaded and installed, then a server is set up on our machine that exposes a REST API
- It receives connection and command requests from the client and executes that command on mobile devices (Android / iOS)
- It responds back with HTTP responses. Again, to execute this request, it uses the mobile test automation frameworks to drive the user interface of the apps. Framework like
- Apple Instruments for iOS (Instruments are available only in Xcode 3.0 or later with OS X v10.5 and later)
- Google UIAutomator for Android API level 16 or higher
- Selendroid for Android API level 15 or less
7) What language does Appium support?
Appium supports any language that supports HTTP requests like Java, JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
8) Explain the pros and cons of Appium?
Pros:
- For the programmer irrespective of the platform, he is automating ( Android or iOS) all the complexities will remain under a single Appium server
- It opens the door to cross-platform mobile testing which means the same test would work on multiple platforms
- Appium does not require extra components in your App to make it automation friendly
- It can automate Hybrid, Web, and Native mobile applications
Cons:
- Running scripts on multiple iOS simulators at the same time is possible with Appium
- It uses UIAutomator for Android Automation which supports only the Android SDK platform, API 16 or higher, and to support the older API they have used another open-source library called Selendroid
9) Explain what is APPIUM INSPECTOR?
Similar to the Selenium IDE record and Playback tool, Appium has an “Inspector” to record and playback. It records and plays native application behavior by inspecting DOM and generates the test scripts in any desired language. However, Appium Inspector does not support Windows and uses UIAutomator viewer as its option.
10) Mention what are the basic requirement for writing Appium tests?
For writing Appium tests you require,
- Driver Client: Appium drives mobile applications as though they were a user. Using a client library you write your Appium tests which wrap your test steps and send them to the Appium server over HTTP.
- Appium Session: You have to first initialize a session, as such Appium test takes place in the session. Once the Automation is done for one session, it can be ended and wait for another session
- Desired Capabilities: To initialize an Appium session you need to define certain parameters known as “desired capabilities” like PlatformName, PlatformVersion, Device Name, and so on. It specifies the kind of automation one requires from the Appium server.
- Driver Commands: You can write your test steps using a large and expressive vocabulary of commands.
11) Mention what are the possible errors one might encounter using Appium?
The possible errors one might face in Appium include
- Error 1: The following desired capabilities are needed but not provided: Device Name, platform name
- Error 2: Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path
- Error 3: openqa.selenium.SessionNotCreatedException: A new session could not be created
- Error 4: How to find DOM element or XPath in a mobile application?
12) Do you need a server machine to run tests on Appium?
No, you don’t need a server machine to run tests on Appium. Appium facilitates a 2-tier architecture where a test machine connects to a test server running Appium and automating the whole thing. You can have Appium running on the same machine where your test runs.
13) Is it possible to interact with my apps using Javascript while I am testing with Appium?
Yes, it is possible to interact with App while using Javascript. When the commands run on Appium, the server will send the script to your app wrapped into an anonymous function to be executed.
14) Mention what are the most difficult scenarios to test with Appium?
The most difficult scenario to test with Appium is data exchange.
15) While using Appium can I run my tests in a multithreaded environment?
Yes, you can run the test in a multithreaded environment but you have to ensure that no more than one test runs at the same time against the same Appium server.
16) What Are The Advantages Of Using Appium?
It allows you to write tests against multiple mobile platforms using the same API.
You can write and run your tests using any language or test framework.
It is an open-source tool that you can easily contribute to.
17) What Is Appium’s Strongest Point?
Appium is based on Selenium which is an HTTP protocol by Google designed to automate browsers. The idea is actually very nice as automating an app (especially a webview-based one) is not so different (in terms of required APIs) from automating a browser.
Appium is also designed to encourage a 2-tier architecture: a machine runs the test written in one language ([csharp], [ruby], [javascript] are only a few among the many supported ones) and another one (the test server) actually executes it. Furthermore the WebDriver protocol targets scalability (because based on HTTP), this makes Appium very scalable as well; remember that you will need to write your test once, Appium will be in charge of executing it on more platforms.
18) What Is The Appium Philosophy?
R1. Test the same app you submit to the marketplace
R2. Write your tests in any language, using any framework
R3. Use a standard automation specification and API
R4. Build a large and thriving open-source community effort
19) Why Do The Appium Clients Exist?
We have the Appium clients for 3 reasons:
- There wasn’t time to go through a full commit and release cycle for Selenium once we’d set a release date for 1.0
- Some of the things that Appium does, and which its users really find useful, are never going to be an official part of the new mobile spec. We want a way to make these extensions available
- There are some behaviors whose state is as yet unknown. They might make it into the spec and get deleted from the clients, or they might be in category #2
Ultimately, the only reason for the clients will be #2. And even that is actually evidence that we are conforming to the WebDriver spec (by implementing the extension strategy it recommends) rather than departing from it. The Appium clients are the easiest and cleanest way to use Appium.
20) What Language Does Appium Support?
Appium supports any language that supports HTTP requests like Java, JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
- Checklist of Disaster Recovery Plan in Kubernetes (EKS) for GitLab - February 24, 2023
- Kubernetes: Pull an Image from a Private Registry using Yaml and Helm File - February 24, 2023
- Jenkins Pipeline code for Sending an email on Build Failure - February 24, 2023