Get device details using appium

1,831 views
Skip to first unread message

Vinothkumar Velusamy

unread,
Jun 9, 2014, 7:46:44 PM6/9/14
to appium-...@googlegroups.com
Hi,

How do I get the device details using Appium commands.... 

eg) deviceid -UID, 
device name,
device type(ipad,iphone,ipod...),
device ios version - 6 / 7 ....and more...

I could see " Creating iDevice object with udid XXXX", but I am sure there should be a method to get this... can you let me know..

Thanks ....

subhashini tatipamula

unread,
Jun 12, 2014, 2:20:06 AM6/12/14
to appium-...@googlegroups.com
I am also looking for an Appium command to get these details.. Can anyone please let us know...

Thanks

Massanori Takaki

unread,
Jun 12, 2014, 8:25:22 AM6/12/14
to appium-...@googlegroups.com
Have you guys tried to get the DesiredCapabilities? I'm using on Android and I can see which version from the device I'm running:
  • result = {org.openqa.selenium.remote.DesiredCapabilities@1730}"Capabilities [{automationName=selendroid, platformVersion=19, platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, platformName=android, handlesAlerts=true, browserName=selendroid, networkConnectionEnabled=true, rotatable=true, takesScreenshot=...
  • capabilities = {java.util.HashMap@1734} size = 12
  • [0] = {java.util.HashMap$Entry@1740}"automationName" -> "selendroid"
  • [1] = {java.util.HashMap$Entry@1743}"platform" -> "ANDROID"
  • [2] = {java.util.HashMap$Entry@1746}"platformVersion" -> "19"
  • [3] = {java.util.HashMap$Entry@1749}"javascriptEnabled" -> "true"
  • [4] = {java.util.HashMap$Entry@1752}"acceptSslCerts" -> "true"
  • [5] = {java.util.HashMap$Entry@1754}"platformName" -> "android"
  • [6] = {java.util.HashMap$Entry@1757}"browserName" -> "selendroid"
  • [7] = {java.util.HashMap$Entry@1760}"handlesAlerts" -> "true"
  • [8] = {java.util.HashMap$Entry@1762}"networkConnectionEnabled" -> "true"
  • [9] = {java.util.HashMap$Entry@1764}"rotatable" -> "true"
  • [10] = {java.util.HashMap$Entry@1766}"takesScreenshot" -> "true"
  • [11] = {java.util.HashMap$Entry@1768}"version" -> "0.10.0" 
 Regards,
Massanori

Gokhan Arik

unread,
Aug 21, 2014, 12:18:16 PM8/21/14
to appium-...@googlegroups.com
I don't think Appium has a method for that. Appium is getting that using iOS/Android SDK commands.

For iOS,

system_profiler SPUSBDataType 

I use this command on command line to see connected devices to my laptop and get device ID from there. If you just want device ID you can use this command, 

system_profiler SPUSBDataType | sed -n -E -e '/(iPhone|iPad)/,/Serial/s/ *Serial Number: *(.+)/\1/p'


It is same command it just filters device id.


For Android, use ADB commands. 

adb devices 

command will list devices. Once you get device ID with this command, you can run this command to see all the details including device name, sdk, version

adb -s {deviceID} shell getprop


Reply all
Reply to author
Forward
Message has been deleted
0 new messages