Пример #1
0
        public void Login_CorrectEmail_CorrectPassword()
        {
            var loginBO = new LoginBO();

            loginPage.LoginApplication(loginBO.email, loginBO.password);
            var expectedResult = loginBO.username;
            var actualResult   = driver.FindElement(By.CssSelector(".account > span:nth-child(1)")).Text;

            Assert.AreEqual(expectedResult, actualResult);
        }
        public void TestInitialize()
        {
            // Access site
            driver = new ChromeDriver();
            wait   = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
            driver.Manage().Window.Maximize();
            driver.Navigate().GoToUrl("http://automationpractice.com/");
            wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector(".login")));
            driver.FindElement(By.CssSelector(".login")).Click();

            // Login
            var loginPage = new MS_LoginPage(driver);

            loginBO = new LoginBO();
            loginPage.LoginApplication(loginBO.email, loginBO.password);
        }