public void FindElementTestCase()
        {
            By byAccessibilityId = new ByAccessibilityId("Graphics");
            Assert.AreNotEqual(driver.FindElement(byAccessibilityId).Text, null);
            Assert.GreaterOrEqual(driver.FindElements(byAccessibilityId).Count, 1);

            driver.FindElementByAccessibilityId ("Graphics").Click ();
            Assert.IsNotNull (driver.FindElementByAccessibilityId ("Arcs"));
            driver.Navigate ().Back ();

            Assert.IsNotNull(driver.FindElementByName("App"));

            Assert.IsNotNull(driver.FindElement(new ByAndroidUIAutomator("new UiSelector().clickable(true)")).Text);
            var els = driver.FindElementsByAndroidUIAutomator ("new UiSelector().clickable(true)");
            Assert.GreaterOrEqual(els.Count, 12);

            var els2 = driver.FindElements(new ByAndroidUIAutomator("new UiSelector().enabled(true)"));
            Assert.GreaterOrEqual(els2.Count, 20);

            els = driver.FindElementsByAndroidUIAutomator("new UiSelector().enabled(true)");
            Assert.GreaterOrEqual (els.Count, 20);
            Assert.IsNotNull (driver.FindElementByXPath ("//android.widget.TextView[@text='API Demos']"));
        }
Beispiel #2
0
 public void FindByAccessibilityIdTest()
 {
     By byAccessibilityId = new ByAccessibilityId("ComputeSumButton");
     Assert.AreNotEqual(driver.FindElement(byAccessibilityId).Text, null);
     Assert.GreaterOrEqual(driver.FindElements(byAccessibilityId).Count, 1);
 }
 public void FindByAccessibilityIdTest()
 {
     By byAccessibilityId = new ByAccessibilityId("Graphics");
     Assert.AreNotEqual(driver.FindElementById("android:id/content").FindElement(byAccessibilityId).Text, null);
     Assert.GreaterOrEqual(driver.FindElementById("android:id/content").FindElements(byAccessibilityId).Count, 1);
 }