public void testClearForm(SchoolNet schoolnet) { schoolnet.LoadWebPage(); AuthenticationPage page = new AuthenticationPage(); page.Form.ClearForm(); }
public void ValidarCadastroDeUsuario() { #region Arranje AuthenticationPage login = new AuthenticationPage(driver); MyAccountPage myAccount = new MyAccountPage(driver); var usuario = GerarUsuarioHelper.GerarUsuario(); #endregion Arranje #region Act login.NavegaParaPagina(Properties.Resource.UrlAuthentication); login.PreencheCampoEmailCreateAccount(usuario.Email); login.ClickBtnCreateAccount(); login.PreecherDadosUsuario(usuario); login.ClickBtnRegisterAnAccount(); #endregion Act #region Assert Assert.AreEqual(myAccount.RetornaTextoDaMensagem(), "MY ACCOUNT", "Não foi encontrado o texto referente a pagina My account"); Assert.AreEqual(myAccount.RetornaNomeDoUsuarioDaPagina(), usuario.NomeCompleto, "O nome do usuário esta diferente do esperado"); #endregion Assert #region Finalization ManipularArquivoHelper.SalvarNoArquivoEmFormatoJson(usuario); #endregion Finalization }
private Page CreatePageAsync(string viewModelName) { if (viewModelName == null) { throw new ArgumentNullException(nameof(viewModelName)); } Page contentPage; switch (viewModelName) { case nameof(InitialPage): contentPage = new InitialPage(); break; case nameof(AuthenticationPage): contentPage = new AuthenticationPage(); break; default: throw new Exception("Content page does not exist"); } return(contentPage); }
public void SignUpToMercuryTourApplicationTest() { LaunchApplicationPage(); Assert.Equal("My Store", getDriver().Title); HomePage home = new HomePage(getDriver()); home.clickOnSignInLink(); AuthenticationPage authenticationPage = new AuthenticationPage(getDriver()); Assert.Equal("Login - My Store", authenticationPage.isAuthenticationPageDisplayed()); AuthenticationPage authenticationPage1 = new AuthenticationPage(getDriver()); authenticationPage1.enterEmailForSignUp(); authenticationPage1.clickOnCreateAccountButton(); RegisterUserPage registerUserPage = new RegisterUserPage(getDriver()); Assert.Equal("CREATE AN ACCOUNT", registerUserPage.isDislayedRegisterUserPage()); registerUserPage.enterUserDetails(); Assert.Equal(registerUserPage.isDisplayedAccountPage(), testData.FirstName.Concat(" " + testData.LastName)); closeSession(); }
public void LoginComUsuarioEPasswordCorretos() { #region Arranje IndexPage index = new IndexPage(driver); MyAccountPage myAccountPage = new MyAccountPage(driver); AuthenticationPage login = new AuthenticationPage(driver); var User = ManipularArquivoHelper.LerDeUmArquivoQueEstaNoFormatoJson(); #endregion Arranje #region Act index.NavegaParaPagina(Properties.Resource.UrlPrincipal); index.ClickBtnSign_in(); login.PreencheCampoEmail(User.Email); login.PreencheCampoPassword(User.Password); login.ClickBtnSign_in(); #endregion Act #region Assert Assert.AreEqual(myAccountPage.RetornaTextoDaMensagem(), "MY ACCOUNT"); #endregion Assert #region Finalization index.ClickBtnSign_Out(); #endregion Finalization }
public static void Registration() { WebDriverWait wait = new WebDriverWait(Driver.driver, TimeSpan.FromSeconds(60)); HomePage hp = new HomePage(); hp.BtnSignIn.Click(); AuthenticationPage ap = new AuthenticationPage(); ap.Email.SendKeys(Config.RegistrationValues.NewEmail); ap.BtnCreateAnAccount.Click(); wait.Until(ExpectedConditions.ElementExists(By.Id("account-creation_form"))); CreateAccountPage createAcP = new CreateAccountPage(); createAcP.GenderMR.Click(); createAcP.FirstName.SendKeys(Config.RegistrationValues.firstName); createAcP.LastName.SendKeys(Config.RegistrationValues.lastName); createAcP.Password.SendKeys(Config.RegistrationValues.password); createAcP.Address.SendKeys(Config.RegistrationValues.address); createAcP.City.SendKeys(Config.RegistrationValues.city); createAcP.StateIllinois.Click(); createAcP.ZipCode.SendKeys(Config.RegistrationValues.zipcode); createAcP.MobilePhone.SendKeys(Config.RegistrationValues.MobilePhoneNumer); createAcP.BtnRegister.Click(); }
public void WhenUserSubmitsTheLoginForm() { Utilities ut = new Utilities(Driver); AuthenticationPage ap = new AuthenticationPage(Driver); ut.ClickOnElement(ap.signInbtn); }
public void WhenUserEntersValidEmailAddress() { AuthenticationPage authPage = new AuthenticationPage(Driver); authPage.EmailInputField().SendKeys(emailValue); string userEmail = authPage.EmailInputField().GetAttribute("vaule"); }
public void GivenEntersCorrectCredentials() { AuthenticationPage ap = new AuthenticationPage(Driver); ut.EnterTextInElement(ap.username, TestConstants.Username); ut.EnterTextInElement(ap.password, TestConstants.Passwoard); }
public void ValidateEmail(bool isPositive, string email) { AuthenticationPage authenticationPage = header.ClickOnSingIn(); bool isEmailOk = authenticationPage.EnterNewAccountEmail(email).IsNewEmailOk(); Assert.That(isEmailOk, Is.EqualTo(isPositive), $"Email was validated {(isEmailOk ? "successfully" : "unsuccessfully")}" + " but were expected opposite"); }
public void GivenEntersCorrectCredentials() { //objekat klase AP,metoda se poziva preko objekta ut AuthenticationPage ap = new AuthenticationPage(Driver); ut.EnterTextInElement(ap.username, TestConstants.Username); ut.EnterTextInElement(ap.password, TestConstants.Password); }
public void Test(bool isPositive, string text) { AuthenticationPage authenticationPage = mainPage.ClickOnSearch(); bool isOk = authenticationPage.EnterSearch(text).IsSearchOk(); Assert.That(isOk, Is.EqualTo(isPositive), $"Search was validated{(isOk ? "successfully" : "unsuccessfully")}"); }
public void GivenEntersCorrectCredentials() { Utilities ut = new Utilities(Driver); AuthenticationPage ap = new AuthenticationPage(Driver); ut.EnterTxtInElement(ap.username, TestConstats.Username); ut.EnterTxtInElement(ap.password, TestConstats.password); }
public void WhenIProvideInvalidCredentialsAndSubmit() { string username = DataHooks.EnvData["app.invalidusername"]; string password = DataHooks.EnvData["app.invalidpassword"]; AuthenticationPage authenticationPage = new AuthenticationPage(sso); authenticationPage.Login(username, password); }
public void GivenInitiatesAFlowForCreatingAnAccount() { AuthenticationPage ap = new AuthenticationPage(Driver); string email = ut.GeneraterandomEmail(); ut.EnterTextElement(ap.emailaddress, email); ut.ClickOnElement(ap.createanaccount); }
public void GivenInitiatesAFlowForCreatingAnAccount() { AuthenticationPage ap = new AuthenticationPage(Driver); string email = ut.GenerateRandomEmail(); ut.EnterTextInElement(ap.cemail, email); ut.ClickOnElement(ap.subemail); }
public void GivenInitiatesAFowForCreatingPage() { Utilities ut = new Utilities(Driver); AuthenticationPage ap = new AuthenticationPage(Driver); string randEmail = ut.GenerateRandomEmail(); ut.EnterTextInElement(ap.email, randEmail); ut.ClickOnElement(ap.createAccountBtn); }
public void GivenInitiatesAFlowForCreatingAnAccount() { Utilities ut = new Utilities(Driver); AuthenticationPage ap = new AuthenticationPage(Driver); string email = ut.GenerateRandomMail(); ut.EnterTxtInElement(ap.emailfield, email); ut.ClickOnElement(ap.createAcc); }
public void ScreenshotUponFailure() { UITest(() => { AuthenticationPage authentication = new AuthenticationPage(driver); authentication.ClickSignIn(); authentication.LoginFailed("12345", "12345"); }); }
public void Init() { Driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); _loginPage = new LoginPage(Driver); _regPage = new RegistrationPage(Driver); _authPage = new AuthenticationPage(Driver); _user = UserFactory.CreateValidUser(); _wait = new WebDriverWait(Driver, TimeSpan.FromSeconds(5)); }
public static void LoginFailure() { HomePage hp = new HomePage(); hp.BtnSignIn.Click(); AuthenticationPage ap = new AuthenticationPage(); ap.EmailLogin.SendKeys(Config.RegistrationValues.email); ap.Password.SendKeys("12345"); ap.BtnLogin.Click(); }
public void GivenInitiatesAFowForCreatingAnAccount() { //lokator kreira se objekat AuthenticationPage ap = new AuthenticationPage(Driver); //deklarisem novu promenljivu tipa string email i dodeliti vrednost iz utilities klase string email = ut.GenerateRandomEmail(); ut.EnterTextInElement(ap.emailAddress, email); ut.ClickOnElement(ap.caBtn); }
/// <summary> /// Entry point. /// </summary> public static void Main() { PayingSystemDataBaseContext db = new PayingSystemDataBaseContext(); DataProvider dataProvider = new DataProvider(new UnitOfWork(db)); AuthenticationPage authentication = new AuthenticationPage(dataProvider); authentication.Display(); }
public void testInputAndSubmitForm(SchoolNet schoolnet) { schoolnet.LoadWebPage(); AuthenticationPage page = new AuthenticationPage(); AuthenticationData data = new AuthenticationData(); data.DistrictName = "National"; data.Username = "******"; data.Password = "******"; page.Data = data; HomePage homePage = (HomePage)page.Form.InputAndSubmitForm(); }
public void testInputAndSubmitFormAndVerifyErrors(SchoolNet schoolnet) { schoolnet.LoadWebPage(); AuthenticationPage page = new AuthenticationPage(); AuthenticationData data = new AuthenticationData(); data.DistrictName = ""; data.Username = ""; data.Password = ""; page.Data = data; page.Form.InputAndSubmitFormWithErrors(); }
public void LoginIntoAccount() { homePage = new HomePage(this.DriverContext); homePage.OpenHomePage(); authenticationPage = homePage.ClickSignInButton(this.DriverContext); myAccountPage = authenticationPage .EnterEmailSignIn(UserData.currentAccountEmail) .EnterPasswordSignIn(UserData.currentAccountPassword) .ClickSignInButton(this.DriverContext); Assert.AreEqual(expectedHeader, myAccountPage.GetPageHeader()); }
public void Setup() { InitializeMaximizedBrowser(); _homePage = new HomePage(Driver); _loginPage = new LoginPage(Driver); _authenticationPage = new AuthenticationPage(Driver); Driver.NavigateTo(_homePage.URL); _homePage.SignInHeader.Click(); _homePage.SignUp(); _userRegistration = UserFactory.CreateValidUser(); }
public void AdicionarItemNoCarrinho() { #region Arranje IndexPage index = new IndexPage(driver); AuthenticationPage login = new AuthenticationPage(driver); WomenPage womenPage = new WomenPage(driver); ShoppingCartSummaryPage shoppingCartSummaryPage = new ShoppingCartSummaryPage(driver); AddressesPage addressesPage = new AddressesPage(driver); ShippingPage shippingPage = new ShippingPage(driver); PaymentPage paymentPage = new PaymentPage(driver); var User = ManipularArquivoHelper.LerDeUmArquivoQueEstaNoFormatoJson(); #endregion Arranje #region Act index.NavegaParaPagina(Resources.Resource.UrlPrincipal); index.ClickBtnSign_in(); login.PreencheCampoEmail(User.Email); login.PreencheCampoPassword(User.Password); login.ClickBtnSign_in(); womenPage.NavegaParaAPaginaWomen(); womenPage.ColocarItemCarrinho(); shoppingCartSummaryPage.ContinuarCheckout(); addressesPage.ContinuarCheckout(); shippingPage.ContinuarCheckout(); paymentPage.EscolherTipoDePagamento(); paymentPage.ConfirmarOrdem(); #endregion Act #region Assert Assert.AreEqual(paymentPage.RetornaTextoDaMensagem(), "ORDER CONFIRMATION"); #endregion Assert #region Finalization index.ClickBtnSign_Out(); #endregion Finalization }
public void logInAndPlaceOrderForTShirt() { logInToApplicationTest(); AuthenticationPage authenticationPage = new AuthenticationPage(getDriver()); authenticationPage.switchToTshirtStorePage(); MyStoreTshirtPage myStoreTshirtPage = new MyStoreTshirtPage(getDriver()); Assert.Equal("Women - My Store", myStoreTshirtPage.isDisplayedMyStoreTshirtPage()); myStoreTshirtPage.placeOrderOfTshirt(); Assert.Equal("Order confirmation - My Store", getDriver().Title); closeSession(); }
public async Task EnsureUserAuthenticated() { if (App.CurrentAthlete == null) { var authPage = new AuthenticationPage(); await Navigation.PushModalAsync(authPage); await authPage.AttemptToAuthenticateAthlete(); if (App.CurrentAthlete != null) { await Navigation.PopModalAsync(); } } }
public async Task EnsureUserAuthenticated() { if(App.CurrentAthlete == null) { var authPage = new AuthenticationPage(); await Navigation.PushModalAsync(authPage); await authPage.AttemptToAuthenticateAthlete(); if(App.CurrentAthlete != null) { await Navigation.PopModalAsync(); } } }