rediffusion
11/7/2017 - 9:45 AM

6. Объединяем два пути в один

Демонстрация работы с Lenta.Ru

Tab Tab1 = instance.ActiveTab;
//Объединяем два пути символом "|"
foreach (HtmlElement elNews in Tab1.FindElementsByXPath("//time[@class='g-time']/parent::a[1]|//div[contains(@class, 'item news')][descendant::span[@class='time']]/descendant::h3/a")) {
    project.SendInfoToLog(elNews.GetAttribute("InnerHtml"));
}