ExtractAttributeValue Class
Extract the value of an attribute from a specified HTML tag.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.TestTools.WebTesting.ExtractionRule
Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractAttributeValue
Namespace: Microsoft.VisualStudio.TestTools.WebTesting.Rules
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
Public Class ExtractAttributeValue _
Inherits ExtractionRule
public class ExtractAttributeValue : ExtractionRule
public ref class ExtractAttributeValue : public ExtractionRule
type ExtractAttributeValue =
class
inherit ExtractionRule
end
public class ExtractAttributeValue extends ExtractionRule
The ExtractAttributeValue type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ExtractAttributeValue | Initializes a new instance of the ExtractAttributeValue class. |
Top
Properties
Name | Description | |
---|---|---|
AttributeName | Gets or sets a value that represents the name of the attribute that has the value to extract. | |
ContextParameterName | Gets or sets the context name of the extracted property. (Inherited from ExtractionRule.) | |
HtmlDecode | Gets or sets a value that indicates whether the extracted value should be HTML decoded before the value is placed in the Web performance test context. | |
Index | ||
MatchAttributeName | Gets or sets an additional attribute name that must be found in the HTML tag that contains the attribute value to extract. Used in conjunction with MatchAttributeValue. | |
MatchAttributeValue | Gets or sets the value of an additional attribute that must be found in the HTML tag that contains the attribute value to extract. Used in conjunction with MatchAttributeName. | |
Required | Gets or sets a value that indicates whether the extraction rule should fail if the value to be extracted is not found in the response. | |
RuleDescription | Obsolete. This method is no longer used. Use the DisplayNameAttribute on the class to set a description for this rule. (Inherited from ExtractionRule.) | |
RuleName | Obsolete. This method is no longer used. Use the DisplayNameAttribute on the class to set a display name for this rule. (Inherited from ExtractionRule.) | |
TagName | Gets or sets the name of the tag that contains the attribute you want to extract. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Extract | Extracts the value of an attribute if a match is found. (Overrides ExtractionRule.Extract(Object, ExtractionEventArgs).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
This extraction rule searches for the first occurrence of an attribute value located in an HTML tag that meets the extraction criteria. The pass/fail status of this test is determined by whether the test is required to find the attribute value to pass and if the criteria are met. To use this extraction rule, an HTML tag name and the attribute to find must be specified with the TagName and AttributeName properties. Additional criteria can be identified with the MatchAttributeName and MatchAttributeValue properties.
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.Rules Namespace
Other Resources
Coding a custom extraction rule for a web performance test
[retired] How to: Add an Extraction Rule to a Web Performance Test