Exemplo n.º 1
0
 public void Bugzilla39331Test()
 {
     RunningApp.Tap(q => q.Marked("Press me"));
     RunningApp.WaitForElement(q => q.Marked("Blocked?"));
     RunningApp.Tap(q => q.Marked("Blocked?"));
     RunningApp.WaitForNoElement(q => q.Marked("Guess Not"));
 }
Exemplo n.º 2
0
 public void TranslatingViewKeepsScrollViewPosition()
 {
     RunningApp.WaitForElement(_failedText);
     RunningApp.Tap(_button1);
     RunningApp.Tap(_button2);
     RunningApp.WaitForNoElement(_failedText);
 }
Exemplo n.º 3
0
 public void Bugzilla28575Test()
 {
     RunningApp.Screenshot("I am at Bugzilla28575Test ");
     RunningApp.WaitForElement(q => q.Marked(_header));
     RunningApp.Tap(q => q.Marked("Click"));
     RunningApp.WaitForNoElement(q => q.Marked(_header));
 }
Exemplo n.º 4
0
        public void Bugzilla31330Test()
        {
            var screenBounds = RunningApp.Query(q => q.Raw("* index:0"))[0].Rect;

            var cell  = RunningApp.Query(c => c.Marked("Something 1")) [0];
            var cell2 = RunningApp.Query(c => c.Marked("Something 2")) [0];

#if __IOS__
            RunningApp.DragCoordinates(screenBounds.Width - 10, cell.Rect.CenterY, 0, cell.Rect.CenterY);
            RunningApp.WaitForElement(c => c.Marked("Delete"));
            RunningApp.Tap(c => c.Marked("Delete"));
            RunningApp.WaitForElement(c => c.Marked("Something 1"));
            RunningApp.Tap(c => c.Marked("Something 2"));
            RunningApp.DragCoordinates(screenBounds.Width - 10, cell2.Rect.CenterY, 0, cell2.Rect.CenterY);
            RunningApp.Tap(c => c.Marked("Delete"));
            RunningApp.WaitForNoElement(c => c.Marked("Something 2"));
#else
            RunningApp.TouchAndHoldCoordinates(cell.Rect.CenterX, cell.Rect.CenterY);
            RunningApp.WaitForElement(c => c.Marked("Delete"));
            RunningApp.Tap(c => c.Marked("Delete"));
            RunningApp.Back();
            RunningApp.WaitForElement(c => c.Marked("Something 1"));
            RunningApp.Tap(c => c.Marked("Something 2"));
            RunningApp.TouchAndHoldCoordinates(cell2.Rect.CenterX, cell2.Rect.CenterY);
            RunningApp.Tap(c => c.Marked("Delete"));
            RunningApp.WaitForNoElement(c => c.Marked("Something 2"));
#endif
        }
Exemplo n.º 5
0
 public void ListViewViewCellBindingTestsRemoveListItem()
 {
     RunningApp.Tap(q => q.Button("Remove"));
     RunningApp.WaitForNoElement(q => q.Marked("1"));
     RunningApp.WaitForNoElement(q => q.Marked("$100.00"));
     RunningApp.Screenshot("List item removed");
 }
Exemplo n.º 6
0
        public void Bugzilla26993Test()
        {
            RunningApp.Screenshot("I am at BZ26993");

#if __IOS__
            RunningApp.WaitForElement(q => q.Class("WKWebView"), postTimeout: TimeSpan.FromSeconds(5));

            RunningApp.Query(q => q.Class("WKWebView").Index(0).InvokeJS("document.getElementById('LinkID0').click()"));
            RunningApp.Screenshot("Load local HTML");

            RunningApp.WaitForNoElement(q => q.Class("WKWebView").Css("#LinkID0"));
            var newElem =
                RunningApp.QueryUntilPresent(() => RunningApp.Query(q => q.Class("WKWebView").Css("a")));

            Assert.AreEqual("#LocalHtmlPageLink", newElem[0].Id);
#elif __ANDROID__
            RunningApp.WaitForElement(q => q.WebView(0).Css("#CellID0"));
            RunningApp.Tap(q => q.WebView(0).Css("#LinkID0"));

            RunningApp.Screenshot("Load local HTML");

            RunningApp.WaitForNoElement(q => q.WebView(0).Css("#LinkID0"));

            Xamarin.UITest.Queries.AppWebResult[] newElem =
                RunningApp.QueryUntilPresent(() => RunningApp.Query(q => q.WebView(0).Css("h1")));

            Assert.AreEqual("#LocalHtmlPage", newElem[0].Id);
#endif

            RunningApp.Screenshot("I see the Label");
        }
