/// <summary> /// Verifies the document. /// </summary> /// <param name="title">The title.</param> /// <param name="href">The href.</param> public void VerifyDocumentInTableView(string text, string href) { HtmlDiv tableHolder = ActiveBrowser.Find.ByExpression <HtmlDiv>("class=sf-document-list sf-document-list--table") .AssertIsPresent("tableHolder"); HtmlTable table = tableHolder.Find.ByExpression <HtmlTable>("class=table") .AssertIsPresent("table"); HtmlAnchor doc = table.Find.ByExpression <HtmlAnchor>("innertext=" + text) .AssertIsPresent("document"); var parent = doc.Parent <HtmlTableCell>(); Assert.IsTrue(parent.TagName == "td"); Assert.IsTrue(parent.Parent <HtmlTableRow>().TagName == "tr"); Assert.IsTrue(doc.HRef.StartsWith(href), "href is not correct"); }
/// <summary> /// Verifies the document. /// </summary> /// <param name="title">The title.</param> /// <param name="href">The href.</param> public void VerifyDocumentInTableView(string text, string href, string culture) { HtmlTable table = ActiveBrowser.Find.ByExpression <HtmlTable>("class=rdTable") .AssertIsPresent("table"); HtmlAnchor doc = table.Find.ByExpression <HtmlAnchor>("innertext=" + text) .AssertIsPresent("document"); var parent = doc.Parent <HtmlTableCell>(); Assert.IsTrue(parent.TagName == "td"); Assert.IsTrue(parent.Parent <HtmlTableRow>().TagName == "tr"); if (culture == null) { Assert.IsTrue(doc.HRef.Contains(href), "href is not correct"); } }
/// <summary> /// Verifies that a given filter is selected. /// </summary> /// <param name="filterName">The filter name.</param> public void VerifySelectedFilter(string filterName) { HtmlAnchor filter = ActiveBrowser.Find.ByExpression <HtmlAnchor>("tagName=a", "InnerText=" + filterName); Assert.IsTrue(filter.Parent <HtmlListItem>().CssClass.Contains("active")); }