Hola amigos estoy aprendiendo a usar UITest de Xamarin, esto es todo lo que estoy intentando hacer
#region
const string sp = "splash_screen";
#endregion
public MyTest(Platform platform) : base(platform)
{}
[Test]
public void firstTest()
{
// aaa testing model
// arrange
app.WaitForElement ((sp),$"unable to load {sp} ",TimeSpan.FromSeconds(40));
app.Screenshot($"{sp} screen shot ");
//act
//assert
}
Pero me tira el error "unable to load ..." , por lo que entiendo de que no encuentra mi vista. Segun la documentacion https://docs.microsoft.com/en-us/appcenter/test-cloud/uitest/ , podria llamar a mis elementos de ANDROID por
the Id of the view
the ContentDescription of the view
the Text of a view
(sitando la documentacion)
Este es el
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/splash_screen"
>
y este es el error que me da.
firstTest
Duration: 54.6 sec
Message:
System.Exception : Error while performing WaitForElement(Marked("splash_screen"), "unable to load splash_screen ", 00:00:40, null, null)
----> System.TimeoutException : unable to load splash_screen
Stack Trace:
ErrorReporting.With[T](Func`1 func, Object[] args, String memberName)
AndroidApp.WaitForElement(Func`2 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout)
AndroidApp.WaitForElement(String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout)
MyTest.firstTest()
--TimeoutException
WaitForHelper.WaitForAny[T](Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout)
<>c__DisplayClass80_0.<WaitForElement>b__0()
ErrorReporting.With[T](Func`1 func, Object[] args, String memberName)
Open additional output for this result
Alguien sabe en que estoy fallando