Udostępnij za pośrednictwem


ExtractAttributeValue.MatchAttributeValue Property

Gets or sets the value of an additional attribute that must be found in the HTML tag containing the attribute value to extract. Used in conjunction with MatchAttributeName.

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

Syntax

'Declaration
Public Property MatchAttributeValue As String
'Usage
Dim instance As ExtractAttributeValue 
Dim value As String 

value = instance.MatchAttributeValue

instance.MatchAttributeValue = value
public string MatchAttributeValue { get; set; }
public:
property String^ MatchAttributeValue {
    String^ get ();
    void set (String^ value);
}
public function get MatchAttributeValue () : String 
public function set MatchAttributeValue (value : String)

Property Value

Type: System.String
An attribute value.

Remarks

This property, in conjunction with MatchAttributeName, provides additional information for specifying the attribute to extract.

Consider the following HTML:

<input name="Name" type="text" id="TextBox1" size="25" />

<input name="Email" type="text" id="TextBox2" size="25" />

<input name="Password" type="password" id="TextBox3" size="25" />

You would like to extract the id of the Email input box. In order to do this, set the TagName property to input, and the AttributeName property to id.

Notice that all three tags in the HTML are input tags, and contain an id attribute. To extract the attribute from the correct tag, you must provide additional information. Set the MatchAttributeName property to name, and the MatchAttributeValue property to Email. Now only one tag satisfies the specified criteria, and the attribute will be extracted from that tag.

.NET Framework Security

See Also

Reference

ExtractAttributeValue Class

ExtractAttributeValue Members

Microsoft.VisualStudio.TestTools.WebTesting.Rules Namespace