Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WebTestContext.Item Property (String)

 

Gets or sets the value associated with the specified key from the WebTestContext object.

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

public object this[
	string key
] { get; set; }

Parameters

key
Type: System.String

A string that corresponds to a key in the collection.

Property Value

Type: System.Object

A Object that contains the value associated with key.

Exception Condition
KeyNotFoundException

key not found.

Context defined by environmental variables or a load test will override the item returned by this property. So if a Web performance test is running in a Load Test that contains a context called "myContext", a call to MyWebTestContext.Item("myContext") will return the value for the LoadTestContext.Item("myContext").

Return to top
Show: