public void CheckArticleIsDeleted() { 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.LogOffButton.Click(); var logForm = new LoginPage(this.driver); var loginUser = new LoginUser(email, "0123456789"); logForm.FillLoginForm(loginUser); var existingArticle = new DeleteArticlePage(this.driver); existingArticle.NavigateTo(); existingArticle.CheckForExistingArticle(newArticle); existingArticle.AssertTheArticleIsDeleted("The article is deleted!"); }
public void CAP_TC6_Create_ArticlePageDisplayed() { var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.AssertCreateArticlePageIsDisplayed("Create Article"); }
public void CAP_TC2_Cancel_Empty_Article() { var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.CancelArticleButton.Click(); createArticlePage.AssertCreateArticleWithValidData("Test Automation is the key"); }
public void CAP_TC5_Create_ArticleWithoutTitle_Content() { var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.CreateArticleButton.Click(); createArticlePage.AssertCreateArticleWithoutTitle_andContent("The Title field is required.", "The Content field is required."); }
public void CAP_TC3_Create_ArticleWithoutContent() { var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.Title.SendKeys("Tralala"); createArticlePage.CreateArticleButton.Click(); createArticlePage.AssertCreateArticleWithoutContent("The Content field is required."); }
public void CAP_TC4_Create_ArticleWithoutTitle() { var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.Content.SendKeys("tralala"); createArticlePage.CreateArticleButton.Click(); createArticlePage.AssertCreateArticleWithoutTitle("The Title field is required."); }
public void CAP_TC1_CreateArticleWithValidData() { var createArticlePage = new CreateArticlePage(driver); var articleContent = new CreateArticleContent("Test Automation is the key", "Traditional quality assurance has become a bottleneck in the development process and the advancement of test automation. Innovative development teams ..."); createArticlePage.NavigateTo(); createArticlePage.FillCreateArticleForm(articleContent); createArticlePage.AssertCreateArticleWithValidData("Test Automation is the key"); }
public void CAP_TC6_Create_ArticlePageDisplayed() { var loginPage = new LoginPage(driver); var user = new LoginUser("*****@*****.**", "1234"); loginPage.NavigateTo(); loginPage.FillRegistrationForm(user); var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.AssertCreateArticlePageIsDisplayed("Create Article"); }
public void OpenCreateArticleFormShouldBeProccessedCorrectly() { //// Arrange var loginPage = new LoginPage(this.driver); var createArticlePage = new CreateArticlePage(this.driver); //// Act loginPage.LoginAsUser(); createArticlePage.Open(); //// Assert createArticlePage.AssertThatPageIsOpened(); loginPage.LogOff(); }
public void CAP_TC5_Create_ArticleWithoutTitle_Content() { var loginPage = new LoginPage(driver); var user = new LoginUser("*****@*****.**", "1234"); loginPage.NavigateTo(); loginPage.FillRegistrationForm(user); var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.Title.Clear(); createArticlePage.Content.Clear(); createArticlePage.CreateArticleButton.Click(); createArticlePage.AssertCreateArticleWithoutTitle_andContent("The Title field is required.", "The Content field is required."); }
public void CAP_TC2_Cancel_Empty_Article() { var loginPage = new LoginPage(driver); var user = new LoginUser("*****@*****.**", "1234"); loginPage.NavigateTo(); loginPage.FillRegistrationForm(user); var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.Title.Clear(); createArticlePage.Content.Clear(); createArticlePage.CancelArticleButton.Click(); createArticlePage.AssertCreateArticleWithValidData("Test Automation is the key"); }
public void CAP_TC3_Create_ArticleWithoutContent() { var loginPage = new LoginPage(driver); var user = new LoginUser("*****@*****.**", "1234"); loginPage.NavigateTo(); loginPage.FillLoginForm(user); var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); createArticlePage.Title.Clear(); createArticlePage.Title.SendKeys("Tralala"); createArticlePage.Content.Clear(); createArticlePage.CreateArticleButton.Click(); createArticlePage.AssertCreateArticleWithoutContent("The Content field is required."); }
public void CAP_TC7_Create_ArticleContentResize() { var createArticlePage = new CreateArticlePage(driver); createArticlePage.NavigateTo(); Actions builder = new Actions(this.driver); var action = builder.MoveToElement(createArticlePage.Content) .MoveByOffset((createArticlePage.Content.Size.Width / 2) - 2, (createArticlePage.Content.Size.Height / 2) - 2) .ClickAndHold() .MoveByOffset(300, 300) .Release(); action.Perform(); createArticlePage.AssertCreateArticlePageIsDisplayed("Create Article"); createArticlePage.AssertCreateArticleComtentresized(300); }
public void SetUp() { driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); driver.Manage().Window.Maximize(); wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); basePage = new BasePage(driver); driver.Navigate().GoToUrl(basePage.BaseUrl); homePage = new HomePage(driver); loginPage = new LoginPage(driver); regPage = new RegistrationPage(driver); articleDetailsPage = new ArticleDetailsPage(driver); createArticlePage = new CreateArticlePage(driver); deleteArticlePage = new DeleteArticlePage(driver); editArticlePage = new EditArticlePage(driver); changePasswordPage = new ChangePasswordPage(driver); managePage = new ManagePage(driver); }
public void CheckArticleIsCreatedWithoutContent() { 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!", ""); createdArticle.CreateArticle(newArticle); createdArticle.AssertArticleCreatedWithoutContent("The Content field is required."); }
public void CreateNewArticleWithoutTitle() { 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("", "The first Article is here!"); createdArticle.CreateArticle(newArticle); createdArticle.AssertArticleWithoutTitleError("The Title field is required."); }
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); }
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 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 CreatingNewArticleShouldProccessCorrectly() { //// Arrange var loginPage = new LoginPage(this.driver); var articleListPage = new ArticleListPage(this.driver); var createArticlePage = new CreateArticlePage(this.driver); var article = new CreateArticle() { Title = Guid.NewGuid().ToString(), Content = Guid.NewGuid().ToString() }; //// Act loginPage.LoginAsUser(); var expectedArticlesCount = articleListPage.Elements.Articles.Count + 1; createArticlePage.SubmitForm(article); var actualArticlesCount = articleListPage.Elements.Articles.Count; //// Assert Assert.AreEqual(expectedArticlesCount, actualArticlesCount); }
public static void AssertArticleCreatedWithoutContent(this CreateArticlePage page, string text) { Assert.AreEqual(text, page.ErrorMessageForArticleWithoutContent.Text); }
public static void AssertArticleCreatedWithoutTitleAndContentSecondErrorMessage(this CreateArticlePage page, string text) { Assert.AreEqual(text, page.CombinationOfErrorMessagesWithoutContent.Text); }