Reputation: 366
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
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