0

I have a question. Can I get in Xamarin UI Test information about device and app? I need information like this (ios+android):

  • System version.
  • device id
  • app version
Żyli
  • 41
  • 1
  • 3

1 Answers1

5

There's nothing out of the box that gives you this. Instead a good way to do it using a backdoor.

https://developer.xamarin.com/guides/testcloud/uitest/working-with/backdoors/

This is essentially a method you expose on your app, and you can call this using IApp.Invoke(), giving it the name of your method. These methods can take a string parameter and return a string. Inside this backdoor method you can get whatever details you want and return them.

We use this at work to get device info such as if it is a phone or tablet, the orientation that it's running in (so we can do custom test steps on landscape vs portrait). It's a very useful trick.

JimBobBennett
  • 2,149
  • 14
  • 11