Share via


ExtractRegularExpression.Index Property

Gets or sets a value that represents an index value of an occurrence of a string that is located in the HtmlDocument.

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

Syntax

'Declaration
Public Property Index As Integer
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)

Property Value

Type: System.Int32
An index value of an occurrence of a string that is identified by RegularExpression.

Remarks

This is a zero-based index used to identify which occurrence of a string that is identified by RegularExpression, will be extracted and added to the WebTestContext. If the Index value is greater than the number of occurrences in the HtmlDocument, this extraction rule will fail as long as Required is true.

.NET Framework Security

See Also

Reference

ExtractRegularExpression Class

Microsoft.VisualStudio.TestTools.WebTesting.Rules Namespace