What is the use or difference between AndroidDriver, iOSDriver, AppiumDriver and Remote WebDriver

There are different types of drivers and I want to know their exact usages and purpose in which condition.

2 Likes

RemoteWebDriver: This driver class comes directly from the upstream Selenium project. This is a pretty generic driver where initializing the driver means making network requests to a Selenium hub to start a driver session. Since Appium operates on the client-server model, Appium uses this to initialize a driver session. However, directly using the RemoteWebDriver is not recommended since there are other drivers available that offer additional features or convenience functions.

AppiumDriver: This driver class inherits from the RemoteWebDriver class, but it adds in additional functions that are useful in the context of a mobile automation test through the Appium server.

AndroidDriver: This driver class inherits from AppiumDriver, but it adds in additional functions that are useful in the context of a mobile automation test on Android devices through Appium. Only use this driver class if you want to start a test on an Android device or Android emulator.

IOSDriver: This driver class inherits from AppiumDriver, but it adds in additional functions that are useful in the context of a mobile automation test on iOS devices through Appium. Only use this driver class if you want to start a test on an iOS device or iOS emulator.

As you can see, the drivers and their names tie in closely with what they do. When it comes to initializing a driver, only use the Android or IOS drivers.

27 Likes

This is awesome explanation.

Hi,
I am new to appium and trying to understand its features.
Just wanted to understand whether selection of driver has an impact on execution time or not.

Thanks in advance.

Its suggested to use specific driver based on OS of the device, like IOSdriver for apple and Android driver for Android as you get extra working methods for smooth actions to perform.

But remember to initiate appium driver as first basic driver and do inheritance based on the OS you are executing.

thanks for this clear Explanation

you are correct it helps us to identify hierarchy. Thank :slight_smile: