public void SuccessSignIn() { // Preparation ToSignUpBtn.Click(); Window.Get <TextBox>("Name").Enter("Name"); Window.Get <TextBox>("Surname").Enter("Surname"); Window.Get <TextBox>("Email").Enter("[email protected]"); Window.Get <TextBox>("Login").Enter(Login); Window.Get <TextBox>("Password").Enter("Password"); Window.Get <Button>("SignUp").Click(); SignOutBtn.Should().NotBe(null); SignOutBtn.Click(); // Action EnterCredentials(); SignInBtn.Click(); // At the Main window SignOutBtn.Should().NotBe(null); SignOutBtn.Click(); // Cleanup SerializationManager.ClearSerializedUsers(); }
public void SuccessSignUp() { SignUp(); // At the Main window SignOutBtn.Should().NotBe(null); SignOutBtn.Click(); // Cleanup SerializationManager.ClearSerializedUsers(); }
public void UserAlreadyExists() { SignUp(); SignOutBtn.Should().NotBe(null); SignOutBtn.Click(); ToSignUp(); SignUp(); var errorBox = Window.MessageBox(""); errorBox.Should().NotBe(null); errorBox.Get <Label>().Text .Should().Be(string.Format(Resources.UserAlreadyExistsError, Email, Login)); CloseMessageBox(); }
//Validate password has been changed public void ValidateChangedPassword() { try { GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignIn"); GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//button[text()='Sign Out']", 6); //Click on the signout button SignOutBtn.Click(); GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//a[contains(text(),'Sign')]", 6); //Clicking on SignIn link SignInLink.Click(); GenericWait.ElementIsVisible(GlobalDefinitions.driver, "Name", "email", 6); //Enter the username Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Username")); GenericWait.ElementIsVisible(GlobalDefinitions.driver, "Name", "password", 6); //Enter the new password Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "New Password")); GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//button[contains(text(),'Login')]", 6); //Click on the Login button LoginBtn.Click(); //Validating user succesfully login after with the changed password GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//div[@class ='ui compact menu']//span[@class = 'item ui dropdown link '][contains(text(),'Hi')]", 6); if (UserWelcomeLink.Displayed) { Assert.IsTrue(true); Base.test.Log(LogStatus.Pass, "User new password has been changed successfully"); } else { Assert.IsTrue(false, "User new password has failed to update"); Base.test.Log(LogStatus.Fail, "User new password has failed to update"); } } catch (Exception e) { Base.test.Log(LogStatus.Fail, "Exception found For Change Password", e.Message); } /*Resetting the password*/ //Retreiving passwords values from the excel GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ChangePassword"); String CurrentPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "NewPassword"); String NewPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "Password"); String ConfirmPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "Password"); //Clicking on User welcome name link UserWelcomeLink.Click(); GenericWait.ElementIsVisible(GlobalDefinitions.driver, "LinkText", "Change Password", 5); //Clicking on change password link ChangePasswordLink.Click(); //Entering the current password CurrentPasswordTextbox.SendKeys(CurrentPasswordValue); //Entering the new password password NewPasswordTextbox.SendKeys(NewPasswordValue); //Entering the confirm password ConfirmPasswordTextbox.SendKeys(ConfirmPasswordValue); //Clicking on the save button SaveButton.Click(); }
internal void SignOutSteps() { SignOutBtn.Click(); }