Exemplo n.º 7
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");
        }
Exemplo n.º 8
0
 public void TestB43527UpdateTitle()
 {
     RunningApp.WaitForElement(q => q.Marked("Change Title"));
     RunningApp.WaitForElement(q => q.Marked("Test Page"));
     RunningApp.Tap(q => q.Marked("Change Title"));
     RunningApp.WaitForNoElement(q => q.Marked("Test Page"));
 }
Exemplo n.º 9
0
        public void EnsureListViewEmptiesOut()
        {
            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForElement("Not Grouped Item");
            RunningApp.WaitForElement("Grouped Item");

            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForElement("Not Grouped Item");
            RunningApp.WaitForElement("Grouped Item");

            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForNoElement("Not Grouped Item");
            RunningApp.WaitForNoElement("Grouped Item");

            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForElement("Not Grouped Item");
            RunningApp.WaitForElement("Grouped Item");

            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForNoElement("Not Grouped Item");
            RunningApp.WaitForNoElement("Grouped Item");

            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForElement("Not Grouped Item");
            RunningApp.WaitForElement("Grouped Item");

            RunningApp.Tap("Click Until Success");
            RunningApp.WaitForNoElement("Not Grouped Item");
            RunningApp.WaitForNoElement("Grouped Item");
        }
Exemplo n.º 10
0
 public void Bugzilla57515Test()
 {
     RunningApp.WaitForElement(ZoomContainer);
     RunningApp.WaitForElement("1");
     RunningApp.PinchToZoomIn(ZoomContainer);
     RunningApp.WaitForNoElement("1");             // The scale should have changed during the zoom
 }
Exemplo n.º 11
0
		public void RemoveSelectedItem()
		{
			RunningApp.WaitForElement("Hawkeye");
			RunningApp.Tap("Hawkeye");	
			RunningApp.Tap("RemoveItem");
			RunningApp.WaitForNoElement("Hawkeye");
		}
Exemplo n.º 12
0
        public void TestRemovingContextMenuItems()
        {
            for (int i = 1; i <= 3; i++)
            {
                string searchFor = $"Remove me using the context menu. #{i}";
                RunningApp.WaitForElement(searchFor);

                RunningApp.ActivateContextMenu(searchFor);
                RunningApp.WaitForElement(c => c.Marked("Remove"));
                RunningApp.Tap(c => c.Marked("Remove"));
            }


            for (int i = 4; i <= 6; i++)
            {
                RunningApp.Tap("Add an item");
                string searchFor = $"Remove me using the context menu. #{i}";

                RunningApp.ActivateContextMenu(searchFor);
                RunningApp.WaitForElement(c => c.Marked("Remove"));
                RunningApp.Tap(c => c.Marked("Remove"));
            }


            for (int i = 1; i <= 6; i++)
            {
                string searchFor = $"Remove me using the context menu. #{i}";
                RunningApp.WaitForNoElement(c => c.Marked("Remove"));
            }
        }
Exemplo n.º 13
0
        public void Issue35127Test()
        {
            RunningApp.WaitForElement(q => q.Marked("See me?"));
            var count = RunningApp.Query(q => q.Marked("scrollView")).Length;

            Assert.IsTrue(count == 0);
            RunningApp.WaitForNoElement(q => q.Marked("Click Me?"));
        }
Exemplo n.º 14
0
 public void Issue3385Test()
 {
     RunningApp.WaitForElement("entry");
     RunningApp.Tap("entry");
     RunningApp.WaitForElement("click");
     RunningApp.Tap("click");
     RunningApp.WaitForNoElement("FAIL");
 }
Exemplo n.º 15
0
 public void Bugzilla38112_SwitchIsStillDisabled()
 {
     RunningApp.WaitForElement(q => q.Marked("Click"));
     RunningApp.Tap(q => q.Marked("Click"));
     RunningApp.WaitForElement(q => q.Marked("switch3"));
     RunningApp.Tap(q => q.Marked("switch3"));
     RunningApp.WaitForNoElement(q => q.Marked("FAIL"));
 }
Exemplo n.º 16
0
 public void BackButtonSetToTextStillNavigatesBack()
 {
     RunningApp.Tap(PushPageId);
     RunningApp.Tap(ToggleTextId);
     RunningApp.Tap("T3xt");
     RunningApp.WaitForNoElement(FlyoutOpen);
     RunningApp.WaitForElement("Page 0");
 }
Exemplo n.º 17
0
 public void KeepItemsInView()
 {
     RunningApp.WaitForElement("ScrollToMiddle");
     RunningApp.Tap("ScrollToMiddle");
     RunningApp.WaitForElement("Vegetables.jpg, 10");
     RunningApp.Tap("AddItemAbove");
     RunningApp.WaitForNoElement("photo.jpg, 9");
 }
