Do you have any ideas, how to determine if tests are running on real device (iPhone) or on Simulator?
On Android I made some scripts with adb devices -l
. What with iOS?
Do you have any ideas, how to determine if tests are running on real device (iPhone) or on Simulator?
On Android I made some scripts with adb devices -l
. What with iOS?
If you just want to get the UUID, use ‘/usr/bin/instruments -s devices’, and then parse the results.
instruments -s devices
returns list of devices connected to Mac and configured simulators… How to determine, on which device tests are running?
I have googled some time, but I didn’t found, how to get UDID from Appium? When I pass it in appium.txt - it is easy (I can read it from Capabilities), but when I set UDID through Appium GUI? Or start server with flag --udid
?
I have not seen a way to get the UUID from Appium itself. Might be a good feature request.
In my testing I’ve found it essential to know what devices I’m setting up to test. We always start a server on a specific device (either locally or remotely) and then connect to the port we’ve specified with the client. My framework always knows the device already, mainly from our settings, but it sounds like you are trying to do something else. I think of the Appium GUI as a nice proof of concept, but not a good solution for use in a test framework. YMMV.