Hi, I'm testing an app that requires us to set the location at the beginning of our app. I call app.Device.SetLocation(45.5087, -73.554) and this worked fine when tested locally on a real device and on certain devices in the test cloud.
Yesterday I tried running my test on 10 different devices in the test cloud and out of the 10 device, only 1 test passed. The others all failed because of two different problems. One of the errors was "SetUp : System.Exception : Action set_gps_coordinates with arguments System.Object failed with the following message Allow mock location is not enabled.". Is this because in the Test Cloud on your devices you do not have the "Allow mock location" enabled on your devices? The other issue I had was that not all devices had Location Services enabled. Shouldn't these options be enabled by default on all your devices in the Test Cloud?
I ran another test afterwards with 25 different Devices and this time 3 passed. The other 22 all failed with similar problems as before. Is this a problem with the test cloud or is there something other option that we need to be setting before running our tests?
This the full Test Failures error:
_SetUp : System.Exception : Action set_gps_coordinates with arguments System.Object failed with the following message Allow mock location is not enabled.
at Xamarin.UITest.Android.AndroidGestures.FailIfNotSuccess (System.String action, Newtonsoft.Json.Linq.JObject responseJObject, System.Object actionArgs) <0x59e5f00 + 0x000ab> in :0
at Xamarin.UITest.Android.AndroidGestures.PerformAction (System.String action, System.Object arguments) <0x59e3b50 + 0x0004b> in :0
at Xamarin.UITest.Android.AndroidGestures.SetGpsCoordinates (Double latitude, Double longitude) <0x59e3a80 + 0x000bf> in :0
at Xamarin.UITest.Android.AndroidDevice.SetLocation (Double latitude, Double longitude) <0x59df6b8 + 0x0023f> in :0
at Cineplex.UITest.Tests.BeforeEachTest () <0x57b1550 + 0x0006c> in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object,System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) <0x2b48070 + 0x00093> in :0_______