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

Failed on Testing Xamarin.Forms using UITest

$
0
0

I followed instruct in this link developer.xamarin.com/guides/cross-platform/xamarin-forms/uitest-and-test-cloud/ to write a test with Xamarin.Forms. I also fetched a sample from related link:
https://github.com/xamarin/xamarin-forms-samples/tree/master/UsingUITest.
I am using Visual Studio to set up this solution.
After installing required nuget such as NUnit Test Adapter for VS2012 and VS2013, included framework and Xamarin.UI.Test.
I built up the Android App and Run the test in the emulator, and I stuck in this step(first query in TestCase). The Test was failed due to it didn't find the query element as in attached image.

After using app.repl(), I figured out it seemed that the screen was take too long to load, so the query was failed.
I try using System.Threading.Thread.Sleep(10000) in "CrossPlatformTests.cs" file, at TestCase() method, before _app.Query(...) and it worked

So everyone, is it normal that I met this error, or this is truly an error? If this is an error, so could you please point out how to fix it?
Thanks very much.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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