We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

WebTestRequestPlugin.PreRequest Method

When overridden in a derived class, this method allows outside code to affect the request.

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

public virtual void PreRequest(
	Object sender,
	PreRequestEventArgs e


Type: System.Object
The object that fired the event.
Type: Microsoft.VisualStudio.TestTools.WebTesting.PreRequestEventArgs
A PreRequestEventArgs object.

This is called just before the request is run. The called code must return the appropriate execution instruction. This allows it to change how execution occurs.