public void LogingInWithIncorrectData() { HomeForm home = new HomeForm(); string expected = "2018 FIFA World Cup Russia™"; string actual = home.Header.GetTitleText; Assert.AreEqual(expected.ToLower(), actual.ToLower()); home.Header.OpenLoginForm(); LoginPopup loginPopup = new LoginPopup(); expected = loginPopup.GetLoginDescription; actual = "Please sign in to your FIFA.com user account below. This will allow you to make the most of your account with personalization, plus get access to commenting tools, exclusive games, the chance to win cool football prizes and much, much more."; Assert.AreEqual(expected, actual); loginPopup.Login(); LoginForm loginForm = new LoginForm(); loginForm.SubmitLoginForm("[email protected]", "2lVyjYxxXks5K1"); loginForm.SignIn(); Browser.Wait.Until(ExpectedConditions.ElementIsVisible(loginForm.WrongDataAlert.Locator)); expected = "We can't seem to find your account."; actual = loginForm.GetAllert; Assert.AreEqual(expected, actual); }
public void LogOut() { HomeForm home = new HomeForm(); string expected = "2018 FIFA World Cup Russia™"; string actual = home.Header.GetTitleText; Assert.AreEqual(expected.ToLower(), actual.ToLower()); home.Header.OpenLoginForm(); LoginPopup loginPopup = new LoginPopup(); expected = loginPopup.GetLoginDescription; actual = "Please sign in to your FIFA.com user account below. This will allow you to make the most of your account with personalization, plus get access to commenting tools, exclusive games, the chance to win cool football prizes and much, much more."; Assert.AreEqual(expected, actual); loginPopup.Login(); LoginForm loginForm = new LoginForm(); loginForm.SubmitLoginForm("*****@*****.**", "2lVyjYxxXks5K"); loginForm.SignIn(); home.Header.OpenLoginForm(); loginPopup.LogOut(); home.Header.OpenLoginForm(); expected = loginPopup.GetLoginDescription; actual = "Please sign in to your FIFA.com user account below. This will allow you to make the most of your account with personalization, plus get access to commenting tools, exclusive games, the chance to win cool football prizes and much, much more."; Assert.AreEqual(expected, actual); }
public void Given_home_page_When_click_login_link_Then_login_form_is_shown() { HomePage homePage = new HomePage(_chromeDriver); LoginPopup loginPopup = new LoginPopup(_chromeDriver); homePage.LoginViaLink.Click(); Assert.AreEqual(loginPopup.LoginPopupTitle.Text, "Вход"); }
private static bool GetLicense() { LoginPopup loginPopup = new LoginPopup(); if (loginPopup.ShowDialog() == DialogResult.OK) { var license = loginPopup.license; SettingsManager.SetSetting("license", license); return true; } return false; }
public void Given_home_page_When_click_login_link_enter_email_and_submit_Then_user_can_login() { HomePage homePage = new HomePage(_chromeDriver); LoginPopup loginPopup = new LoginPopup(_chromeDriver); ProfilePage profilePage = new ProfilePage(_chromeDriver); homePage.LoginViaLink.Click(); loginPopup.EnterCredentials("*****@*****.**", "1234qweRty/"); loginPopup.SubmitLogin(); Assert.AreEqual(profilePage.WelcomePopupTitle.Text, "Добро пожаловать в Quizlet!"); }
/// <summary> /// Logs in. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LoginButton_Click(object sender, RoutedEventArgs e) { // If the credentials are saved, open those, else open the login popup if (File.Exists("Credentials") == true) { // Ask the Encryption password using the EncryptionPasswordPopup EncryptionPasswordPopup popup = new EncryptionPasswordPopup(); //Show the popup popup.Show(); } else { // Create a new instance of the LoginPopup class LoginPopup loginPopup = new LoginPopup(); // Show the popup loginPopup.Show(); } }