public void btnMaisTardeSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnMaisTarde");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.widget.Button", @"//*[@resource-id='android:id/button3']", @"//*[@text='Mais tarde' or @label='Mais tarde']", @"//*/android.widget.Button[@text='Mais tarde']", @"//*[@resource-id='android:id/buttonPanel']/*[1]", @"//*[@resource-id='android:id/buttonPanel']//*[@text='Mais tarde']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.widget.Button";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"XCUIElementTypeWindow/XCUIElementTypeOther[2]/XCUIElementTypeAlert/XCUIElementTypeOther/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[2]/XCUIElementTypeButton", @"//*[@name='Mais tarde']", @"//*[@text='Mais tarde' or @label='Mais tarde']", @"//*/XCUIElementTypeButton[@label='Mais tarde']", @"//*[@label='Avalie o app']/*[1]/*[2]/*[1]/*[3]/*[2]/*[1]", @"//*[@label='Avalie o app']//*[@label='Mais tarde']" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther[2]/XCUIElementTypeAlert/XCUIElementTypeOther/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[2]/XCUIElementTypeButton";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void btnMenuSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnMenu");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ImageButton";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*/XCUIElementTypeStaticText[@label='Movies']" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeNavigationBar/XCUIElementTypeStaticText";
            }

            string[] selectorsType = new string[] { @"ElementType" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 3
0
        public void selboloSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("selbolo");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"//*[@content-desc='De Brigadeiro apenas R$ 24' or @label='De Brigadeiro']", @"//*/android.view.View[@content-desc='De Brigadeiro apenas R$ 24']", @"", @"//*[@resource-id='android:id/content']//*[@content-desc='De Brigadeiro apenas R$ 24']", @"//*[@resource-id='android:id/content']/*[1]/*[1]/*[1]/*[3]/*[1]/*[1]/*[1]/*[1]/*[1]/*[1]", @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*[@content-desc='De Brigadeiro apenas R$ 24' or @label='De Brigadeiro']", @"//*/UIALink[@label='De Brigadeiro']", @"//*[@name='De Brigadeiro']", @"//*[@label='De Brigadeiro apenas R$ 24']//*[@label='De Brigadeiro']", @"//*[@label='De Brigadeiro apenas R$ 24']/*[2]", @"AppiumAUT/UIAApplication/UIAWindow/UIAScrollView[2]/UIAWebView/UIALink[3]/UIALink" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIAScrollView[2]/UIAWebView/UIALink[3]/UIALink";
            }

            string[] selectorsType = new string[] { @"CrossPlatform", @"ElementType", @"IdentifyAttributes", @"AncestorAttributes", @"AncestorIndex", @"AbsolutePath" };

            IWebElement e = _locator.FindElementByXPathInOrder(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 4
0
        public void btnMenuSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnMenu");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ImageButton", @"", @"//*[@label='Movies']", @"", @"//*[@resource-id='android:id/content']/*[1]/*[1]/*[1]/*[2]/*[1]/*[1]/*[1]/*[1]", @"//*[@resource-id='android:id/content']//*[]" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ImageButton";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeNavigationBar/XCUIElementTypeStaticText", @"//*[@name='Movies']", @"//*[@label='Movies']", @"//*/XCUIElementTypeStaticText[@label='Movies']", @"//*[@name='Movies']/*[3]", @"//*[@name='Movies']//*[@label='Movies']" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeNavigationBar/XCUIElementTypeStaticText";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 5
0
        public void btnnovoSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnnovo");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.support.v7.widget.LinearLayoutCompat/android.widget.TextView[2]", @"", @"//*[@content-desc='Add' or @label='More']", @"//*/android.widget.TextView[@content-desc='Add']", @"//*[@resource-id='android:id/content']/*[1]/*[1]/*[1]/*[1]/*[2]", @"//*[@resource-id='android:id/content']//*[@content-desc='Add']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.support.v7.widget.LinearLayoutCompat/android.widget.TextView[2]";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"AppiumAUT/UIAApplication/UIAWindow/UIATabBar/UIAButton[2]", @"//*[@name='More']", @"//*[@content-desc='Add' or @label='More']", @"//*/UIAButton[@label='More']", @"//*[@label='todo']/*[1]/*[4]/*[4]", @"//*[@label='todo']//*[@label='More']" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIATabBar/UIAButton[2]";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void btnsearchSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnsearch");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View/android.view.View[2]/android.view.View/android.view.View/android.view.View[3]", @"//*[@resource-id='search']", @"//*[@content-desc='Search For a Market' or @label='Search For a Market']", @"//*/android.view.View[@content-desc='Search For a Market']", @"//*[@resource-id='defaultView']/*[3]", @"//*[@resource-id='defaultView']//*[@content-desc='Search For a Market']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View/android.view.View[2]/android.view.View/android.view.View/android.view.View[3]";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"AppiumAUT/UIAApplication/UIAWindow/UIAScrollView/UIAWebView/UIALink[2]/UIAStaticText", @"//*[@name='Search For a Market']", @"//*[@content-desc='Search For a Market' or @label='Search For a Market']", @"//*/UIAStaticText[@label='Search For a Market']", @"//*[@label='Search For a Market']/*[1]", @"//*[@label='Search For a Market']//*[@label='Search For a Market']" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIAScrollView/UIAWebView/UIALink[2]/UIAStaticText";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 7
