Ejemplo n.º 1
0
        public void FindElementsByAccessibilityIdTestCase()
        {
            IOSDriver <IWebElement> driver  = new IOSDriver <IWebElement>(defaultUri, capabilities);
            List <object>           results = new List <object>();

            results.Add(new Dictionary <string, object> {
                { "ELEMENT", "4" }
            });
            results.Add(new Dictionary <string, object> {
                { "ELEMENT", "6" }
            });
            results.Add(new Dictionary <string, object> {
                { "ELEMENT", "8" }
            });
            server.respondTo("POST", "/elements", results);
            ICollection <IWebElement> elements = driver.FindElementsByAccessibilityId(".elements()");

            Assert.AreEqual(elements.Count, 3);
        }
 public override IEnumerable <IOSElement> FindAllElements(IOSDriver <IOSElement> searchContext)
 {
     return(searchContext.FindElementsByAccessibilityId(Value).AsEnumerable());
 }
Ejemplo n.º 3
0
        public void TestShouldFindElementsByAccessibilityId()
        {
            ICollection <IOSElement> elements = driver.FindElementsByAccessibilityId("ComputeSumButton");

            Assert.AreEqual(1, elements.Count);
        }