public void Initialize(TestContext c) { driver = Provider.CreateDriver(); map = new MyAccountPage(driver); driver.AppUrl = "http://shop.demoqa.com/my-account/"; map.Navigate(); }
//[Ignore("")] public void US4ScenarioCorrectInfo() { var index = new IndexPage(driver); var signIn = new SignInPage(driver); var register = new RegistrationFormPage(driver); var myAccount = new MyAccountPage(driver); //from home click signin index.NavigateToSignIn(); //from signin register with email signIn.ClickRegister(); //go to form page and send keys for info //correct info/no error takes us to account page register.EnterCorrectInfo(); //arrived at my account page? Assert.IsTrue(myAccount.arrivedOnPage()); //assert my account page and name on top right corner Assert.IsTrue(myAccount.IsNamePresent()); myAccount.signOut(); }
public void AuthenticationPageComUsuarioEPasswordCorretos() { #region Arranje MyAccountPage myAccountPage = new MyAccountPage(driver); var User = ManipularArquivoHelper.LerDeUmArquivoQueEstaNoFormatoJson(); #endregion Arranje #region Act index.NavegaParaPagina(Resources.Resource.UrlPrincipal); index.ClickBtnSign_in(); authenticationPage.PreencheCampoEmail(User.Email); authenticationPage.PreencheCampoPassword(User.Password); authenticationPage.ClickBtnSign_in(); #endregion Act #region Assert Assert.AreEqual(myAccountPage.RetornaTextoDaMensagem(), "MY ACCOUNT"); #endregion Assert }
public Test4() { _homePage = new HomePage(Driver); _logInPage = new LogInPage(Driver); _myAccountPage = new MyAccountPage(Driver); _dashboardPage = new AccountDashboardPage(Driver); }
public void ValidarCadastroDeUsuario() { #region Arranje MyAccountPage myAccount = new MyAccountPage(driver); var usuario = GerarUsuarioHelper.GerarUsuario(); #endregion Arranje #region Act authenticationPage.NavegaParaPagina(Resources.Resource.UrlAuthentication); authenticationPage.PreencheCampoEmailCreateAccount(usuario.Email); authenticationPage.ClickBtnCreateAccount(); authenticationPage.PreecherDadosUsuario(usuario); authenticationPage.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 }
public void ThenUserWilBeLoggedIn() { MyAccountPage map = new MyAccountPage(Driver); // imlementacija Then scenarija uvek ima Assert ,uvek, uvek Assert.True(ut.ElementDispayed(map.SignOutBtn), "User is not logged in"); }
public void setUp() { options = new ChromeOptions(); options.AddArgument("--ignore-ssl-errors=yes"); options.AddArgument("--ignore-certificate-errors"); driver = new ChromeDriver(options); driver.Manage().Window.Maximize(); driver.Navigate().GoToUrl("https://opencart.abstracta.us"); var loginPage = new LoginPage(driver); loginPage.NavigateToLoginPage(driver); LoginBO loginBO = new LoginBO(); loginPage.LoginApplication(loginBO); var myAccountPage = new MyAccountPage(driver); myAccountPage.NavigateToMyAccountPage(driver); var addressPage = new AddressPage(driver); addressPage.NavigateToAddressPage(driver); changeAddressPage = new ChangeAddressPage(driver); }
public static void PurchaseByCheck() { WebDriverWait wait = new WebDriverWait(Driver.driver, TimeSpan.FromSeconds(60)); MyAccountPage myAcc = new MyAccountPage(); myAcc.MenuWomen.Click(); WomenPage wp = new WomenPage(); wp.Product1AddToCart.Click(); wait.Until(ExpectedConditions.ElementIsVisible(By.Id("layer_cart"))); wp.ProceedToCheckout.Click(); CheckoutPages checkout = new CheckoutPages(); checkout.BtnSummaryCheckout.Click(); wait.Until(ExpectedConditions.ElementIsVisible(By.Name("processAddress"))); checkout.BtnAddressCheckout.Click(); wait.Until(ExpectedConditions.ElementIsVisible(By.Name("processCarrier"))); checkout.CheckboxTermsOfService.Click(); checkout.BtnShippingCheckout.Click(); wait.Until(ExpectedConditions.ElementIsVisible(By.Id("HOOK_PAYMENT"))); checkout.BtnPayByCheck.Click(); wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("#center_column > form"))); checkout.BtnConfirmPurchase.Click(); }
public MyAccountPage ClickMyAccountLink() { ClickMenu("My account"); MyAccountPage page = new MyAccountPage(Driver); return(page); }
public void TestMethod1() { HomePage homePage = new HomePage(driver); LogInPage logInPage = new LogInPage(driver); MyAccountPage myAccountPage = new MyAccountPage(driver); CatalogPage catalogPage = new CatalogPage(driver); Window window = new Window(driver); ShoppingCartPage shoppingCartPage = new ShoppingCartPage(driver); AdressPage adressPage = new AdressPage(driver); ShippingPage shippingPage = new ShippingPage(driver); PaymentPage paymentPage = new PaymentPage(driver); OrderSummaryPage orderSummaryPage = new OrderSummaryPage(driver); OrderConfirmationPage orderConfirmationPage = new OrderConfirmationPage(driver); homePage.GoToPage(); homePage.ClickOnSignIn(); logInPage.FillLogInForm("*****@*****.**", "clave1"); logInPage.ClickOnSubmitLogin(); Assert.AreEqual("Welcome to your account. Here you can manage all of your personal information and orders.", myAccountPage.GetSuccessMessage()); myAccountPage.ClickOnWomenOption(); catalogPage.ClickOnAddtoCartButton(); window.ClickOnProceedCheckout(); shoppingCartPage.ClickOnProceedCheckout(); adressPage.ClickOnProceedCheckout(); shippingPage.AgreeTermsOfService(); shippingPage.ClickOnProceedCheckout(); paymentPage.PaybyCheck(); orderSummaryPage.ClickOnProceedCheckout(); orderConfirmationPage.GetSuccessMessage(); }
public void WhenUserOpensMyWishlist() { Utilities ut = new Utilities(Driver); MyAccountPage ma = new MyAccountPage(Driver); ut.ClickOnElement(ma.wishlist); }
public void WhenIPerformLogin(Table table) { var email = table.Rows.First()["email"]; var password = table.Rows.First()["password"]; _myAccountPage = _authPage.SignIn(email, password); }
public void BuyProductAndCheckSuccessMessage() { var register = new RegisterPage(driver); register.RegisterUserFirstStep(); register.FillRegisterForm(); //Go to MainPage var myAccountPage = new MyAccountPage(driver); myAccountPage.GoToMainPage(); //Find a short, add it to cart and proceed to checkout var mainPage = new BuyingProductPage(driver); mainPage.AddOneProductToShoppingCart(); mainPage.ProceedToCheckout(); //Check the success message WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(finish => finish.FindElement(By.CssSelector(".alert.alert-success")).Displayed); var successMessage = driver.FindElement(By.CssSelector(".alert.alert-success")); Assert.AreEqual("Your order on My Store is complete.", successMessage.Text); }
public void Initialize() { driver = Provider.CreateDriver(); mcp = new MyAccountPage(driver); driver.AppUrl = ("http://shop.demoqa.com/my-account/"); mcp.Navigate(); }
public void PerformMyAccountoperations() { AuthenticatedHome home = new AuthenticatedHome(driver); home.Navigate(); MyAccountTestData testData = new MyAccountTestData(TestContext.DataRow); MyAccountPage myAccountPage = home.ClickMyAccountLink(); myAccountPage.Clear(); myAccountPage.Email = testData.Email; myAccountPage.PhoneNumber = testData.PhoneNumber; myAccountPage.Save(); if (testData.ExpectedResult == "Pass") { Assert.IsTrue(myAccountPage.IsMyAccountSavedSuccesfully); } else if (testData.ExpectedResult == "Fail") { Assert.IsTrue(myAccountPage.SummaryHasErrorMessage(testData.ExpectedErrorMessages)); } else { throw new Exception("Unknown expected result, fix data file"); } }
public void RegisterNewUser() { RegistrationData registrationData = MemberSiteUserRegistrationHelper.RegisterUserAPI(); HomePage homePage = new HomePage(_driver); //homePage.GoToRegistrationPage(); //RegistrationPage registrationPage = new RegistrationPage(_driver); //registrationPage.EnterRegistrationData(); //Console.WriteLine("This is test"); homePage.GoToLoginForm(); LoginPage loginPage = new LoginPage(_driver); loginPage.SubmitLogin(registrationData.Username, registrationData.Password); MyAccountPage myAccountPage = new MyAccountPage(_driver); myAccountPage.NavigateToResponsibleGamblingPage(); ResponsibleGamblingPage responsibleGemblingPage = new ResponsibleGamblingPage(_driver); responsibleGemblingPage.SetTimeOut(); ConfirmationPopUpForm confirmationPopUpForm = new ConfirmationPopUpForm(_driver); confirmationPopUpForm.ApproveTimeOut(); HomePage homePage2 = new HomePage(_driver); homePage2.GoToLoginForm(); loginPage.SubmitLogin(registrationData.Username, registrationData.Password); }
public void ThenUserWillBeLoggedIn() { Utilities ut = new Utilities(Driver); MyAccountPage map = new MyAccountPage(Driver); Assert.True(ut.ElementDisplayed(map.logOutBtn), "Log out failed"); }
public void ThenUserWillBeLoggedIn() { Utilities ut = new Utilities(Driver); MyAccountPage ma = new MyAccountPage(Driver); Assert.False(ut.ElementDisplayed(ma.logOut), "User is not logged in"); }
public void LoginWithValidCredentialsShouldLoginTheUserAndRedirectToMyAccountPage(string email, string password) { this.OpenLoginPage(); this.loginPage.Login(email, password); var myAccountPage = new MyAccountPage(this.Driver); Assert.That(myAccountPage.IsVisible, "Login is not successful. My account page is not loaded properly."); }
public UpdatePersonalInformationStep(WebDriver webDriver) { _webDriver = webDriver; homePage = new HomePage(_webDriver.Driver); signInPage = new SignInPage(_webDriver.Driver); myAccountPage = new MyAccountPage(_webDriver.Driver); yourPersonalInformationPage = new YourPersonalInformationPage(_webDriver.Driver); }
public void WhenMyAccountPageIsOpened() { MyAccountPage myAccountPage = new MyAccountPage(); Assert.IsTrue(myAccountPage.IsVisible()); var NavigationStep = Driver.FindElement(By.ClassName("navigation_page")).Text; Assert.IsTrue(NavigationStep.Contains("My account")); }
public void ShouldUserSignIn() { //test = extent.CreateTest("blabla1"); MainPage mainPage = new MainPage(); SignInPage signInPage = mainPage.ClickOnSignIn(); MyAccountPage myAccountPage = signInPage.enterEmailAndPasswordAndClickOk(); Assert.IsTrue(myAccountPage.CheckIfOrderExits()); }
public AccountDetailsViewModel(MyAccountPage myAccountPage) { _myAccountPage = myAccountPage; IsFreeAccount = true; // Default value IsDataLoaded = false; // Default value CacheSize = AppService.GetAppCacheSize(); }
public void ConversationOportunitie() { var auth = new AuthPage(driver); var conversation = new MyAccountPage(driver); driver.Url = Url.Deautos.Views.Login.Auth; auth.SecondaryLogin(OfficialUser, OfficialUserPassword); conversation.Consult("Oportunitie"); }
public void WhenClickOnRegisterButton() { CreateAccountPage createAccountPage = new CreateAccountPage(); MyAccountPage myAccountPage = new MyAccountPage(); createAccountPage.ClickRegister(); Wait.Until(condition => condition.FindElement(By.ClassName("icon-user"))); Assert.IsTrue(myAccountPage.IsVisible()); }
public void YChangePasswordContactData() { var auth = new AuthPage(driver); var myAccount = new MyAccountPage(driver); driver.Url = Url.Deautos.Views.Login.Auth; auth.SecondaryLogin(); myAccount.ChangePasswordData(); }
public void DataContact() { var auth = new AuthPage(driver); var myAccount = new MyAccountPage(driver); driver.Url = Url.Deautos.Views.Login.Auth; auth.SecondaryLogin(); myAccount.ModifyContactData(); }
public void Company() { var auth = new AuthPage(driver); var myAccount = new MyAccountPage(driver); driver.Url = Url.Deautos.Views.Login.Auth; auth.SecondaryLogin(); myAccount.ModifyClientUser(); }
public void ShouldUserSignOut() { //test = extent.CreateTest("blabla2"); MainPage mainPage = new MainPage(); SignInPage signInPage = mainPage.ClickOnSignIn(); MyAccountPage myAccountPage = signInPage.enterEmailAndPasswordAndClickOk(); SignInPage signInPage2 = myAccountPage.SignOut(); Assert.IsTrue(signInPage2.IfSignInExists()); }
public void Before() { _homePage = new HomePage(Browser); _loginPage = new LoginPage(Browser); _accountPage = new MyAccountPage(Browser); _loginPage.AcessarPagina(); _loginPage.PreencheUsuario("********"); _loginPage.PreencheSenha("**********"); _loginPage.BotaoLogin(); }