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)

Syntax

'Declaration
Public Class ExtractText _
    Inherits ExtractionRule
'Usage
Dim instance As ExtractText
public class ExtractText : ExtractionRule
public ref class ExtractText : public ExtractionRule
public class ExtractText extends ExtractionRule

Remarks

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

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.WebTesting.ExtractionRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractText

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

ExtractText Members

Microsoft.VisualStudio.TestTools.WebTesting.Rules Namespace

Other Resources

Working with Web Tests

How to: Create a Custom Extraction Rule

How to: Add an Extraction Rule to a Web Test