HtmlDocument Class

Provides access to the set of HTML tags in an HTML response body.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.WebTesting.HtmlDocument

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class HtmlDocument
[SerializableAttribute]
public class HtmlDocument
[SerializableAttribute]
public ref class HtmlDocument
[<SerializableAttribute>]
type HtmlDocument =  class end
public class HtmlDocument

The HtmlDocument type exposes the following members.

Constructors

  Name Description
Public method HtmlDocument Initializes a new instance of the HtmlDocument class. This constructor takes a string and uses it as the document.

Top

Properties

  Name Description
Public property DependentRequestUrls Gets the URLs for dependent requests found in the HTML document.
Public property HtmlTags Gets all the tags that are available in the document.

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetFilteredHtmlTags Parses HtmlDocument and returns an iterator with all the HTML tags found that match the tags that are contained in the tagFilter array.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetParserOffsetTracking Sets the parser mode for tracking tag and attribute value offsets.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

This is used by extraction and validation rules to access the contents of an HTML document.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.WebTesting Namespace

Other Resources

Working with Web Tests