예제 #1
0
        public void Issue2577Test()
        {
            RunningApp.WaitForElement(NavButton);
            RunningApp.Tap(NavButton);

            RunningApp.WaitForElement(ToggleBackButton, retryFrequency: System.TimeSpan.FromSeconds(3));

            RunningApp.Screenshot("Hamburger menu icon is visible");

            AppResult[] items = RunningApp.Query(ArrowButton);
            Assert.AreNotEqual(items.Length, 0);
            RunningApp.Tap(ArrowButton);
            RunningApp.WaitForElement(MasterList);

            RunningApp.Screenshot("Flyout menu is showing");

            RunningApp.SwipeRightToLeft();
            RunningApp.WaitForNoElement(MasterList);

            RunningApp.Tap(ToggleBackButton);

            items = RunningApp.Query(ArrowButton);
            Assert.AreEqual(items.Length, 0);

            RunningApp.Screenshot("Back arrow is showing");

            var backArrow = RunningApp.Query(e => e.Class("Toolbar").Descendant("AppCompatImageButton")).Last();

            RunningApp.TapCoordinates(backArrow.Rect.CenterX, backArrow.Rect.CenterY);

            RunningApp.WaitForElement(NavButton);

            RunningApp.Screenshot("Back at first screen");
        }
예제 #2
0
파일: Issue4187.cs 프로젝트: tytok/maui
        public void Issue4187Test()
        {
            RunningApp.WaitForElement("Text 1");
            Xamarin.UITest.Queries.AppResult[] fields = RunningApp.Query(q => q.TextField());

            Assert.AreEqual(7, GetPickerEditText(RunningApp).Length, "picker count");
            TapOnPicker(1);
            Assert.IsTrue(DialogIsOpened(), "#1");
            RunningApp.Tap("Text 2");
            Assert.IsFalse(DialogIsOpened(), "#2");
            TapOnPicker(3);
            Assert.IsTrue(DialogIsOpened(), "#3");
            RunningApp.Tap("Text 1");
            Assert.IsFalse(DialogIsOpened(), "#5");

            // Carousel - first page
            RunningApp.Back();
            RunningApp.ScrollUp();
            TapOnPicker(0);
            Assert.IsTrue(DialogIsOpened(), "Carousel - #1");

            // Red page
            RunningApp.SwipeRightToLeft();
            Assert.IsFalse(DialogIsOpened(), "Carousel - #2");
            TapOnPicker(0);
            Assert.IsTrue(DialogIsOpened(), "Carousel - #3");

            // Blue page
            RunningApp.SwipeRightToLeft();
            Assert.IsFalse(DialogIsOpened(), "Carousel - #4");
            TapOnPicker(0);
            Assert.IsTrue(DialogIsOpened(), "Carousel - #5");
        }
예제 #3
0
 public void SwipeWithChildGestureRecognizer()
 {
     RunningApp.WaitForElement(SwipeViewId);
     RunningApp.SwipeRightToLeft();
     RunningApp.Tap(SwipeViewId);
     RunningApp.WaitForElement(q => q.Marked("Open"));
 }
예제 #4
0
 public void Issue12848Test()
 {
     RunningApp.WaitForElement("TestCarouselView");
     RunningApp.SwipeRightToLeft();
     Assert.AreEqual(1, int.Parse(RunningApp.Query(q => q.Marked("CarouselPosition"))[0].Text));
     RunningApp.Tap("HideButton");
     RunningApp.Tap("ShowButton");
     Assert.AreEqual(1, int.Parse(RunningApp.Query(q => q.Marked("CarouselPosition"))[0].Text));
     RunningApp.Screenshot("Test passed");
 }
 public void Issue4341Test()
 {
     RunningApp.WaitForElement(c => c.Marked("Email"));
     RunningApp.ActivateContextMenu("Subject Line 0");
     RunningApp.WaitForElement("Delete");
     RunningApp.Tap("Delete");
     RunningApp.ActivateContextMenu("Subject Line 1");
     RunningApp.Tap("Delete");
     RunningApp.WaitForElement(c => c.Marked(Success));
     RunningApp.Back();
     RunningApp.WaitForElement(c => c.Marked("Email"));
     RunningApp.SwipeRightToLeft();
 }
