Exemple #1
0
		public void VerifyQuickSearch(BasePage currentPage)
		{
			currentPage.WaitAndType(By.XPath(ControlPanelIDs.SearchBox), "home");
			currentPage.WaitForElement(By.XPath("//ul[@class = 'searchSkinObjectPreview']"), 60);

			Assert.IsTrue(currentPage.ElementPresent(By.XPath("//li/a[@class = 'searchSkinObjectPreview_more']")),
			              "The link 'See More Results' is missing");

			Assert.That(currentPage.FindElements(By.XPath("//ul[@class = 'searchSkinObjectPreview']/li[@data-url]")).Count,
			            Is.AtLeast(1),
			            "At least one item is displayed");
		}
		public void NumberOfLinksOnPage(BasePage currentPage, string featureList, int numberOfLinks)
		{
			Trace.WriteLine(BasePage.TraceLevelPage + "ASSERT the number of links on page: " +
							numberOfLinks);

			currentPage.WaitForElement(By.XPath(featureList + "/div[last()]"));
			Assert.That(currentPage.FindElements(By.XPath(featureList)).Count,
						Is.EqualTo(numberOfLinks),
						"The number of links on page is not correct");
		}