public void VerifyCategoryEditing() { string categoryName = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.fff"); LoginHelper.Login(); new MainPage().GetCategoriesButton().Click(); CategoriesPage categoriesPage = new CategoriesPage(); categoriesPage.GetCreateNewCategoryButton().Click(); CreateCategoryPage createCategoryPage = new CreateCategoryPage(); createCategoryPage.GetCategotyNameTextField().SetValue(categoryName); createCategoryPage.GetSubmitButton().Click(); categoriesPage = new CategoriesPage(); categoriesPage.GetCategoryRowByName(categoryName).WaitForElementToBePresent().AssertExists(); categoriesPage.GetEditButtonByCategoryName(categoryName).Click(); string newCategoryName = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.fff"); EditCategoryPage editCategoryPage = new EditCategoryPage(); editCategoryPage.GetCategotyNameTextField().SetValue(newCategoryName); editCategoryPage.GetSubmitButton().Click(); categoriesPage = new CategoriesPage(); categoriesPage.GetCategoryRowByName(newCategoryName).WaitForElementToBePresent().AssertExists(); }
public void VerifyCategoryCreationWithEmptyName() { LoginHelper.Login(); new MainPage().GetCategoriesButton().Click(); CategoriesPage categoriesPage = new CategoriesPage(); categoriesPage.GetCreateNewCategoryButton().Click(); CreateCategoryPage createCategoryPage = new CreateCategoryPage(); createCategoryPage.GetSubmitButton().Click(); createCategoryPage.GetRequiredFildMissingMessage().WaitForElementToBePresent().AssertExists(); }
public void VerifyCreationAndDeletionOfCategory() { string categoryName = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.fff"); LoginHelper.Login(); new MainPage().GetCategoriesButton().Click(); CategoriesPage categoriesPage = new CategoriesPage(); categoriesPage.GetCreateNewCategoryButton().Click(); CreateCategoryPage createCategoryPage = new CreateCategoryPage(); createCategoryPage.GetCategotyNameTextField().SetValue(categoryName); createCategoryPage.GetSubmitButton().Click(); categoriesPage = new CategoriesPage(); categoriesPage.GetCategoryRowByName(categoryName).WaitForElementToBePresent().AssertExists(); categoriesPage.GetDeleteButtonByCategoryName(categoryName).Click(); WebdriverFactory.GetCurrentDriver().SwitchTo().Alert().Accept(); categoriesPage.GetCategoryRowByName(categoryName).WaitForElementToBeAbsent().AssertAbsent(); }
private async Task RenderCreatePage(string param) { Page page; switch (param) { case "account": page = new CreateAccountPage(); break; case "category": page = new CreateCategoryPage(); break; case "budget": page = new CreateBudgetPage(); break; default: page = new CreateTransactionPage(); break; } await _navigation.PushAsync(page); }