コード例 #1
0
        public void AuthWithInvalidLogin(string browserName)
        {
            IWebDriver driver = InitDriver(browserName);

            GmailLoginPage gmailLogin = new GmailLoginPage(driver);

            gmailLogin.InputLogin(ConfigurationManager.AppSettings["InvalidLogin"]);
            gmailLogin.SubmitLogin();
            Assert.True(gmailLogin.IsLoginErrorLabelPresented(driver), "Login Error Labeln  is not presented");

            QuitDriver(driver);
        }
コード例 #2
0
        private void SetUpAuth(IWebDriver driver)
        {
            GmailLoginPage gmailLogin = new GmailLoginPage(driver);

            gmailLogin.InputLogin(ConfigurationManager.AppSettings["ValidLogin"]);
            gmailLogin.SubmitLogin();

            GmailPasswordPage gmailPassword = new GmailPasswordPage(driver);

            gmailPassword.InputPassword(ConfigurationManager.AppSettings["ValidPassword"]);
            gmailPassword.SubmitPassword();
        }
コード例 #3
0
        public void FailCheck(string browserName)
        {
            IWebDriver driver = InitDriver(browserName);

            GmailLoginPage gmailLogin = new GmailLoginPage(driver);

            gmailLogin.InputLogin(ConfigurationManager.AppSettings["InvalidLogin"]);
            gmailLogin.SubmitLogin();

            GmailPasswordPage gmailPassword = new GmailPasswordPage(driver);

            Assert.True(gmailPassword.IsLoginApplied(), "Password page is not opened");

            QuitDriver(driver);
        }
コード例 #4
0
        public void AuthWithInvalidPassword(string browserName)
        {
            IWebDriver driver = InitDriver(browserName);

            GmailLoginPage gmailLogin = new GmailLoginPage(driver);

            gmailLogin.InputLogin(ConfigurationManager.AppSettings["ValidLogin"]);
            gmailLogin.SubmitLogin();

            GmailPasswordPage gmailPassword = new GmailPasswordPage(driver);

            gmailPassword.InputPassword(ConfigurationManager.AppSettings["InvalidPassword"]);
            gmailPassword.SubmitPassword();
            Assert.True(gmailPassword.IsPasswordErrorLabelPresented(),
                        "Password Error Lable is not presented");

            QuitDriver(driver);
        }
コード例 #5
0
        public void AuthWithValidData(string browserName)
        {
            IWebDriver driver = InitDriver(browserName);

            GmailLoginPage gmailLogin = new GmailLoginPage(driver);

            gmailLogin.InputLogin(ConfigurationManager.AppSettings["ValidLogin"]);
            gmailLogin.SubmitLogin();

            GmailPasswordPage gmailPassword = new GmailPasswordPage(driver);

            gmailPassword.InputPassword(ConfigurationManager.AppSettings["ValidPassword"]);
            gmailPassword.SubmitPassword();

            GmailInboxPage gmailInbox = new GmailInboxPage(driver);

            Assert.True(gmailInbox.IsLoginSucceed(driver), "User was not logged in");

            QuitDriver(driver);
        }