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);
        }
        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();
        }
        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);
        }
        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);
        }
        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);
        }