Exemple #1
0
        public void ScrollToExactTestCase()
        {
            AppiumWebElement table  = driver.FindElement(new ByIosUIAutomation(".tableViews()[0]"));
            AppiumWebElement slider = table.FindElement(
                new ByIosUIAutomation(".scrollToElementWithPredicate(\"name CONTAINS 'Slider'\")"));

            Assert.AreEqual(slider.GetAttribute("name"), "Sliders");
        }
Exemple #2
0
        /// <summary>
        /// Closes a tab in the view with the specified item name.
        /// </summary>
        /// <param name="name">The name of the item to close.</param>
        public void CloseTab(string name)
        {
            this.VerifyElementShown(this.tabListViewQuery, TimeSpan.FromSeconds(2));
            AppiumWebElement item        = this.Tabs.FirstOrDefault(element => element.VerifyNameOrAutomationIdEquals(name));
            Button           closeButton = item.FindElement(this.closeTabButtonQuery);

            closeButton.Click();
        }
 public static void SetTimePickerValue(this AppiumWebElement element, TimeSpan time)
 {
     element.FindElement(Hour).FindElementByName(time.ToString("%h")).Click();
     element.FindElement(Minute).FindElementByName(time.ToString("mm")).Click();
 }