Exemplo n.º 18
0
		public void ReplaceItem()
		{
			RunningApp.WaitForElement("Iron Man");
			RunningApp.Tap("Iron Man");
			RunningApp.Tap("ReplaceItem");
			RunningApp.WaitForNoElement("Iron Man");
			RunningApp.WaitForElement("Spider-Man");
		}
Exemplo n.º 19
0
        public void FlyoutTests()
        {
            // Flyout is visible
            RunningApp.WaitForElement(EnableFlyoutBehavior);

            // Starting shell out as disabled correctly disables flyout
            RunningApp.WaitForNoElement(FlyoutIconAutomationId, "Flyout Icon Visible on Startup");
            ShowFlyout(usingSwipe: true, testForFlyoutIcon: false);
            RunningApp.WaitForNoElement(FlyoutItem, "Flyout Visible on Startup");

            // Enable Flyout Test
            RunningApp.Tap(EnableFlyoutBehavior);
            ShowFlyout(usingSwipe: true);
            RunningApp.WaitForElement(FlyoutItem, "Flyout Not Visible after Enabled");
            RunningApp.Tap(FlyoutItem);

            // Flyout Icon is not visible but you can still swipe open
            RunningApp.Tap(DisableFlyoutBehavior);
            RunningApp.WaitForNoElement(FlyoutIconAutomationId, "Flyout Icon Visible after being Disabled");
            ShowFlyout(usingSwipe: true, testForFlyoutIcon: false);
            RunningApp.WaitForNoElement(FlyoutItem, "Flyout Visible after being Disabled");


            // enable flyout and make sure disabling back button behavior doesn't hide icon
            RunningApp.Tap(EnableFlyoutBehavior);
            RunningApp.WaitForElement(FlyoutIconAutomationId);
            RunningApp.Tap(DisableBackButtonBehavior);
            ShowFlyout(usingSwipe: true);
            RunningApp.WaitForElement(FlyoutItem, "Flyout swipe not working after Disabling Back Button Behavior");
            RunningApp.Tap(FlyoutItem);

            // make sure you can still open flyout via code
            RunningApp.Tap(EnableFlyoutBehavior);
            RunningApp.Tap(EnableBackButtonBehavior);
            RunningApp.Tap(OpenFlyout);
            RunningApp.WaitForElement(FlyoutItem, "Flyout not opening via code");
            RunningApp.Tap(FlyoutItem);

            // make sure you can still open flyout via code if flyout behavior is disabled
            RunningApp.Tap(DisableFlyoutBehavior);
            RunningApp.Tap(EnableBackButtonBehavior);
            RunningApp.Tap(OpenFlyout);
            RunningApp.WaitForElement(FlyoutItem, "Flyout not opening via code when flyout behavior disabled");
            RunningApp.Tap(FlyoutItem);

            // make sure you can still open flyout via code if back button behavior is disabled
            RunningApp.Tap(EnableFlyoutBehavior);
            RunningApp.Tap(DisableBackButtonBehavior);
            RunningApp.Tap(OpenFlyout);
            RunningApp.WaitForElement(FlyoutItem, "Flyout not opening via code when back button behavior is disabled");
            RunningApp.Tap(FlyoutItem);

            // FlyoutLocked ensure that the flyout and buttons are still visible
            RunningApp.Tap(EnableBackButtonBehavior);
            RunningApp.Tap(LockFlyoutBehavior);
            RunningApp.WaitForElement(title, "Flyout Locked hiding content");
            RunningApp.Tap(EnableFlyoutBehavior);
        }
Exemplo n.º 20
0
        public void Issue2680Test_ScrollEnabled()
        {
            RunningApp.Tap(q => q.Button(ToggleButtonMark));

            RunningApp.ScrollDown(ScrollViewMark);
            RunningApp.ScrollDown(ScrollViewMark);

            RunningApp.WaitForNoElement(FirstItemMark, timeout: TimeSpan.FromSeconds(5));
        }
Exemplo n.º 21
0
 public void ScrollViewInitiallyNotEnabled()
 {
     RunningApp.WaitForElement(InitiallyNotEnabled);
     RunningApp.Tap(InitiallyNotEnabled);
     RunningApp.WaitForElement(FirstItem);
     RunningApp.WaitForElement(ScrollView);
     RunningApp.ScrollDown(ScrollView, ScrollStrategy.Gesture);
     RunningApp.WaitForNoElement(Success);             // Shouldn't have scrolled, so no success label should be displayed
 }
