Loading and creating XML documents (XMLUtil)

The XMLUtil object is a utility that provides methods to do the following:

  • Create an XML wrapper
  • Load an existing XML file to an XML wrapper

Similar to other wrapper classes provided by UFT (such as those for Test Objects), it is convenient to simplify the usage of XML data via code. It provides an array of methods that cover the most frequently used functions of XMLDOM. Of course, if one needs specific functions not provided by the wrapper, it is always possible to recur to the XMLDOM or LINQ object model (which is not covered in this book).

For example, to get a specific node by ID, we shall use the native method GetElementByID.

Getting ready

From the File menu, navigate to New | Test, or use the Ctrl

Get Advanced UFT 12 for Test Engineers Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.