Dela via


ExtractFormField Class

Extracts the value of a form field attribute and adds it to the WebTestContext.

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

Syntax

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

Remarks

This extraction rule extracts form fields that have a name equal to the value set by Name. Consider the following HTML:

<input name="TextBox1" type="text" value="my first field" id="TextBox1" />

<input name="TextBox2" type="text" value="my 2nd field" id="TextBox2" />

The value of the TextBox1 field will be put in the context under the name specified by ContextParameterName.

Inheritance Hierarchy

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

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

ExtractFormField 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