This Custom Activity is a wrapper on top of HTML Agility Pack ( http://html-agility-pack.net/ ) to allow using XPath queries ( XPath Tutorial ) against HTML pages (obtained with HTTP request).

NOTE: It does not work with dynamic (Java Script) components/controls, just static HTML content (so no Angular, React, Ajax based sites).

You can get ready-made XPath selectors by using Google Chrome to open the page of interest, right clicking an element, Inspect, right click HTML definition, choose Copy and then “Copy XPath” - then you can adjust that selector, make it more generic, etc).

Output is a List of strings.

Test Case 1:
Attribute: “INNERHTML”
URL: “XPath Tutorial
XPath Selector: “//*[@id=”“main”"]/h2"

Test Case 2:
Attribute: “href”
URL: “XPath Tutorial
XPath Selector: “//*[@id=”“main”"]/div[4]/a[1]"

Package: UiPathTeam.XPathWebScrape.Activities
Author: @cornel