0
        public void btnaddSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnadd");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.LinearLayout/android.widget.Button", @"//*[@resource-id='com.xamarin.samples.taskyandroid:id/AddButton']", @"//*[@text='Add Task' or @label='Add']", @"//*/android.widget.Button[@text='Add Task']", @"//*[@resource-id='android:id/content']/*[1]/*[1]", @"//*[@resource-id='android:id/content']//*[@text='Add Task']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.LinearLayout/android.widget.Button";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"AppiumAUT/UIAApplication/UIAWindow/UIANavigationBar/UIAButton[2]", @"//*[@name='Add']", @"//*[@text='Add Task' or @label='Add']", @"//*/UIAButton[@label='Add']", @"//*[@name='Tasky']/*[4]", @"//*[@name='Tasky']//*[@label='Add']" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIANavigationBar/UIAButton[2]";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void selboloSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("selbolo");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[3]/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View/android.view.View";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"AppiumAUT/UIAApplication/UIAWindow/UIAScrollView[2]/UIAWebView/UIALink[3]/UIALink" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIAScrollView[2]/UIAWebView/UIALink[3]/UIALink";
            }

            string[] selectorsType = new string[] { @"AbsolutePath" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void btnnovoSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnnovo");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"//*/android.widget.TextView[@content-desc='Add']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/android.support.v7.widget.LinearLayoutCompat/android.widget.TextView[2]";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*/UIAButton[@label='More']" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIATabBar/UIAButton[2]";
            }

            string[] selectorsType = new string[] { @"ElementType" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 10
0
        public void btnMaisTardeSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnMaisTarde");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"//*[@text='Mais tarde' or @label='Mais tarde']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.widget.Button";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*[@text='Mais tarde' or @label='Mais tarde']" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther[2]/XCUIElementTypeAlert/XCUIElementTypeOther/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[2]/XCUIElementTypeButton";
            }

            string[] selectorsType = new string[] { @"CrossPlatform" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 11
0
        public void btnaddSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnadd");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"//*[@text='Add Task' or @label='Add']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.LinearLayout/android.widget.Button";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*[@text='Add Task' or @label='Add']" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIANavigationBar/UIAButton[2]";
            }

            string[] selectorsType = new string[] { @"CrossPlatform" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void btnMenuSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnMenu");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View/android.view.View/android.widget.Button";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*[@name='']" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeButton";
            }

            string[] selectorsType = new string[] { @"IdentifyAttributes" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void btnselSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnsel");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.ListView/android.widget.LinearLayout[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.widget.TextView", @"", @"//*[@text='Teste Empresa' or @label='Teste Empresa']", @"//*/android.widget.TextView[@text='Teste Empresa']", @"//*[@resource-id='android:id/content']/*[1]/*[1]/*[1]/*[2]/*[1]/*[1]/*[1]/*[1]/*[1]/*[2]/*[1]/*[1]/*[1]/*[2]/*[1]/*[1]/*[1]", @"//*[@resource-id='android:id/content']//*[@text='Teste Empresa']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.widget.ListView/android.widget.LinearLayout[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.widget.TextView";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"AppiumAUT/UIAApplication/UIAWindow/UIATableView/UIATableCell[2]/UIAButton/UIAStaticText", @"//*[@name='Teste Empresa']", @"//*[@text='Teste Empresa' or @label='Teste Empresa']", @"//*/UIAStaticText[@label='Teste Empresa']", @"//*[@value='rows 1 to 2 of 2']/*[2]/*[1]/*[1]", @"//*[@value='rows 1 to 2 of 2']//*[@label='Teste Empresa']" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIATableView/UIATableCell[2]/UIAButton/UIAStaticText";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 14
0
        public void btnTopRatedSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnTopRated");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[4]/android.widget.TextView[2]" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[4]/android.widget.TextView[2]";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther[2]/XCUIElementTypeOther[2]/XCUIElementTypeOther[3]/XCUIElementTypeOther[2]" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther[2]/XCUIElementTypeOther[2]/XCUIElementTypeOther[3]/XCUIElementTypeOther[2]";
            }

            string[] selectorsType = new string[] { @"AbsolutePath" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }


            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
        public void btnTopRatedSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnTopRated");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[4]/android.widget.TextView[2]", @"", @"//*[@text='Top Rated' or @label=' Top Rated']", @"//*/android.widget.TextView[@text='Top Rated']", @"//*[@resource-id='android:id/content']/*[1]/*[1]/*[1]/*[2]/*[1]/*[1]/*[1]/*[1]/*[6]/*[2]", @"//*[@resource-id='android:id/content']//*[@text='Top Rated']" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.support.v4.widget.DrawerLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[4]/android.widget.TextView[2]";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther[2]/XCUIElementTypeOther[2]/XCUIElementTypeOther[3]/XCUIElementTypeOther[2]", @"//*[@name=' Top Rated']", @"//*[@text='Top Rated' or @label=' Top Rated']", @"//*/XCUIElementTypeOther[@label=' Top Rated']", @"//*[@label=' Now Playing  Top Rated  Upcoming']/*[2]", @"//*[@label=' Now Playing  Top Rated  Upcoming']//*[@label=' Top Rated']" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeScrollView/XCUIElementTypeOther[2]/XCUIElementTypeOther[2]/XCUIElementTypeOther[3]/XCUIElementTypeOther[2]";
            }

            string[] selectorsType = new string[] { @"AbsolutePath", @"IdentifyAttributes", @"CrossPlatform", @"ElementType", @"AncestorIndex", @"AncestorAttributes" };

            IWebElement e = _locator.FindElementByXPathMultiLocator(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 16
0
        public void btnMenuSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnMenu");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"//*[@content-desc='' or @label='']", @"//*/android.widget.Button[@content-desc='']", @"", @"//*[@content-desc='agenda']//*[@content-desc='']", @"//*[@content-desc='agenda']/*[1]/*[1]/*[1]/*[1]", @"hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View/android.view.View/android.widget.Button" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View/android.view.View/android.widget.Button";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*[@content-desc='' or @label='']", @"//*/XCUIElementTypeButton[@label='']", @"//*[@name='']", @"//*[@label='banner']//*[@label='']", @"//*[@label='banner']/*[1]", @"XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeButton" };
                contingencyXPathSelector = "XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeButton";
            }

            string[] selectorsType = new string[] { @"CrossPlatform", @"ElementType", @"IdentifyAttributes", @"AncestorAttributes", @"AncestorIndex", @"AbsolutePath" };

            IWebElement e = _locator.FindElementByXPathInOrder(selectors, selectorsType);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }
