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(); }
// add more stuff here for last name... etc public SCSignInPage SignInToSC() { // this will bring user to the sign-in page SignInBtn.Click(); return(new SCSignInPage()); }
// User Registered Successfully public void OnUserRegistered(object sender, EventArgs e) { MetroFramework.MetroMessageBox.Show(this, "Veuillez vous connecter à votre compte !", "Eregistré(e) avec succés", MessageBoxButtons.OK, MessageBoxIcon.Information); SignInBtn.PerformClick(); }
public void TypeCredentials() { //Thread.Sleep(1000); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); InputUsername.SendKeys(email); NextBtn.Click(); //Thread.Sleep(1000); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); InputPassword.SendKeys("Webapp!1"); SignInBtn.Click(); }
public void EnterUserDetail() { SignInBtn.Click(); EmailAddress.SendKeys("*****@*****.**"); BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); CreateAcccontBtn.Click(); // AC 4.1 create user account Gender.Click(); FirstName.SendKeys("Nadeem"); LastName.SendKeys("Digital"); Password.SendKeys("123qwe"); SelectElement DropDay = new SelectElement(Day); DropDay.SelectByValue("10"); SelectElement DropMonth = new SelectElement(Month); DropMonth.SelectByValue("9"); SelectElement DropYear = new SelectElement(Year); DropYear.SelectByValue("2020"); CheckedSpecialOffer.Click(); AddressFirstName.SendKeys("Nadeem"); AddressLastName.SendKeys("Digital"); Company.SendKeys("Test Digital Company"); Address1.SendKeys("Leeds Town"); Address2.SendKeys("LS1"); City.SendKeys("Leeds"); SelectElement DropDown = new SelectElement(State); DropDown.SelectByText("Florida"); PostCode.SendKeys("00012"); AdditionalInfo.SendKeys("This is first programme of testig"); MobileNo.SendKeys("123456789"); AddressFutureRef.SendKeys("NB_Test"); ClickRegisterUser.Click(); //AC 4.4 verify account namme Assert.AreEqual("Nadeem Digital", VerifyUser.Text); Console.WriteLine(VerifyUser.Text + " Displayed"); Bpage.Imp_wait(); //AC 4.3 verify user taken to MY ACCOUNT page Assert.IsTrue(Pageheading.Displayed); Console.WriteLine(Pageheading.Text + " Displayed"); SignOut.Click(); }
/// <summary> /// Method to perform Click Operations on the screen /// </summary> /// <param name="elementName"></param> public override void ClickOperation(string elementName) { switch (elementName.ToUpper()) { case "SIGN IN": SignInBtn.ClickOnElement(); break; case "CREATE AN ACCOUNT": CreateAnAccountBtn.ClickOnElement(); break; } }
public void UserDoesntExist() { EnterCredentials(); SignInBtn.Click(); var errorBox = Window.MessageBox(""); errorBox.Should().NotBe(null); errorBox.Get <Label>().Text .Should().Be(string.Format(Resources.UserDoesntExistError, Login)); CloseMessageBox(); }
public void EnterInvalidDetail() { SignInBtn.Click(); EmailAddress.SendKeys("*****@*****.**"); BasePage.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10); CreateAcccontBtn.Click(); Gender.Click(); // first name and last name not entered to get the error FirstName.SendKeys(""); LastName.SendKeys(""); Password.SendKeys("123qwe"); SelectElement DropDay = new SelectElement(Day); DropDay.SelectByValue("10"); SelectElement DropMonth = new SelectElement(Month); DropMonth.SelectByValue("9"); SelectElement DropYear = new SelectElement(Year); DropYear.SelectByValue("2020"); CheckedSpecialOffer.Click(); AddressFirstName.SendKeys("Nadeem"); AddressLastName.SendKeys("Digital"); Company.SendKeys("Test Digital Company"); Address1.SendKeys("Leeds Town"); Address2.SendKeys("LS1"); City.SendKeys("Leeds"); SelectElement DropDown = new SelectElement(State); DropDown.SelectByText("Florida"); PostCode.SendKeys("00012"); AdditionalInfo.SendKeys("This is first programme of testig"); MobileNo.SendKeys("123456789"); AddressFutureRef.SendKeys("NB_Test"); ClickRegisterUser.Click(); //AC 4.2 verify the error message Assert.IsTrue(CreatAnAccoutError.Displayed); Console.WriteLine(CreatAnAccoutError.Text + " Displayed"); }
//write a method for this page operation here and call it in the programe public void LoginSteps() { //initialize excel sheet by calling the ExcelLib GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignInPage"); SignInBtn.Click(); //wait GlobalDefinitions.wait(5); EenterEmail.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email")); EnterPwd.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password")); LogInBtn.Click(); //Wait for the user name is visible GlobalDefinitions.wait(30); //return the ProfilePageObject }
public AuthWindow() { InitializeComponent(); db = new ApplicationContext(); DoubleAnimation btnAnimation = new DoubleAnimation(); DoubleAnimation btnAnimation1 = new DoubleAnimation(); btnAnimation.From = 0; btnAnimation.To = 268; btnAnimation.Duration = TimeSpan.FromSeconds(3); SignInBtn.BeginAnimation(Button.WidthProperty, btnAnimation); btnAnimation1.From = 0; btnAnimation1.To = 80; btnAnimation1.Duration = TimeSpan.FromSeconds(3); SignUpBtn.BeginAnimation(Button.WidthProperty, btnAnimation1); }
void ReleaseDesignerOutlets() { if (PasswordTF != null) { PasswordTF.Dispose(); PasswordTF = null; } if (SignInBtn != null) { SignInBtn.Dispose(); SignInBtn = null; } if (UsernameTF != null) { UsernameTF.Dispose(); UsernameTF = null; } }
public void GoToSignInPage() { SignInBtn.Click(); }
// User Click Login in Register form public void OnClickLogin(object sender, EventArgs e) { SignInBtn.PerformClick(); }