ExtractAttributeValue.MatchAttributeName プロパティ

更新 : 2007 年 11 月

抽出する属性値を含む HTML タグに含まれていなければならない追加の属性名を取得または設定します。MatchAttributeValue と共に使用します。

名前空間 :  Microsoft.VisualStudio.TestTools.WebTesting.Rules
アセンブリ :  Microsoft.VisualStudio.QualityTools.WebTestFramework (Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 内)

構文

'宣言
Public Property MatchAttributeName As String
'使用
Dim instance As ExtractAttributeValue
Dim value As String

value = instance.MatchAttributeName

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

プロパティ値

型 : System.String

属性の名前。

解説

このプロパティは、MatchAttributeValue と共に、抽出する属性を指定するための追加情報を提供します。

次の 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" />

このとき、Email 入力ボックスの id を抽出できます。これを行うには、TagName プロパティを input、AttributeName プロパティを id に設定します。

この HTML に含まれる 3 つのタグはすべて input タグで、id 属性を含んでいます。適切なタグから属性を抽出するには、追加情報を指定する必要があります。そこで、MatchAttributeName プロパティを name、MatchAttributeValue プロパティを Email に設定します。指定された基準を満たすタグは 1 つしかないので、そのタグから属性が抽出されます。

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

ExtractAttributeValue クラス

ExtractAttributeValue メンバ

Microsoft.VisualStudio.TestTools.WebTesting.Rules 名前空間