We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

ExtractText Class

Extract text from the HtmlDocument based on delimiting start/end strings, matching regular expressions, and the occurrence of the text. The extracted text is added to the WebTestContext.

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

public class ExtractText : ExtractionRule

By default, the first occurrence is returned. This will extract any string that is contained in the response body, including HTML tags.


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