I am creating a Xamarin.UITest automation project using the template 'Xamarin.UITest Cross-Platform Test Project'.
I will be automating an app developed by a 3rd party so I don't have the option of adding the project to my solution - but this seems to be a prerequisite for gaining access to these dropdowns:
I will be testing against the .apk file they produce every sprint, the path of which I've added in AppInitializer.cs
I am currently unable to target an emulator/device to run my tests on. When I run my tests, I get the error
Message: SetUp : System.Exception : No devices connected.
How do I run my tests on an emulator without adding the app's project to my solution?
1 Answer
I needed to go into Android Device Manager and 'Start' one of the emulated devices. Then run the test.
Or, do the above, then if I have multiple devices connected, in AppInitializer.cs, specify the device I want to use by its serial number:
if (platform == Platform.Android) { return ConfigureApp.Android.ApkFile(@"C:\App Automation Files\com.companyname.UITestDemo.apk").DeviceSerial("emulator-5554").StartApp(); }