My Test is always failing on iPhone Plus devices - Test Cloud

Hi,

I am having hard time to run test on iPhone Plus device, it always failing when I run test in Test Cloud. Works fine in Simulator for the same.

Thanks.
Kamesh

Answers

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Hi @KameshPareek.5577 ,

    can you show more informations ? logs ? Reports ?

    Anthony

  • KameshPareek.5577KameshPareek.5577 USUniversity ✭✭

    Same Test run fine on other devices and simulator also, only it fails on Plus devices on Test Cloud.

    Here is the Test that I am trying to run:

    Thread.Sleep(30000); // wait 30 seconds to give App time to fully loaded
    app.WaitForElement(x => x.Text("Clinical Interest"));
    app.Screenshot("App Started");
    app.WaitForElement(x => x.Id("applyBtn"), "Waiting for APPLY button to appear");
    app.Tap(x => x.Id("applyBtn"));
    app.WaitForElement(x => x.Text("ATMO"), "Waiting for contacts to load");
    app.Screenshot("Search Result Loaded");
    //app.ScrollDownTo(x => x.Text("Marvin H. Eng"));
    //app.WaitForElement(x => x.Text("Marvin H. Eng"), "Scrolling Down", TimeSpan.FromSeconds(5));
    app.Tap(x => x.Text("ATMO"));
    app.Screenshot("Contact Details Screen Loaded");
    //app.Tap(x => x.Id("savetocontactsBtn"));
    app.Screenshot("Contact Saved");
    app.Back();
    Thread.Sleep(3000);
    app.WaitForElement(x => x.Text("ATMO"), "Waiting for contacts to load");

            app.Back();
    
            /// Open up the picker
            app.Tap(x => x.Marked("specialityTxt"));
    
            // Assuming a single column picker
            //var picker = app.Query(x => x.Class(pickerClass).Index(0));
            // Try to scroll and find the text item only 5 times
            for (int i = 0; i < 5; i++)
            {
                if (app.Query(m => m.Text("Cardiology")).Length == 0)
                    app.ScrollDown(x => x.Class("UIPickerTableView").Index(0));
                else
                {
                    app.Tap(x => x.Text("Cardiology"));
                    break;
                }
            }
            app.Tap(x => x.Class("UIToolbarTextButton"));
    
            app.Tap(x => x.Id("applyBtn"));
            Thread.Sleep(3000);
    
            app.Screenshot("Results for Speciality = Cardiology Loaded");
    
            app.EnterText(x => x.Id("searchBar"), "Marvin H. Eng");
            app.Screenshot("Found Marvin H. Eng");
            app.Back();
            Thread.Sleep(3000);
    
            app.Tap(x => x.Id("refreshBtn"));
            app.Screenshot("Refresh Data");
    

    Here is error from Test Cloud:

    System.Exception : Error while performing WaitForElement(Text("ATMO"), "Waiting for contacts to load", null, null, null) ----> System.TimeoutException : Waiting for contacts to load
    at Xamarin.UITest.Utils.ErrorReporting.With[T] (System.Func1 func, System.Object[] args, System.String memberName) <0x6de5cd8 + 0x00197> in <filename unknown>:0 at Xamarin.UITest.iOS.iOSApp.WaitForElement (System.Func2 query, System.String timeoutMessage, Nullable1 timeout, Nullable1 retryFrequency, Nullable1 postTimeout) <0x6de59c0 + 0x002f3> in <filename unknown>:0 at HFHS.PCL.UITest.Search.SearchAll () <0x6de4988 + 0x00617> in <filename unknown>: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) <0x328f110 + 0x00093> in <filename unknown>:0 --TimeoutException at Xamarin.UITest.Shared.WaitForHelper.WaitForAny[T] (System.Func1 query, System.String timeoutMessage, Nullable1 timeout, Nullable1 retryFrequency, Nullable1 postTimeout) <0x6de6e50 + 0x000db> in <filename unknown>:0 at Xamarin.UITest.iOS.iOSApp+<WaitForElement>c__AnonStorey1C.<>m__0 () <0x6de5ea8 + 0x001fb> in <filename unknown>:0 at Xamarin.UITest.Utils.ErrorReporting.With[T] (System.Func1 func, System.Object[] args, System.String memberName) <0x6de5cd8 + 0x00034> in :0

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    try :

    app.WaitForElement(x => x.Text("ATMO"), "Waiting for contacts to load", TimeSpan.FromSeconds(30));

    or

    app.WaitForElement(x => x.Text("ATMO"), "Waiting for contacts to load", TimeSpan.FromSeconds(60));

    Anthony

  • KameshPareek.5577KameshPareek.5577 USUniversity ✭✭

    This test is failing because it's not able to perform "Tap" action. That is the reason next screen is not loading and it's timing out:

    app.Tap(x => x.Id("applyBtn"));

  • BhaurajBiradar.9064BhaurajBiradar.9064 USMember ✭✭✭

    @KameshPareek.5577 - Did you fixed the issue? Any updates Xamarin?

Sign In or Register to comment.