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
)

Parameters

sender
Type: System.Object
The object that fired the event.
e
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.

Show: