ExtractAttributeValue.TagName 属性

获取或设置标记的名称,该标记包含要提取的特性。

命名空间:  Microsoft.VisualStudio.TestTools.WebTesting.Rules
程序集:  Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)

语法

声明
Public Property TagName As String
    Get
    Set
public string TagName { get; set; }
public:
property String^ TagName {
    String^ get ();
    void set (String^ value);
}
member TagName : string with get, set
function get TagName () : String
function set TagName (value : String)

属性值

类型:System.String
标记的名称,该标记包含要提取的特性值。

备注

这用来标识某个标记,该标记包含要提取值的特性。 请看下面的 HTML:

<input name="MyTextBox" type="text" id="TextBox1" />

<input type="submit" name="Button1" value="Button" id="Button1" />

如果要提取 id 特性值,请将 TagName 属性设置为 input,将 AttributeName 属性设置为 id。

这将返回 TextBox1 值,因为 TextBox1 是所找到的第一个 input 标记中的 id 值。 若要从第二个标记中提取 id,请参见 MatchAttributeNameMatchAttributeValue

.NET Framework 安全性

请参见

参考

ExtractAttributeValue 类

Microsoft.VisualStudio.TestTools.WebTesting.Rules 命名空间