Beispiel #1
0
        /// <summary>
        /// Method to verify Weight tracker page ui
        /// </summary>
        public void ValidatePageUI(List <string[]> elements, string trackerPageName)
        {
            string pagename = pageName;

            Thread.Sleep(3000);
            for (int i = 0; i < elements.Count(); i++)
            {
                string locatorname = elements.ElementAt(i)[3];
                string elementname = elements.ElementAt(i)[2];
                string action      = elements.ElementAt(i)[4];
                if (action.ToLower().Equals("verifytext"))
                {
                    string expectedtxt = elements.ElementAt(i)[5];
                    string actual      = AppiumKeywords.GetText(pagename, locatorname, pckgname);
                    softAssertions.Add(elementname, expectedtxt, actual, "contains");
                }
                else if (action.ToLower().Equals("verifyexists"))
                {
                    bool actualstatus = AppiumKeywords.IsElementPresent(pagename, locatorname, pckgname);
                    softAssertions.Add(elementname, true, actualstatus, "equals");
                }
                if (i == 6)
                {
                    pagename = trackerPageName;
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// This method verified a dashboard element
        /// </summary>
        /// <returns></returns>
        public Boolean AtDashboard()
        {
            Thread.Sleep(4000);
            bool status;

            status = AppiumKeywords.IsElementPresent(pageName, "welcomepagetitle", pckgname);
            return(status);
        }
Beispiel #3
0
 public void VerifyDashboardHeader(List <string[]> dashboardui)
 {
     // Verify client logo, notification icon are displayed
     for (int i = 0; i < dashboardui.Count; i++)
     {
         string elementname = dashboardui.ElementAt(i)[2];
         string locatorname = dashboardui.ElementAt(i)[3];
         bool   status      = AppiumKeywords.IsElementPresent(pageName, locatorname, pckgname);
         softAssertions.Add(" Element : " + elementname, true, status, "equals");
     }
 }
Beispiel #4
0
        /// <summary>
        /// Verifies elements are displayed on login page
        /// </summary>
        /// <returns></returns>
        public void VerifyElements()
        {
            List <string[]> options = new List <string[]>();

            options = CSVReaderDataTable.GetCSVData("MobileLoginUI", pageName, "elements");
            for (int i = 0; i < options.Count; i++)
            {
                string elementname = options.ElementAt(i)[2];
                string locatorname = options.ElementAt(i)[3];
                bool   status      = AppiumKeywords.IsElementPresent(pageName, locatorname, pckgname);
                softAssertions.Add(" Element : " + elementname, true, status, "equals");
            }
        }
Beispiel #5
0
        public Boolean VerifyEstrmSectionPresent()
        {
            bool status = AppiumKeywords.IsElementPresent(pageName, "estrmsection", pckgname);

            return(status);
        }
Beispiel #6
0
        /// <summary>
        /// This method verifies user is at login page
        /// </summary>
        /// <returns></returns>
        public Boolean AtLoginPage()
        {
            bool status = AppiumKeywords.IsElementPresent(pageName, "loginbtn", pckgname);

            return(status);
        }