[TestCase("pinkfloyd", "password")] //enters valid username and password public void TestExplorePageSearchBox(string user, string password) { //calls helper method InitLoginPage InitLoginPage(user, password, null, null, null); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); //verifies navigation links VerifyNavigationControl(navControl); //clicks on Explore link navControl.GotoExplore(); //creates instance of Searchbox object SearchBox searchBox = new SearchBox(driver); Thread.Sleep(2000); //verifies seach box elements searchBox.VerifyElement(); Thread.Sleep(2000); //send text into search box searchBox.SearchYip("Breeze"); Thread.Sleep(2000); //verifies explore page title searchBox.VerifyTitle(); //asserts text with the search label searchBox.VerifySearchLabel("Breeze"); }
[TestCase("pinkfloyd", "password")] //enters valid username and password public void TestExploreH3Header(string user, string password) { //calls helper method InitLoginPage InitLoginPage(user, password, null, null, null); Thread.Sleep(2000); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); //verifies navigation links VerifyNavigationControl(navControl); navControl.GotoExplore(); //creates instance of ExplorePage object ExplorePage h3Header = new ExplorePage(driver); Thread.Sleep(2000); //verifies top hashtags var expected = "Top Hashtags"; var actual = h3Header.TopHashTags.Text; Assert.AreEqual(expected, actual); //verifies top yippers expected = "Top yippers"; actual = h3Header.TopYippers.Text; Assert.AreEqual(expected, actual); }
[TestCase("pinkfloyd", "password")] //enters valid username and password public void TestExplorePageTitleAndFooter(string user, string password) { //calls helper method InitLoginPage InitLoginPage(user, password, null, null, null); Thread.Sleep(2000); //creates instance of NavigationControl object Navigationcontrol navControl = new Navigationcontrol(driver); navControl.GotoExplore(); Thread.Sleep(2000); //creates new Explore page object ExploreTitleAndFooter exploreTitleFooter = new ExploreTitleAndFooter(driver); Thread.Sleep(2000); //explore title var expected = "Explore - BC Yips!"; var actual = driver.Title; Assert.AreEqual(expected, actual); //verifies footer on home page expected = "© 2020 - Bellevue College"; actual = exploreTitleFooter.FooterBC.Text; Assert.AreEqual(expected, actual, "Footer does not match"); }