Exemplo n.º 22
0
 public void Bugzilla34912Test()
 {
     RunningApp.Tap(q => q.Marked("Allen"));
     RunningApp.WaitForElement(q => q.Marked("You tapped Allen"));
     RunningApp.Tap(q => q.Marked("OK"));
     RunningApp.Tap(q => q.Marked("btnDisable"));
     RunningApp.Tap(q => q.Marked("Allen"));
     RunningApp.WaitForNoElement(q => q.Marked("You tapped Allen"));
 }
Exemplo n.º 23
0
        public void _46363_2_Tap_Succeeds()
        {
            RunningApp.WaitForElement(Testing);
            RunningApp.Tap(Target);
            RunningApp.WaitForElement(TapSuccess);

            // Verify that we aren't also opening the context menu
            RunningApp.WaitForNoElement(ContextAction);
        }
Exemplo n.º 24
0
 public void WhenFlyoutIsLockedButtonsAreStillVisible()
 {
     // FlyoutLocked ensure that the flyout and buttons are still visible
     RunningApp.Tap(EnableBackButtonBehavior);
     RunningApp.Tap(LockFlyoutBehavior);
     RunningApp.WaitForElement(title, "Flyout Locked hiding content");
     RunningApp.Tap(EnableFlyoutBehavior);
     RunningApp.WaitForNoElement(FlyoutItem);
 }
Exemplo n.º 25
0
 public void FlyoutDisabledDoesntOpenFlyoutWhenSetToText()
 {
     RunningApp.WaitForElement("ToggleFlyoutBehavior");
     RunningApp.Tap("ToggleFlyoutBehavior");
     RunningApp.Tap("ToggleFlyoutBehavior");
     RunningApp.WaitForElement("Flyout Behavior: Disabled");
     RunningApp.Tap(ToggleTextId);
     RunningApp.Tap("T3xt");
     RunningApp.WaitForNoElement(FlyoutOpen);
 }
Exemplo n.º 26
0
        public void Issue2794Test()
        {
            RunningApp.TouchAndHold(x => x.Marked("Cell2"));
            RunningApp.Tap(x => x.Text("Delete me first"));
            RunningApp.WaitForNoElement(q => q.Marked("Cell2"));

            RunningApp.TouchAndHold(x => x.Marked("Cell1"));
            RunningApp.Tap(x => x.Text("Delete me after"));
            RunningApp.WaitForNoElement(q => q.Marked("Cell1"));
        }
Exemplo n.º 27
0
        public void _46363_Tap_Succeeds()
        {
            RunningApp.WaitForElement(Testing);
            RunningApp.Tap(Target);
            RunningApp.WaitForElement(TapSuccess);

            // First run at fixing this caused the context menu to open on a regular tap
            // So this check is to ensure that doesn't happen again
            RunningApp.WaitForNoElement(ContextAction);
        }
Exemplo n.º 28
0
 public void Issue2883TestDisabled()
 {
     RunningApp.Screenshot("I am at Issue 2883");
     RunningApp.Tap(c => c.Marked("btnCustomCellTable"));
     RunningApp.WaitForNoElement(c => c.Marked("Clicked"));
     RunningApp.Screenshot("I dont see the disable cell");
     RunningApp.Tap(c => c.Marked("btnCustomCellListView"));
     RunningApp.WaitForNoElement(c => c.Marked("Clicked"));
     RunningApp.Screenshot("I dont see the disable cell");
 }
Exemplo n.º 29
0
 public void Issue1691Test()
 {
     RunningApp.Screenshot("I am at Issue 1691");
     RunningApp.Tap(q => q.Marked("CreatePreviousPage10"));
     RunningApp.WaitForElement(q => q.Marked("Page Created"));
     RunningApp.Screenshot("I should be on the same page with a new page created to the left");
     RunningApp.Tap(q => q.Marked("GoToPreviousPage10"));
     RunningApp.WaitForNoElement(q => q.Marked("GoToPreviousPage10"));
     RunningApp.Screenshot("I should be on page 9");
     RunningApp.WaitForElement(q => q.Marked("GoToPreviousPage9"));
 }
Exemplo n.º 30
0
        public void ButtonBlocked()
        {
            RunningApp.Tap(q => q.All().Marked(CantTouchButtonId));
            RunningApp.WaitForNoElement(q => q.All().Text(CantTouchFailText));

            RunningApp.Tap(q => q.All().Marked(CanTouchButtonId));
            RunningApp.WaitForElement(q => q.All().Text(CanTouchSuccessText));

            RunningApp.Tap(q => q.All().Marked(ListTapTarget));
            RunningApp.WaitForElement(q => q.All().Text(ListTapSuccessText));
        }