Exemplo n.º 17
0
        public void btnaddSendClick_Test()
        {
            ForceUpdateScreen();
            Exec.Instance.AddEvent("btnadd");

            string[] selectors = new string[0];
            string   contingencyXPathSelector = "";

            if (ProjectConfig.PlataformName == "Android")
            {
                selectors = new string[] { @"//*[@resource-id='android:id/content']/*[1]/*[1]/*[1]/*[2]/*[1]/*[1]/*[2]/*[1]/*[1]" };
                contingencyXPathSelector = "hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.view.ViewGroup/android.view.ViewGroup/android.view.ViewGroup[2]/android.widget.FrameLayout/android.widget.ImageButton";
            }
            else if (ProjectConfig.PlataformName == "iOS")
            {
                selectors = new string[] { @"//*[@name='Ofertados']/*[4]" };
                contingencyXPathSelector = "AppiumAUT/UIAApplication/UIAWindow/UIANavigationBar/UIAButton[2]";
            }

            string[] selectorsType = new string[] { @"AncestorIndex" };

            IWebElement e = _locator.FindElementByXPath(selectors[0], selectorsType[0]);

            if (e == null)
            {
                e = _locator.FindElementByContingencyXPath(contingencyXPathSelector);
                if (e != null)
                {
                    Exec.Instance.CurrentEvent.UsedContingencyXPathSelector = true;
                }
            }

            e.Click();

            /*Insert your assert here*/

            Exec.Instance.CurrentEvent.EndSucessfull();
        }