예제 #6
0
        public void Bugzilla45027Test()
        {
            var firstItemList = List.First().ToString();

            RunningApp.WaitForElement(q => q.Marked(firstItemList));

            RunningApp.SwipeRightToLeft(q => q.Marked(firstItemList));
            RunningApp.WaitForElement(q => q.Marked(BUTTON_ACTION_TEXT));
            RunningApp.DoubleTap(q => q.Marked(BUTTON_ACTION_TEXT));

            RunningApp.SwipeRightToLeft(q => q.Marked(firstItemList));
            RunningApp.WaitForElement(q => q.Marked(BUTTON_DELETE_TEXT));
            RunningApp.DoubleTap(q => q.Marked(BUTTON_DELETE_TEXT));
        }
예제 #7
0
        public void Issue9306SwipeViewCloseSwiping()
        {
            RunningApp.WaitForElement(x => x.Marked(SwipeViewId));

            RunningApp.SwipeLeftToRight(SwipeViewId);
            RunningApp.SwipeRightToLeft(SwipeViewId);
            RunningApp.SwipeLeftToRight(SwipeViewId);

            RunningApp.Tap(SwipeItemId);

            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "1",
                "Swipe to close and open again failed!.");
        }
예제 #8
0
        public void Bugzilla44044Test()
        {
            RunningApp.WaitForElement(_btnToggleSwipe);

            RunningApp.SwipeRightToLeft();
            RunningApp.WaitForNoElement(_btnToggleSwipe);
            RunningApp.WaitForElement(_btnDisplayAlert);

            RunningApp.SwipeLeftToRight();
            RunningApp.WaitForNoElement(_btnDisplayAlert);
            RunningApp.WaitForElement(_btnToggleSwipe);

            RunningApp.Tap(_btnToggleSwipe);
            RunningApp.SwipeRightToLeft();
            RunningApp.WaitForNoElement(_btnDisplayAlert);
            RunningApp.WaitForElement(_btnToggleSwipe);
        }
예제 #9
0
        public void Issue9088SwipeViewConfictWithShellMenuSwipeInFromLeft()
        {
            RunningApp.WaitForElement(x => x.Marked(SwipeViewId));

            RunningApp.SwipeRightToLeft(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "1",
                "Swipe left failed at 1. swipe with speed 500");

            RunningApp.SwipeRightToLeft(SwipeViewId, 0.67, 250);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "2",
                "Swipe left failed at 2. swipe with speed 250");

            RunningApp.SwipeRightToLeft(SwipeViewId, 0.67, 100);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "3",
                "Swipe left failed at 3. swipe with speed 100");


            RunningApp.SwipeLeftToRight(SwipeViewId, 0.67, 100);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(RightCountLabelId)).FirstOrDefault()?.Text == "1",
                "Swipe right failed at 1. swipe with speed 100");

            RunningApp.SwipeLeftToRight(SwipeViewId, 0.67, 250);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(RightCountLabelId)).FirstOrDefault()?.Text == "2",
                "Swipe right failed at 2. swipe with speed 250");

            RunningApp.SwipeLeftToRight(SwipeViewId, 0.67, 500);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(RightCountLabelId)).FirstOrDefault()?.Text == "3",
                "Swipe right failed at 3. swipe with speed 500");


            RunningApp.SwipeRightToLeft(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "4",
                "Swipe left failed at 4. swipe  with speed 500");

            RunningApp.SwipeLeftToRight(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(RightCountLabelId)).FirstOrDefault()?.Text == "4",
                "Swipe right failed at 4. swipe with speed 500");

            RunningApp.SwipeRightToLeft(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "5",
                "Swipe left failed at 4. swipe with speed 500");

            RunningApp.SwipeLeftToRight(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(RightCountLabelId)).FirstOrDefault()?.Text == "5",
                "Swipe right failed at 4. swipe with speed 500");

            RunningApp.SwipeLeftToRight(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(RightCountLabelId)).FirstOrDefault()?.Text == "6",
                "Swipe right failed at 4. swipe with speed 500");

            RunningApp.SwipeRightToLeft(SwipeViewId);
            RunningApp.WaitFor(
                () => RunningApp.Query(x => x.Marked(LeftCountLabelId)).FirstOrDefault()?.Text == "6",
                "Swipe left failed at 4. swipe with speed 500");
        }
예제 #10
0
 public void Bugzilla44338Test()
 {
     RunningApp.SwipeRightToLeft(Items.First());
     RunningApp.Tap(Items.Last());
 }
예제 #11
0
 public void Bugzilla39963Test()
 {
     RunningApp.Screenshot("I am at Bugzilla39963");
     RunningApp.SwipeRightToLeft();
     RunningApp.Screenshot("Do we see a black bar");
 }