Ejemplo n.º 1
0
 public void ShouldLogIn()
 {
     Helper.GetLoginDetails(1, 2);
     pagetest.LogIn(Helper.Username, Helper.Password);
     Helper.WaitForElement(By.Id("employee-list-container"));
     Assert.IsTrue(Helper.elementexists(By.CssSelector("#employee-list-container")));
 }
Ejemplo n.º 2
0
 public virtual void Setuppage()
 {
     pageTest = new LogInPage();
     pageTest.PageLoad();
     Helper.GetLoginDetails(1, 2);
     pageTest.LogIn(Helper.Username, Helper.Password);
 }
Ejemplo n.º 3
0
        public void NoCredsEditPage()
        {
            pageTest = new LogInPage();
            pageTest.PageLoad();
            Helper.GetLoginDetails(1, 2);
            pageTest.LogIn(Helper.Username, Helper.Password);
            Helper.WaitForElement(EmployeePage.EmployeeElement);
            Setup.cDriver.FindElement(EmployeePage.EmployeeElement).Click();
            Setup.cDriver.FindElement(EmployeePage.EditButton).Click();
            Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["SleepTimeout"]));
            string      employeeURL  = Setup.cDriver.Url;
            IWebElement logOutButton = Setup.cDriver.FindElement(By.CssSelector("body > div > header > div > p.main-button"));

            logOutButton.Click();
            Setup.SetWebpage(employeeURL);
            Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["SleepTimeout"]));
            string currentURL = Setup.cDriver.Url;

            Helper.GetURL(3);
            Assert.AreEqual(currentURL, Helper.URL);
        }