Bug 56892 - My Test is always failing on iPhone Plus devices - Test Cloud
Summary: My Test is always failing on iPhone Plus devices - Test Cloud
Status: RESOLVED UPSTREAM
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.12 (d15-3)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-05-26 20:26 UTC by Kamesh Pareek
Modified: 2017-05-30 18:53 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED UPSTREAM

Description Kamesh Pareek 2017-05-26 20:26:40 UTC
I am having hard time to run test on iPhone Plus devices, it always fails when I run test in Test Cloud. Works fine in Simulator for the same.  Some Tap event is not recognized in Plus devices, I have tried using control ID.  I have validated ID's using REPL.  Same test runs fine for normal iPhone and Android device.
Comment 1 Alex Soto [MSFT] 2017-05-26 23:44:12 UTC
Hello Kamesh

Can you please share with us all your all version information and also a test case to reproduce?

Also it is not entirely clear to me if your issue is with a Physical iPhone Plus device inside Test Cloud or testing directly in an iPhone Plus that you have.

The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version information (you can use the "Copy Information" button).
Comment 2 Kamesh Pareek 2017-05-29 13:33:45 UTC
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.Func`1 func, System.Object[] args, System.String memberName) <0x6de5cd8 + 0x00197> in <filename unknown>:0
at Xamarin.UITest.iOS.iOSApp.WaitForElement (System.Func`2 query, System.String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 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.Func`1 query, System.String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 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.Func`1 func, System.Object[] args, System.String memberName) <0x6de5cd8 + 0x00034> in <filename unknown>:0
Comment 3 Kamesh Pareek 2017-05-29 13:35:18 UTC
This test only fails in Test Cloud only for Plus Devices:

Below find my system configuration:
Xamarin Studio Enterprise
Version 6.3 (build 864)
Installation UUID: d74ca951-6bd2-4bf5-ac8e-0c54abe3a83f
Runtime:
	Mono 5.0.1.1 (2017-02/5077205) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500010001

NuGet
Version: 3.5.0.0

Xamarin.Profiler
Version: 1.5.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 8.3.2 (12175)
Build 8E2002

Xamarin.iOS
Version: 10.10.0.36 (Visual Studio Enterprise)
Hash: d2270eec
Branch: d15-2
Build date: 2017-05-22 16:30:53-0400

Xamarin.Android
Version: 7.3.1.2 (Visual Studio Enterprise)
Android SDK: /Users/kpareek1/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin.Mac
Version: 3.4.0.36 (Visual Studio Enterprise)

Xamarin Inspector
Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

Build Information
Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

Operating System
Mac OS X 10.12.4
Darwin OFP401752 16.5.0 Darwin Kernel Version 16.5.0
    Fri Mar  3 16:52:33 PST 2017
    root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
Comment 4 Kamesh Pareek 2017-05-30 13:45:15 UTC
I have provided the required details, let me know if you need more info.
Comment 5 Kent Green [MSFT] 2017-05-30 18:52:48 UTC
## Most likely cause / solution
The most common cause of issues matching your symptoms is this:
https://github.com/calabash/calabash-ios/issues/813

If the app is in "zoomed" mode on Plus devices (not optimized for native resolution) there are issues calculating coordinates.

Here is some additional background information:
https://www.raywenderlich.com/89816/porting-app-iphone-6-iphone-6-plus-ios-8-top-10-tips
http://stackoverflow.com/questions/26252320/still-not-optimized-for-iphone-6-and-iphone-6-plus

So if your app is in zoomed mode, then the solution / workaround is to make sure the app is running in native resolution on the devices being tested. 


## If that doesn't work
If that does not resolve the issue, then can you reach out to support by logging into testcloud.xamarin.com & clicking on "Support" in the menubar. (Test Cloud support does not use Bugzilla, and even if the issue does turn out to be a Xamarin.iOS bug they can assist in routing it & including additional info.)

Screenshot example: http://content.screencast.com/users/Kent.Green/folders/Jing/media/572442e2-c82c-4a25-9a30-1f594f156dd7/00000323.png

If you use this link from the page of your affected Test Run, then our support team will automatically receive a link to the page and we can investigate the test in more detail. Otherwise please also include a direct link to the test run.