public void CheckArticleIsCreatedWithoutTitleAndContent() { var email = "Katy" + DateTime.Now.Ticks + "@abv.bg"; var registrationPage = new RegistrationPage(this.driver); var registrationUser = new RegisterUser(email, "Katy Perry", "0123456789", "0123456789"); registrationPage.NavigateTo(); registrationPage.FillRegistrationForm(registrationUser); var createdArticle = new CreateArticlePage(this.driver); var newArticle = new Article("", ""); createdArticle.CreateArticle(newArticle); createdArticle.AssertArticleCreatedWithoutTitleAndContentFirstErrorMessage("The Title field is required."); createdArticle.AssertArticleCreatedWithoutTitleAndContentSecondErrorMessage("The Content field is required."); }
private async Task InitSelenium() { await Task.Run(() => { driverFactory = new DriverFactory(); driver = driverFactory.CreateDriver(); reg = new RegistrationPage(driver); //sizing var screen = WindowExt.GetSecondaryScreen().WorkingArea; driver.Manage().Window.Size = new Size(screen.Width / 2, screen.Height - 200); //move window to the left if 2 screens if (Screen.AllScreens.Length > 1) { driver.Manage().Window.Position = new Point(-1500, 0); } }); }
public static void SetUp() { InitialiseReports(); //initialisng webdriver driver object with browser Base.IntialiseBrowser("Chrome"); //check user is registered or not if (registeredUser == true) { LoginPage login = new LoginPage(); login.LogIn(); } else { RegistrationPage registration = new RegistrationPage(); registration.Register(); } }
public void CheckArticleIsCreated() { var email = "Katy" + DateTime.Now.Ticks + "@abv.bg"; var registrationPage = new RegistrationPage(this.driver); var registrationUser = new RegisterUser(email, "Katy Perry", "0123456789", "0123456789"); registrationPage.NavigateTo(); registrationPage.FillRegistrationForm(registrationUser); var createdArticle = new CreateArticlePage(this.driver); var newArticle = new Article("Hello!", "I am new article!"); createdArticle.CreateArticle(newArticle); createdArticle.AssertArticleIsCreated("The new article is visible!"); createdArticle.DeleteArticle(newArticle); }
private static IndexInfo MakeIndexInfo( List <NuGetVersion> sortedVersions, int maxLeavesPerPage, Dictionary <NuGetVersion, string> versionToNormalized) { var index = new RegistrationIndex { Items = new List <RegistrationPage>(), }; // Populate the pages. RegistrationPage currentPage = null; for (var i = 0; i < sortedVersions.Count; i++) { if (i % maxLeavesPerPage == 0) { currentPage = new RegistrationPage { Items = new List <RegistrationLeafItem>(), }; index.Items.Add(currentPage); } currentPage.Items.Add(new RegistrationLeafItem { CatalogEntry = new RegistrationCatalogEntry { Version = versionToNormalized[sortedVersions[i]], }, }); } // Update the bounds. foreach (var page in index.Items) { page.Count = page.Items.Count; page.Lower = page.Items.First().CatalogEntry.Version; page.Upper = page.Items.Last().CatalogEntry.Version; } return(IndexInfo.Existing(storage: null, hive: HiveType.SemVer2, index: index)); }
public void SubmitRegistrationWithExcelData(string testName) { var user = AccessExcelData.GetUserData(testName); var regPage = new RegistrationPage(this.driver); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.SubmitRegistrationForm(); try { IWebElement actualError = driver.FindElement(By.XPath(user.ErrorLocator)); StringAssert.Contains(user.ErrorMessage, actualError.Text); } catch (Exception) { cleaner.TakeScreenShot(this.driver); Assert.IsTrue(false); } }
public void SetUp() { // Driver driver = GetChromeDriver(); // Maximize The Window driver.Manage().Window.Maximize(); // Home Page homePage = new HomePage(driver); // Login Page loginPage = new LoginPage(driver); // Registration Page registrationPage = new RegistrationPage(driver); // Profile Page profilePage = new ProfilePage(driver); // Create Article Page createArticlePage = new CreateArticlePage(driver); // Article Main Page articleMainPage = new ArticleMainPage(driver); // Article Delete Page articleDeletePage = new ArticleDeletePage(driver); // Article Edit Page articleEditPage = new ArticleEditPage(driver); //Path to directory depending of the Domain Name (local or azure) if (Environment.UserDomainName == "WARLUS" || Environment.UserDomainName == "KAMEN" || Environment.UserDomainName == "GAS_MT_MACHINE") //On local machine { directoryPath = Directory.GetCurrentDirectory() + "/../../.."; } else // On azure { directoryPath = Directory.GetCurrentDirectory(); } }
public void RegistrationIncorrectPictureFormat() { RegistrationPage regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser( "Tsvetana", "Gigova", new List <bool>(new bool[] { true, false, false }), new List <bool>(new bool[] { true, true, true }), "Bulgaria", "3", "1", "1988", "123", "Tsvety", "cvetana.gigovagmail.com", @"D:\Programs\TeamViewer\Terminal strip.jpgg", "TEST", "123456", "123456"); }
public void RegistrationWithoutDescription() { RegistrationPage regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser( "Tsvetana", "Gigova", new List <bool>(new bool[] { true, false, false }), new List <bool>(new bool[] { true, true, true }), "Bulgaria", "3", "1", "1988", "123", "Tsvety", "*****@*****.**", @"D:\Programs\TeamViewer\Terminal strip.jpg", "", "123456", "123456"); }
private static void Initialize(PageInfo pageInfo, RegistrationPage page) { // Ensure the page is sorted in ascending order by version. var leafInfos = page .Items .Select(x => LeafInfo.Existing(x)) .OrderBy(x => x.Version) .ToList(); page.Items.Clear(); page.Items.AddRange(leafInfos.Select(x => x.LeafItem)); // Update the bookkeeping with the latest information. The leaf items themselves are the "true" for the // count, lower bound, and upper bound properties not whatever might be set on the page item. pageInfo._page = page; pageInfo._leafInfos = leafInfos; pageInfo.Count = page.Items.Count; pageInfo.Lower = leafInfos.FirstOrDefault()?.Version; pageInfo.Upper = leafInfos.LastOrDefault()?.Version; }
public void CalssInit() { var driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); driver.Manage().Window.Maximize(); _loginPage = new LoginPage(driver); _regPage = new RegistrationPage(driver); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); _user = UserFactory.CreateValidUser(); _navPage = new NavigationBarPage(driver); _qaPage = new QaAutomationPage(driver); _gsPage = new GoogleSearchPage(driver); _seleniumsearchPage = new SeleniumSearchPage(driver); _selPage = new SeleniumPage(driver); }
public void RegistrationWithoutBDayMonth() { RegistrationPage regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser( "Tsvetana", "Gigova", new List <bool>(new bool[] { true, false, false }), new List <bool>(new bool[] { true, true, true }), "Bulgaria", "29", "", "1988", "123", "Tsvety", "*****@*****.**", @"C:\Users\tgigova\Desktop\email.jpg", "TEST", "123456", "123456"); }
public void When_UserDoesntFillName_Expect_ErrorMessageDisplayed() { var reg = new RegistrationPage().Open(); reg.FillForm(); reg.ClearFirstName(); reg.SubmitForm(); Assert.AreEqual(1, reg.GetNumberOfErrors()); reg.FillFirstName(); reg.ClearLastName(); reg.SubmitForm(); Assert.AreEqual(1, reg.GetNumberOfErrors()); reg.ClearFirstName(); Assert.AreEqual(1, reg.GetNumberOfErrors()); reg.SubmitForm(); Assert.AreEqual(1, reg.GetNumberOfErrors()); }
public void CheckEmptyRegistrationForm() { TakeScreenshotOnTestFailure(() => { var homePage = new HomePage(Driver).OpenPage(); try { homePage.registerLink.Click(); var regPage = new RegistrationPage(Driver); regPage.SkipRegistration(); Assert.IsTrue(regPage.CheckForError(), "Message is not displayed"); } catch (Exception e) { Assert.Fail("Element not found."); throw e; } }); }
public void CheckIsLoggedInWithInvalidPassword() { var email = "Lili" + DateTime.Now.Minute + "@mail.bg"; var password = "******"; var registrationPage = new RegistrationPage(this.driver); var registrationUser = new RegisterUser(email, "Lili Ivanova", password, password); registrationPage.NavigateTo(); registrationPage.FillRegistrationForm(registrationUser); var loginPage = new LoginPage(this.driver); loginPage.LogOffButton.Click(); loginPage.LoginButton.Click(); var loginUser = new LoginUser(email, password + "FALSE"); loginPage.FillLoginForm(loginUser); loginPage.AssertErrorMessageForInvalidLoginData("Invalid login attempt."); }
public void CreateNewArticleCheck() { var email = "Nadeto" + DateTime.Now.Ticks + "@abv.bg"; var registrationPage = new RegistrationPage(this.driver); var registrationUser = new RegisterUser(email, "Nadeto Petrova", "0123456789", "0123456789"); registrationPage.NavigateTo(); registrationPage.FillRegistrationForm(registrationUser); var createdArticle = new CreateArticlePage(this.driver); var newArticle = new Article("Yep!", "The first Article is here!"); createdArticle.CreateArticle(newArticle); createdArticle.AssertTititleArticleIsCreated("Yep!"); createdArticle.AssertContentArticleIsCreated("The first Article is here!"); createdArticle.DeleteArticle(newArticle); }
public void CheckIsLoggedInWithValidData() { var email = "Lili" + DateTime.Now.Ticks + "@mail.bg"; var password = "******"; var registrationPage = new RegistrationPage(this.driver); var registrationUser = new RegisterUser(email, "Lili Ivanova", password, password); registrationPage.NavigateTo(); registrationPage.FillRegistrationForm(registrationUser); var loginPage = new LoginPage(this.driver); loginPage.LogOffButton.Click(); // ok loginPage.LoginButton.Click(); var loginUser = new LoginUser(email, password); loginPage.FillLoginForm(loginUser); loginPage.AssertSuccessMessageLogin("Hello " + email + "!"); }
public void CreateUserAccount_FirstNameFieldValidationError(string firstName, string errorMessage) { UserModel userRegData = createRandomUserData(); userRegData.FirstName = firstName; RegistrationPage regPage = new RegistrationPage(driver, baseURL); regPage.goToPage(); regPage.addFirstName(userRegData.FirstName); regPage.addLastName(userRegData.LastName); regPage.addEmail(userRegData.Email); regPage.addmobilePhone(userRegData.MobilePhone); regPage.submitRegistrationForm(); regPage.VerifyValidationErrorMessage(errorMessage); var regCompletedData = restRequest.verifyRegistration(userRegData.Email); Assert.IsTrue(regCompletedData.TotalResults == 0); }
public async Task MovesPageThatIsAlreadyExternal() { Config.MaxInlinedLeafItems = 0; AddPackageDetails("4.0.0"); var oldPageUrl = "https://example/reg/nuget.versioning/1.0.0/3.0.0.json"; var newPageUrl = "https://example/reg/nuget.versioning/1.0.0/4.0.0.json"; var pageItem = RegistrationIndex.Items[0]; var page = new RegistrationPage { Items = pageItem.Items, }; pageItem.Url = oldPageUrl; pageItem.Items = null; Storage .Setup(x => x.ReadPageAsync(It.IsAny <HiveType>(), It.IsAny <string>())) .ReturnsAsync(() => page); await Target.UpdateAsync(Hive, ReplicaHives, Id, Entries, EntryToCatalogLeaf, RegistrationCommit); Storage.Verify(x => x.ReadPageAsync(It.IsAny <HiveType>(), It.IsAny <string>()), Times.Once); Storage.Verify(x => x.ReadPageAsync(Hive, oldPageUrl), Times.Once); Storage.Verify( x => x.WriteLeafAsync(Hive, ReplicaHives, Id, NuGetVersion.Parse("4.0.0"), RegistrationLeaf), Times.Once); Storage.Verify( x => x.WritePageAsync(It.IsAny <HiveType>(), It.IsAny <IReadOnlyList <HiveType> >(), It.IsAny <string>(), It.IsAny <NuGetVersion>(), It.IsAny <NuGetVersion>(), It.IsAny <RegistrationPage>()), Times.Once); Storage.Verify( x => x.WritePageAsync(Hive, ReplicaHives, Id, NuGetVersion.Parse("1.0.0"), NuGetVersion.Parse("4.0.0"), page), Times.Once); Storage.Verify( x => x.WriteIndexAsync(It.IsAny <HiveType>(), It.IsAny <IReadOnlyList <HiveType> >(), It.IsAny <string>(), It.IsAny <RegistrationIndex>()), Times.Once); Storage.Verify(x => x.WriteIndexAsync(Hive, ReplicaHives, Id, RegistrationIndex), Times.Once); Storage.Verify(x => x.DeleteIndexAsync(It.IsAny <HiveType>(), It.IsAny <IReadOnlyList <HiveType> >(), It.IsAny <string>()), Times.Never); Storage.Verify(x => x.DeleteUrlAsync(It.IsAny <HiveType>(), It.IsAny <IReadOnlyList <HiveType> >(), It.IsAny <string>()), Times.Once); Storage.Verify(x => x.DeleteUrlAsync(Hive, ReplicaHives, oldPageUrl), Times.Once); Assert.Equal(newPageUrl, pageItem.Url); }
public void LoginTesT_For_10_DifferentValuesF_for_ConfirmPassword() { RegistrationPage registrationPage = new RegistrationPage(Browser.WebDriver); registrationPage.EnterEmailId("*****@*****.**").EnterPassword(TestContext.DataRow["Pwd"].ToString()). EnterConfirmPassword(TestContext.DataRow["ConfirmPwd"].ToString()).EnterMobile("9036612244").EnterFirstName(TestContext.DataRow["FirstName"].ToString()). EnterLastName(TestContext.DataRow["LastName"].ToString()).Click_On_m_sign(); if (registrationPage.EmailError) { if (registrationPage.ConfirmPwdError) { Assert.Fail("Please enter valid ConfirmPwd"); } else { Assert.IsTrue(true, "Login Success"); } } }
public void CheckPasswordIsChanged() { ManagePasswordPage managePasswordPage = new ManagePasswordPage(this.driver); managePasswordPage.NavigateTo(); RegistrationPage registrationPage = new RegistrationPage(this.driver); var username = "******"; var password = "******"; var confirmPassword = "******"; var email = username + "@mail.bg"; var user = new RegisterUser(username, password, confirmPassword, email); registrationPage.RegistrationForm(user); LoginUser loginUser = new LoginUser(email); managePasswordPage.ChangePassword(loginUser); managePasswordPage.AssertEmailIsSend("Your new password was sent successfully."); }
public App() { InitializeComponent(); //AppData.IsLogin = true; //AppData.UserId = "4"; //IDevice device = Resolver.Resolve<IDevice>(); //Constant.DeviceToken = device.Id; // MainPage = new ProductDetailsPage("ppp"); #region MyRegion if (AppData.IsMerchantLogin) { MainPage = new MerchantVerification(); } else { if (AppData.IsLogin || AppData.IsSkip) { MainPage = new MasterDetailsPage(); } else { MainPage = new RegistrationPage(); } } #endregion //Background color //MainPage.SetValue(NavigationPage.BarBackgroundColorProperty, Color.White); //Title color //MainPage.SetValue(NavigationPage.BackButtonTitleProperty, Color.Black); }
public void StrengthIndicatorMismatch() { var regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser("Carina", "Stefanova", new List <bool>(new bool[] { true, false, true }), new List <bool>(new bool[] { false, false, false }), "Bulgaria", "2", "2", "1980", "0888547593", "Momo", "*****@*****.**", "", "just some text", "12345678", "1234"); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.AssertErrorMessageStrengthIndicatorMismatch("Mismatch"); }
public void DuplicateEmail() { var regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser("Marina", "Stefanova", new List <bool>(new bool[] { true, false, true }), new List <bool>(new bool[] { false, false, false }), "Bulgaria", "2", "2", "1980", "0888547593", "Momo", "*****@*****.**", "", "just some text", "12345678", "12345678"); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.AssertNamesErrorMessageDublicateEmail(": E-mail address already exists"); }
public void RegistrateWithOutUserName() { var regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser("Carina", "Stefanova", new List <bool>(new bool[] { true, false, true }), new List <bool>(new bool[] { false, false, false }), "Bulgaria", "2", "2", "1980", "0888547593", "", "*****@*****.**", @"", "just some text", "12345678", "12345678"); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.AssertNamesErrorMessageNoUserName("* This field is required"); }
public void CreateUserAccount_Successfull() { UserModel userRegData = createRandomUserData(); RegistrationPage regPage = new RegistrationPage(driver, baseURL); regPage.goToPage(); regPage.addFirstName(userRegData.FirstName); regPage.addLastName(userRegData.LastName); regPage.addEmail(userRegData.Email); regPage.addmobilePhone(userRegData.MobilePhone); regPage.submitRegistrationForm(); RegistrationCompletedPage regCompletedPage = new RegistrationCompletedPage(driver); regCompletedPage.verifyRegistrationSuccessMessage(); var regCompletedData = restRequest.verifyRegistration(userRegData.Email); Assert.IsTrue(regCompletedData.TotalResults == 1); verifyUserRegistrationData(userRegData, regCompletedData.Results[0]); }
public void RegistrateWithInvalidPictureFormat() { var regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser("Ivana", "Stefanova", new List <bool>(new bool[] { true, true, false }), new List <bool>(new bool[] { false, false, false }), "Bulgaria", "2", "2", "1980", "0888542356", "Rozi", "*****@*****.**", @"D:\2016-08-21.rar", "just some text", "12345678", "12345678"); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.AssertErrorMessageInvaldeFile("* Invalid File"); }
public void DublicateUserName() { var regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser("Ivana", "Stefanova", new List <bool>(new bool[] { true, false, false }), new List <bool>(new bool[] { false, false, false }), "Bulgaria", "2", "2", "1980", "0888547593", "Rozi", "*****@*****.**", "", "just some text", "12345678", "12345678"); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.AssertMessagesDublicateUser(": Username already exists"); }
public void StartApplication() { driver.Navigate().GoToUrl(placowkaEdynburg); RegistrationPage reg = new RegistrationPage(driver); reg.Start("Edynburg"); string txt = reg.KomunikatSpan.Text; bool exists = reg.DniDropDown.Exists(); //bool dis = reg.Lokalizacja.Element.Enabled; if (exists) { reg.DniDropDown.AsSelect.SelectByIndex(0); reg.GodzinyDropDown.AsSelect.SelectByIndex(1); reg.RezerwujButton.Click(); } string src = driver.PageSource; Assert.True(txt != null); }
public void InvalidEmail() { var regPage = new RegistrationPage(this.driver); RegistrationUser user = new RegistrationUser("Cvetana", "Stefanova", new List <bool>(new bool[] { true, false, false }), new List <bool>(new bool[] { false, false, false }), "Bulgaria", "2", "2", "1980", "0888547593", "Fozi", "eyeyey", "", "just some text", "12345678", "12345678"); regPage.NavigateTo(); regPage.FillRegistrationForm(user); regPage.AssertMessagesInvalideEmail("* Invalid email address"); }
public void GivenIHaveNavigatedToTheRegistrationPage() { _page = new RegistrationPage(this); _page.Go(); }
private void NavigateToRegistrationPage() { this.Page = Host.Instance.NavigateToInitialPage<RegistrationPage>(RegistrationPage.Url); }