Vitthal Bobade
Vitthal Bobade

Reputation: 366

Appium driver OS name

While writing script for Android and iOS in single file. How to check appium driver is created for iOS or Android? I have tried to check for version release but it gives build version only.

Upvotes: 1

Views: 118

Answers (1)

iLion
iLion

Reputation: 106

You can check as below. This line of code will return true if you are using android driver otherwise false.

$driver.device_is_android?

Above line of code will work only after initializing driver.

Upvotes: 1

Related Questions