public void TestRegistration() { //Se crea string para guardar el nombre del metodo para luego usarlo en el report string testName = System.Reflection.MethodBase.GetCurrentMethod().Name; //Se crea el objeto test ExtentTest test = extent.CreateTest(testName).Info("Test started"); try { var RP = new RegisterPage(driver); RP.NameField.SendKeys("Adrian"); RP.EmailField.SendKeys("*****@*****.**"); RP.PasswordField.SendKeys("12345"); RP.IcecreamChecbox.Click(); RP.SelectGender("Male"); RP.SelectStatus("Student"); RP.DoBField.SendKeys("03/21/1992"); RP.SubmitBtn.Click(); var msg = RP.SuccessMsg.Text; Assert.IsTrue(msg == "Success!"); test.Log(Status.Pass, testName + " Passed"); } catch (Exception ex) { test.Log(Status.Error, "Se encontró un error: " + ex.Message); } }
private async void CreateAccount_Tapped(object sender, EventArgs e) { RegisterPage registerPage = new RegisterPage(); registerPage.OnAccountChanged += OnAccountChange; await Navigation.PushAsync(registerPage); }
public void Inititalize() { // advisasble to read this documentation before proceeding http://extentreports.relevantcodes.com/net/ switch (Browser) { case 1: Driver.driver = new FirefoxDriver(); break; case 2: Driver.driver = new ChromeDriver(); Driver.driver.Manage().Window.Maximize(); Driver.driver.Manage().Cookies.DeleteAllCookies(); break; } if (Keys_Resource.IsLogin == "true") { LoginPage loginobj = new LoginPage(); loginobj.LoginSuccessfull(2); } else { RegisterPage obj = new RegisterPage(); obj.Navigateregister(); } extent = new ExtentReports(ReportPath, false); extent.LoadConfig(Keys_Resource.ReportXMLPath); }
private void OnRegisterPageRequested(object sender, EventArgs e) { RegisterPage RegisterView = new RegisterPage(); Login_RegisterPageController.setView(RegisterView); Login_RegisterPageController.getView().Show(); }
public void FailedRegistration() { RegisterPage registerPage = new RegisterPage(_driver); User user = User.GetRandomUser(); user.Email = "test"; //user.Password = "******"; try { registerPage.Navigate().FillUser(user).Submit(); } catch (TextException e) { Assert.AreEqual("Email is incorrect", e.Message); } user.Email = TextHelpers.GetRandomWord(10) + "@" + TextHelpers.GetRandomWord(6) + "." + TextHelpers.GetRandomWordWithoutNumbers(2); user.Password = ""; try { registerPage.Navigate().FillUser(user).Submit(); } catch (TextException e) { Assert.AreEqual("Password is empty", e.Message); } }
public void RegisterationSetup() { _homePage = new HomePage(ActiveBrowser.WebDriverInstance); _registerPage = new RegisterPage(ActiveBrowser.WebDriverInstance); _searchAPI = new SearchAPI(); password = "******"; }
public bool SubmitCookiesNotAccepted(BrowserFactory.BrowserType browserType) { IWebDriver driver = BrowserFactory.StartBrowser(browserType, RegisterPage.url); var registerPage = new RegisterPage(driver); PageFactory.InitElements(driver, registerPage); registerPage.Login.SendKeys("cookieTest"); registerPage.Email.SendKeys("*****@*****.**"); registerPage.Password.SendKeys("password1"); registerPage.PasswordConfirmation.SendKeys("password1"); registerPage.PasswordConfirmation.Submit(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2); // WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5)); // wait.Until(((IJavaScriptExecutor) driver).ExecuteScript("return document.readyState").Equals("complete")); try { IWebElement message = driver.FindElement(By.XPath("//*[@id=\"successMsg\"]")); Debug.WriteLine("Page title = " + message); driver.Close(); driver.Dispose(); return(true); } catch (Exception e) { driver.Close(); driver.Dispose(); Debug.WriteLine("Register Not Succeeded." + "\n" + e.ToString()); return(false); } }
public void RegisterNewPhotographer_OneEmptyField_Negative() { MainPage = new MainPage(driver); PageWithRegisterLink = MainPage.GoToPageWithRegisterLink(); RegisterPage = PageWithRegisterLink.GoToRegisterPage(); RegisterPage.FillTheFirstNameField(); RegisterPage.FillTheEmailField(); RegisterPage.FillThePasswordField(); RegisterPage.ConfirmPasswordField.Clear(); RegisterPage.CreateAccountButton.Click(); Assert.True(RegisterPage.ErrorMessage.Displayed); RegisterPage.FirstNameField.Clear(); RegisterPage.FillTheEmailField(); RegisterPage.FillThePasswordField(); RegisterPage.FillTheConfirmPasswordField(); RegisterPage.CreateAccountButton.Click(); Assert.True(RegisterPage.ErrorMessage.Displayed); RegisterPage.FillTheFirstNameField(); RegisterPage.EmailField.Clear(); RegisterPage.FillThePasswordField(); RegisterPage.FillTheConfirmPasswordField(); RegisterPage.CreateAccountButton.Click(); Assert.True(RegisterPage.ErrorMessage.Displayed); }
public void TC05_CreateNewAccount() { Console.WriteLine("TC05 - User can create new account"); //1.Navigate to QA Railway Website HomePage homePage = new HomePage(); homePage.Open(); //2.Click on "Register" tab RegisterPage registerPage = homePage.GoToRegisterPage(); //3.Enter valid information into all fields //4.Click on "Register" button //VP. New account is created and message "Thank you for registering your account" appears. string email = String.Format("khanh{0}@gmail.com", StringUtils.RandomString(8, true)); string password = StringUtils.RandomString(8, true); string confirm = StringUtils.RandomString(8, true); string pid = StringUtils.RandomString(8, true); string actualMsg = registerPage.Register(email, password, confirm, pid).GetThankYouMessage().Trim(); string expectedMsg = "Thank you for registering your account"; Assert.AreEqual(expectedMsg, actualMsg); }
public void TC09_UserCannotCreateAccountWithDiffPass() { Console.WriteLine("TC09 - User can't create account with 'Confirm password' is not the same as 'Password'"); //1.Navigate to QA Railway Website HomePage homePage = new HomePage(); homePage.Open(); //2.Click on "Register" tab RegisterPage registerPage = homePage.GoToRegisterPage(); //3.Enter valid information into all fields except "Confirm password" is not the same as "Password" //4.Click on "Register" button //VP. New account is created and message "Thank you for registering your account" appears. string email = String.Format("khanh{0}@gmail.com", StringUtils.RandomString(8, true)); string password = StringUtils.RandomString(8, true) + "password"; string confirm = StringUtils.RandomString(8, true) + "confirm"; string pid = StringUtils.RandomString(8, true); string actualMsg = registerPage.RegisterInvalid(email, password, confirm, pid).GetErrorMessage(); string expectedMsg = "There're errors in the form. Please correct the errors and try again."; Assert.AreEqual(expectedMsg, actualMsg); }
public void SetUp() { Console.WriteLine("Run test initialize"); //start firefox Constant.WebDriver = new FirefoxDriver(); //maximize Constant.WebDriver.Manage().Window.Maximize(); //Pre-condition: Create a new account but do not activate it //1.Navigate to QA Railway Website HomePage homePage = new HomePage(); homePage.Open(); //2.Click on "Register" tab RegisterPage registerPage = homePage.GoToRegisterPage(); //3.Enter valid information into all fields //4.Click on "Register" button //VP. New account is created and message "Thank you for registering your account" appears. user = new User(); user.InitData(); string actualMsg = registerPage.Register(user).GetThankYouMessage().Trim(); string expectedMsg = "Thank you for registering your account"; Assert.AreEqual(expectedMsg, actualMsg); //End Pre-condition }
public RegisterUserSteps(IWebDriver webDriver) { driver = webDriver; driver.Manage().Window.Maximize(); regPage = new RegisterPage(driver); welcomePage = new WelcomePage(driver); }
public RegisterPageVM(MainWindow mainWindow, RegisterPage registerPage) { _mw = mainWindow; _rp = registerPage; ButtonClickCommand = new RelayCommand(ButtonClickCommandImpl); }
private void Register_Click(object sender, EventArgs e) { this.Hide(); RegisterPage rg = new RegisterPage(); rg.Show(); }
public RegisterViewModel() { User = new User(); registerpage = new RegisterPage(); registerpage.button.Click += Button_Click; registerpage.DataContext = this; }
public async Task Signup() { var randomName = DateTime.Now.ToUniversalTime().Ticks.ToString("x"); var userName = $"devusr_{randomName}"; var page = new RegisterPage(Driver); page.Navigate(); page.Username = $"devusr_{randomName}"; page.Email = $"development+{userName}@weedseeker.net"; page.Password = "******"; page.ConfirmPassword = "******"; page.Country = "United States"; page.State = "California"; page.City = "San Jose"; //Agree page.Agree.Click(); await page.WaitAngularAsync(); page.Submit(); page.ConfirmationLabel.Should() .Be("Account created successfully."); }
public RegisterPage CreateRegister(int groupId, DateTime startDate, DateTime endDate) { var registerPage = new RegisterPage(); registerPage.GroupId = groupId; registerPage.Children = RegisterService.GetChildren(groupId); var marksByDays = new List <DayMarks>(); var currentDate = startDate; while ((endDate - currentDate).TotalDays > 0) { var marks = RegisterService.GetMarks(groupId, currentDate); var marksByDay = new DayMarks() { Date = currentDate, Marks = marks }; marksByDays.Add(marksByDay); currentDate = currentDate.AddDays(1); } registerPage.MarksByDays = marksByDays; return(registerPage); }
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 FailedRegistration() { RegisterPage registerPage = new RegisterPage(_driver); User user = User.GetRandomUser(); user.Login = ""; user.FromService = FromService.Social; try { registerPage.Navigate().FillUser(user).Submit(); } catch (MessageException e) { Assert.AreEqual("Login is empty", e.Message); } user.Login = TextHelper.GetRandomWord(10); user.Email = "test@t"; try { registerPage.Navigate().FillUser(user).Submit(); } catch (MessageException e) { Assert.AreEqual("Email is incorrect", e.Message); } }
private void NewUserButton_Click(object sender, EventArgs e) { RegisterPage j = new RegisterPage(); j.Show(); this.Hide(); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var registerPage = new RegisterPage(repository); this.Hide(); registerPage.Show(); }
public RegisterFormPresenter() { instance = RegisterPage.instance; RegisterCommand = new Command(() => Reg()); CancelCommand = new Command(() => LoginOpen()); _model = new User(); }
public void RegisterNewPhotographer_Positive() { RegisterPage = new RegisterPage(driver); RegisterPage.GoToPage(); RegisterPage.ClearAllInputsOnThePage(); RegisterPage.FirstNameField.SendKeys(Data.firstName); RegisterPage.EmailField.SendKeys(Data.email); RegisterPage.PasswordField.SendKeys(Data.password); RegisterPage.ConfirmPasswordField.SendKeys(Data.password); RegisterPage.AcceptTermCheckBox.Click(); CreateBusinessProfilePage = RegisterPage.CreateAccountButtonClick(); // Assert.True(CreateBusinessProfilePage.PageTitle.Text.Contains("Create a public business profile")); CreateBusinessProfilePage.ClearAllInputsOnThePage(); CreateBusinessProfilePage.BusinessNameField.SendKeys(Data.firstName); CreateBusinessProfilePage.CityField.SendKeys(Data.City); CreateBusinessProfilePage.StateListBox.SelectByText("Alabama"); CreateBusinessProfilePage.ZipCodeField.SendKeys(Data.ZipCode); CreateBusinessProfilePage.WeddingCategoryListBox.SelectByText("Photographer"); CreateBusinessProfilePage.PublicEmailAddressField.SendKeys(Data.email_3); CreateBusinessProfilePage.PhoneField.SendKeys(Data.Phone); CreateBusinessProfilePage.CreateAccount.Click(); }
public void Test10() { RegisterPage rPage = loginPage.ClickRegisterHereLink(); LoginPage lPage = rPage.ClickLoginHereLink(); Assert.IsTrue(lPage.IsPageDisplayed, "Login Page is not displayed when the user clicks 'Log in here' link."); }
public void TC09_UserCannotCreateAccountWithDiffPass() { Console.WriteLine("TC09 - User can't create account with \"Confirm password\" is not the same as \"Password\""); //1.Navigate to QA Railway Website HomePage homePage = new HomePage(); homePage.Open(); //2.Click on "Register" tab RegisterPage registerPage = homePage.GoToRegisterPage(); //3.Enter valid information into all fields except "Confirm password" is not the same as "Password" //4.Click on "Register" button //VP. New account is created and message "Thank you for registering your account" appears. User user = new User(); user.InitData(); user.Password += "pass"; user.PasswordConfirm += "confirm"; string actualMsg = registerPage.RegisterInvalid(user).GetErrorMessage(); string expectedMsg = "There're errors in the form. Please correct the errors and try again."; Assert.AreEqual(expectedMsg, actualMsg); }
public MainWindow() { InitializeComponent(); mManager = new DatabaseManager(); mPage = new RegisterPage(this); ShowCurrentPage(); }
public void Teste3() { //Validar telefone repetido IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://demo.automationtesting.in/Register.html"); driver.Manage().Window.Maximize(); RegisterPage register = new RegisterPage(driver); register.BntRefresh(); register.CampoFirtsName("Mario"); register.CampoLastName("Ramos"); register.CampoAndress("Heriberto Hulse"); register.CampoEmail("*****@*****.**"); register.CampoTelephone("7999655510"); register.RadioGender(); register.CheckboxHobbies(); register.SelectLanguages(); register.SelectSkills(); register.SelectCoutry(); register.SelectCoutry2(); register.BirthDay(); register.CampoFirstPassword("Mario18"); register.CampoSecondPassword("Mario18"); register.BntSubmit(); Assert.IsTrue(driver.FindElement(By.XPath("/html/body/section/div[1]")).Displayed); Console.Out.Write(" Teste Passou"); driver.Close(); }
public LoginPage(Evento evento, RegisterPage registerPage) { InitializeComponent(); this.evento = evento; loginViewModel = new LoginViewModel(evento, Navigation, registerPage); BindingContext = loginViewModel; }
public RegisterDialog() : base(new DialogPage[] { new RegisterPage() }) { page = this.Pages[0] as RegisterPage; }
public void WhenIFillTheRegisterFormWithFollowingData(Table table) { var user = table.CreateInstance <UserDto>(); RegisterPage registerPage = new RegisterPage(Driver); registerPage.EnterRegistrationCredentials(user); }
public bool Execute(string username, string password, string email) { var mainPage = new MainPage(_browser); var loginPage = new LogonPage(_browser); var registerPage = new RegisterPage(_browser); _browser.Go(mainPage.Url); mainPage.LogOnLink().Click(); loginPage.RegisterLink().Click(); registerPage.Username().SendKeys(username); registerPage.Password().SendKeys(password); registerPage.Email().SendKeys(email); registerPage.ConfirmPassword().SendKeys(password); registerPage.RegisterBtn().Click(); return mainPage.LogonDisplay().Text.Contains("Welcome "+username); }
private IEnumerable<Webpage> GetAccountPages() { var loginPage = new LoginPage { Name = "Login", UrlSegment = "login", DisplayOrder = 100, RevealInNavigation = false }; yield return loginPage; var forgottenPassword = new ForgottenPasswordPage { Name = "Forgot Password", UrlSegment = "forgot-password", Parent = loginPage, DisplayOrder = 0, RevealInNavigation = false }; yield return forgottenPassword; var resetPassword = new ResetPasswordPage { Name = "Reset Password", UrlSegment = "reset-password", Parent = loginPage, DisplayOrder = 1, RevealInNavigation = false }; yield return resetPassword; var userAccountPage = new UserAccountPage { Name = "My Account", UrlSegment = "my-account", Parent = loginPage, DisplayOrder = 1, RevealInNavigation = false }; yield return userAccountPage; var registerPage = new RegisterPage { Name = "Register", UrlSegment = "register", }; yield return registerPage; }
public RegisterUser(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { registerPage = new RegisterPage(driver); }