public void TitleIconIsCentered() { var element = RunningApp.WaitForElement("coffee.png")[0]; var rect = RunningApp.RootViewRect(); Assert.AreEqual(element.Rect.CenterX, rect.CenterX); }
public void TestIsEnabledTrueContextActions() { var disable1 = RunningApp.Query(c => c.Marked("txtCellEnabledContextActions1")) [0]; Assert.IsTrue(disable1.Enabled); var screenBounds = RunningApp.RootViewRect(); RunningApp.DragCoordinates(screenBounds.Width - 10, disable1.Rect.CenterY, 10, disable1.Rect.CenterY); RunningApp.Screenshot("Showing context menu"); RunningApp.WaitForElement(c => c.Marked("More")); }
public void SwipeBackNavCrashTestsSwipeBackDoesNotCrash() { RunningApp.WaitForElement(q => q.Marked("Page One")); RunningApp.Tap(q => q.Button("Go to second page")); RunningApp.WaitForElement(q => q.Marked("Swipe lightly left and right to crash this page")); System.Threading.Thread.Sleep(3); var mainBounds = RunningApp.RootViewRect(); Microsoft.Maui.Controls.UITests.Gestures.Pan(RunningApp, new Microsoft.Maui.Controls.UITests.Drag(mainBounds, 0, 125, 75, 125, Microsoft.Maui.Controls.UITests.Drag.Direction.LeftToRight)); System.Threading.Thread.Sleep(3); RunningApp.Screenshot("Crash?"); RunningApp.WaitForElement(q => q.Marked("Swipe lightly left and right to crash this page")); }
public void Issue206TestsTextInTextCellResizes() { RunningApp.WaitForElement(q => q.Marked("Click 9")); RunningApp.WaitForElement(q => q.Marked("0")); RunningApp.WaitForElement(q => q.Marked("1")); RunningApp.WaitForElement(q => q.Marked("2")); RunningApp.Screenshot("All elements exist"); #if !__MACOS__ var scrollRect = RunningApp.RootViewRect(); Xamarin.Forms.Core.UITests.Gestures.ScrollForElement(RunningApp, "* marked:'9'", new Xamarin.Forms.Core.UITests.Drag(scrollRect, Xamarin.Forms.Core.UITests.Drag.Direction.BottomToTop, Xamarin.Forms.Core.UITests.Drag.DragLength.Long)); RunningApp.Screenshot("I see 9"); #endif RunningApp.Tap(q => q.Marked("9")); RunningApp.WaitForNoElement(q => q.Marked("9")); RunningApp.Screenshot("The text should not be cropped"); }