public void SetUp() { Driver = new ChromeDriver(); _postPageObject = new PostsPageObject(Driver); string url = "http://localhost:4200/posts"; Driver.Navigate().GoToUrl(url); }
public void Check_If_Button_Switches_To_Posts() { PostsPageObject ppo = _welcomePageObject.RedirectToPosts(); Assert.AreEqual("http://localhost:4200/posts", Driver.Url); // Alternative method to get url Assert.AreEqual("http://localhost:4200/posts", ppo.GetCurrentUrl()); Assert.AreEqual("List of posts with authors", ppo.H1Text.Text); }
public Pages(CommentsPageObject comments, PostsPageObject posts, UsersPageObject users, PhotosPageObject photos, AlbumsPageObject albums, TodosPageObject todos) { Comments = comments; Posts = posts; Users = users; Photos = photos; Albums = albums; Todos = todos; }
public void Go_To_Posts_From_Home_And_Check_H1_Text() { try { Driver.Navigate().GoToUrl("http://localhost:4200/home"); PostsPageObject posts = _topMenuPageObject.RedirectToPosts(); Assert.AreEqual("List of posts with authors", posts.H1Text.Text); } catch (AssertFailedException afe) { FileLogHelper.Save(afe); } }
public void Go_To_Posts_From_Home() { try { Driver.Navigate().GoToUrl("http://localhost:4200/home"); PostsPageObject posts = _topMenuPageObject.RedirectToPosts(); Assert.AreEqual("http://localhost:4200/posts", Driver.Url); } catch (AssertFailedException afe) { FileLogHelper.Save(afe); } }