コード例 #1
0
        public void TestOnTrueLoginAndPassword(string login, string password)
        {
            LoginPageMail loginPageMail = new LoginPageMail(driver);

            loginPageMail.loginAs(login, password);

            wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//span[contains(.,'Написать письмо')]")));
            var searchElement = driver.FindElement(By.XPath("//span[contains(.,'Написать письмо')]"));

            Assert.IsTrue(searchElement.Displayed);
        }
コード例 #2
0
        public void TestOnFalseLoginAndPassword(string login, string password, string errorText)
        {
            By erroreLocator = By.XPath("//div[@id='mailbox:error']");

            LoginPageMail loginPageMail = new LoginPageMail(driver);

            loginPageMail.loginAs(login, password);

            wait.Until(ExpectedConditions.ElementToBeClickable(erroreLocator));
            var searchElement = driver.FindElement(erroreLocator);

            Assert.IsTrue(errorText == searchElement.Text);
        }