다음을 통해 공유


ExtractAttributeValue.MatchAttributeValue 속성

추출할 특성 값을 포함하는 HTML 태그에 있어야 할 추가 특성 값을 가져오거나 설정합니다. MatchAttributeName과 함께 사용됩니다.

네임스페이스:  Microsoft.VisualStudio.TestTools.WebTesting.Rules
어셈블리:  Microsoft.VisualStudio.QualityTools.WebTestFramework(Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

구문

‘선언
Public Property MatchAttributeValue As String
public string MatchAttributeValue { get; set; }
public:
property String^ MatchAttributeValue {
    String^ get ();
    void set (String^ value);
}
member MatchAttributeValue : string with get, set
function get MatchAttributeValue () : String 
function set MatchAttributeValue (value : String)

속성 값

형식: String
특성 값입니다.

설명

이 속성은 MatchAttributeName과 함께 추출할 특성을 지정하는 추가 정보를 제공합니다.

다음 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의 태그 세 개는 모두 input 태그이고 id 특성이 들어 있습니다. 이들 중 올바른 태그에서 특성을 추출하려면 추가 정보를 제공해야 합니다. MatchAttributeName 속성을 name으로, MatchAttributeValue 속성을 Email로 설정합니다. 이제 지정한 조건에 맞는 태그가 하나뿐이고, 해당 태그에서 특성이 추출됩니다.

.NET Framework 보안

참고 항목

참조

ExtractAttributeValue 클래스

Microsoft.VisualStudio.TestTools.WebTesting.Rules 네임스페이스