Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Android UItest Fails at StartApp - Timeout Exception

$
0
0

I am trying to run a cross-platform UITest. The test runs as expected on iOS, but fails on startup for Android. When the test is run, the program is started briefly. It last on screen for about a second before closing. About 10 seconds later an error is thrown in the Test Results window:

System.TimeoutException : Timed out waiting...
at Xamarin.UITest.Shared.WaitForHelper.WaitFor (System.Func1 predicate, System.String timeoutMessage, Nullable1 timeout, Nullable1 retryFrequency, > > Nullable1 postTimeout) [0x00000] in :0
at Xamarin.UITest.Android.AndroidApp..ctor (IAndroidAppConfiguration appConfiguration) [0x00000] in :0
at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp (AppDataMode appDataMode) [0x00000] in :0
at UITests.LoginTests.ConfigureAndroidApp () [0x0003c] in /Users/.../.../test/UITests/LoginTests.cs:109
at UITests.LoginTests.ConfigureTest (Platform platform) [0x0001f] in /Users/.../.../test/UITests/LoginTests.cs:92
at UITests.LoginTests.Login_Failure (Platform platform) [0x00003] in /Users/.../.../test/UITests/LoginTests.cs:50
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) [0x00054] in /private/tmp/source-mono-mac-3.12.0-branch-32/bockbuild-mono-3.12.0-branch/profiles/mono- mac-xamarin/build-root/mono-3.12.1/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

This is the line the error occurs on.It never actually executes any testing code.

void ConfigureAndroidApp()
{
_app = ConfigureApp.Android
.ApkFile(PathToAPK)
.ApiKey("XXXX")
.StartApp();
}


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>