public void CreateNewPost() { var loginPage = new LoginPage(this.driver); var accountPage = new AccountPage(this.driver); var createPostPage = new CreatePostPage(this.driver); string titleOfPost = "New Important Post"; string contentOfPost = "That is new post created"; loginPage.Login(); createPostPage.NavigateTo(); createPostPage.CreateNewPost(titleOfPost, contentOfPost); Assert.AreEqual(titleOfPost, accountPage.FindNewPostTitle.Text); }
public void PurchaseItemAsNewUser() { HomePage homePage = new HomePage(driver); homePage.AddItemToBasket(); RegisterPage registerPage = new RegisterPage(driver); registerPage.RegisterAccount(); AccountPage accountPage = new AccountPage(driver); accountPage.SignOut(); }
public void UseSeleno() { var selenoHost = BrowserHost.Instance; AccountPage accountPage = selenoHost.NavigateToInitialPage <AccountController, AccountPage>(x => x.Login(string.Empty)); LoginViewModel loginViewModel = new LoginViewModel() { Email = "*****@*****.**", Password = "******" }; var homePage = accountPage.Submit <AccountPage>(loginViewModel); Thread.Sleep(TimeSpan.FromSeconds(2)); selenoHost.Application.Browser.Url.Should().Be(BrowserHost.RootUrl); }
public void DeletePost() { var loginPage = new LoginPage(this.driver); var accountPage = new AccountPage(this.driver); accountPage.NavigateTo(); // string newPostLink = accountPage.FindNewPostTitle.Text; try { loginPage.Login(); accountPage.FindNewPostTitle.Click(); this.driver.FindElement(By.XPath("/html/body/div[2]/div/article/footer/a[2]")).Click(); this.driver.FindElement(By.XPath("/html/body/div[2]/div/div/form/div[3]/div/input")).Click(); if (accountPage.FindNewPostTitle.Text == null) { CreatePostPageAsserter.AsserterForMissingElement("NoSuchElementException"); } } catch (NoSuchElementException) { CreatePostPageAsserter.AsserterForMissingElement("NoSuchElementException"); } }
public void NegSignInFails() { AccountPage accountPage = new AccountPage(driver); accountPage.SignInFail(); }