Exemplo n.º 1
0
        public void FromElementTestCase()
        {
            server.respondTo("POST", "/element", new Dictionary <string, object>  {
                { "ELEMENT", '5' }
            });
            AppiumWebElement element = (AppiumWebElement)driver.FindElementByAndroidUIAutomator(".elements()");

            server.clear();
            server.respondTo("POST", "/element/5/element", new Dictionary <string, object>  {
                { "ELEMENT", '6' }
            });
            element.FindElementByAndroidUIAutomator(".elements()");
            server.clear();
            List <object> results = new List <object>();

            results.Add(new Dictionary <string, object> {
                { "ELEMENT", "4" }
            });
            server.respondTo("POST", "/element/5/elements", results);
            element.FindElementsByAndroidUIAutomator(".elements()");
        }