public int GetCurrentPage()
        {
            driver.RemoveImplicitWait();
            int currentPage;

            try
            {
                currentPage = Int32.Parse(this.Table.FindElement(By.ClassName("PagerStyle")).FindElement(By.TagName("span")).Text);
            }
            catch (Exception)
            {
                currentPage = 1;
            }
            driver.AddImplicitWait();
            return(currentPage);
        }
Beispiel #2
0
 protected void AssertIsAt()
 {
     try
     {
         validation.AssertIsTrue(IsAt(), "Page Navigation to " + GetType() + " failed");
     }
     catch
     {
         _test.Log(Status.Fail, "Page Navigation to " + GetType() + " failed");
         Assert.Fail();
     }
     driver.RemoveImplicitWait();
     try
     {
         validation.AssertIsTrue(ElementsExist(), "Element Missing on " + GetType() + " page");
     }
     catch
     {
         _test.Log(Status.Fail, "Element Missing on " + GetType() + " page");
         Assert.Fail();
     }
     driver.AddImplicitWait();
 }