Share via


ExtractHiddenFields Class

Extracts all hidden fields from the response and adds each value to the context.

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

Syntax

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

Remarks

This rule extracts all the hidden form fields from an HTML page and stores them in the context so a subsequent request can use the hidden form field values. Each extracted hidden field will be stored in the context using the following naming convention: $HIDDEN<name>.<HiddenFieldName> where name is the Context Parameter Name set on the ExtractHiddenFields rule. When another ExtractHiddenFields rule uses the same Context Parameter Name, all existing hidden fields using that name will be removed from the context.

Note

This rule is automatically inserted by the Web Test Recorder when it detects that hidden fields are being used. When requests to multiple windows or frames are recorded, the Web Test Recorder will automatically set the Context Parameter Names to different values when necessary. This will allow multiple sets of hidden fields to be in the context at the same time.

Inheritance Hierarchy

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

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

ExtractHiddenFields 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