public void TestRegisterBulk() { string testName = "TestRegisterBulk()"; Logger.info(testName, "Starting test."); CSV csv = new CSV(@"C:\Kurs\user.csv"); int rows = csv.RowCount; Logger.info(testName, $"Data row count {rows}."); for (int i = 0; i < rows; i++) { string[] data = csv.GetLine(i); HomePage home = new HomePage(this.driver); home.GoToPage(); RegisterPage register = home.ClickOnLinkRegister(); Logger.info(testName, $"Attempting to register user with data from row {i}."); register.EnterFirstName(data[2]); Logger.info(testName, $"EnterFirstName({data[2]})"); register.EnterLastName(data[3]); Logger.info(testName, $"EnterLastName({data[3]})"); register.EnterEmail(data[4]); Logger.info(testName, $"EnterEmail({data[4]})"); register.EnterUsername(data[0]); Logger.info(testName, $"EnterUsername({data[0]})"); register.EnterPassword(data[1]); Logger.info(testName, $"EnterPassword({data[1]})"); register.EnterPasswordAgain(data[1]); Logger.info(testName, $"EnterPasswordAgain({data[1]})"); Logger.info(testName, "Attempting to register new user."); home = register.ClickOnButtonRegister(); Assert.AreEqual(true, home.IsAlertSuccessVisible()); Logger.test( testName, $"home.IsAlertSuccessVisible (expected true) = {home.IsAlertSuccessVisible()}" ); Logger.separator('='); } Logger.info(testName, "Finished test."); }
public void Register_EnterInvalidEmail_InvalidEmailErrorAppears() { const string emailErrorText = "Неверный формат"; var mainPage = new MainPage(Driver); var registerPage = new RegisterPage(Driver); mainPage.LoginClick(); mainPage.RegisterClick(); registerPage.EnterEmail(TestDataReader.GetTestData("Email")); registerPage.RegisterClick(); Assert.AreEqual(emailErrorText, registerPage.GetEmailError()); }
public void TestRegister() { HomePage home = new HomePage(this.driver); home.GoToPage(); RegisterPage register = home.ClickOnLinkRegister(); register.EnterFirstName("abcd"); register.EnterLastName("abcd"); register.EnterEmail("*****@*****.**"); register.EnterUserName("abcd"); register.EnterPassword("abcd"); register.EnterPasswordAgain("abcd"); home = register.ClickOnButtonRegister(); Assert.AreEqual(true, home.IsAlertSuccessVisible()); }
public void TestRegistration() { HomePage pomHomePage = new HomePage(this.driver); pomHomePage.GoToPage(); RegisterPage pomRegisterPage = pomHomePage.ClickOnRegister(); pomRegisterPage.EnterFirstName("Test Ime"); pomRegisterPage.EnterLastName("Test Prezime"); pomRegisterPage.EnterEmail("*****@*****.**"); pomRegisterPage.EnterUsername("TestKorisnickoIme"); pomRegisterPage.EnterPassword("TestLozinka"); pomRegisterPage.EnterPasswordAgain("TestLozinka"); pomHomePage = pomRegisterPage.ClickOnRegisterButton(); Assert.IsTrue(pomHomePage.IsAlertSuccessVisible()); }
public void TestRegister() { string testName = "TestRegister()"; Logger.info(testName, "Starting test."); CSV csv = new CSV(@"C:\Kurs\user.csv"); string[] data = csv.GetLine(0); HomePage home = new HomePage(this.driver); home.GoToPage(); RegisterPage register = home.ClickOnLinkRegister(); register.EnterFirstName(data[2]); Logger.info(testName, $"EnterFirstName({data[2]})"); register.EnterLastName(data[3]); Logger.info(testName, $"EnterLastName({data[3]})"); register.EnterEmail(data[4]); Logger.info(testName, $"EnterEmail({data[4]})"); register.EnterUsername(data[0]); Logger.info(testName, $"EnterUsername({data[0]})"); register.EnterPassword(data[1]); Logger.info(testName, $"EnterPassword({data[1]})"); register.EnterPasswordAgain(data[1]); Logger.info(testName, $"EnterPasswordAgain({data[1]})"); Logger.info(testName, "Attempting to register new user."); home = register.ClickOnButtonRegister(); Assert.AreEqual(true, home.IsAlertSuccessVisible()); Logger.test( testName, $"home.IsAlertSuccessVisible (expected true) = {home.IsAlertSuccessVisible()}" ); }