ExtractRegularExpression.Index 属性

获取或设置一个值,该值表示位于 HtmlDocument 的字符串匹配项的索引值。

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

语法

声明
Public Property Index As Integer
    Get
    Set
public int Index { get; set; }
public:
property int Index {
    int get ();
    void set (int value);
}
member Index : int with get, set
function get Index () : int
function set Index (value : int)

属性值

类型:System.Int32
RegularExpression 标识的字符串匹配项的索引值。

备注

这是一个从零开始的索引,用来标识由 RegularExpression 标识的哪个字符串匹配项将被提取并添加到 WebTestContext。 如果 Index 值大于 HtmlDocument 中的匹配项数目,则只要 Required 为 true,此提取规则就将失败。

.NET Framework 安全性

请参见

参考

ExtractRegularExpression 类

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