Table of Contents

Class TestAgentExtensions

Namespace
Xping.Sdk.Extensions
Assembly
Xping.Sdk.dll

Provides extension methods for the TestAgent class to enhance its functionality.

public static class TestAgentExtensions
Inheritance
TestAgentExtensions
Inherited Members

Methods

UseBrowserClient(TestAgent, Action<BrowserConfiguration>?)

Configures the TestAgent to simulate browser requests.

public static TestAgent UseBrowserClient(this TestAgent testAgent, Action<BrowserConfiguration>? options = null)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

options Action<BrowserConfiguration>

Optional configuration settings for the browser simulation.

Returns

TestAgent

UseDnsLookup(TestAgent)

Configures the TestAgent to perform DNS lookups.

public static TestAgent UseDnsLookup(this TestAgent testAgent)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

Returns

TestAgent

UseHtmlValidation(TestAgent, Action<IHtmlContent>)

Configures the TestAgent with a html content validator.

public static TestAgent UseHtmlValidation(this TestAgent testAgent, Action<IHtmlContent> htmlContent)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

htmlContent Action<IHtmlContent>

The validation logic to use on the Html content.

Returns

TestAgent

UseHttpClient(TestAgent, Action<HttpClientConfiguration>?)

Configures the TestAgent to send requests using an HttpClient.

public static TestAgent UseHttpClient(this TestAgent testAgent, Action<HttpClientConfiguration>? options = null)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

options Action<HttpClientConfiguration>

Optional configuration settings for the HttpClient.

Returns

TestAgent

UseHttpValidation(TestAgent, Action<IHttpResponse>)

Configures the TestAgent with a http response validator.

public static TestAgent UseHttpValidation(this TestAgent testAgent, Action<IHttpResponse> response)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

response Action<IHttpResponse>

The validation logic to use on the HTTP response.

Returns

TestAgent

UseIPAddressAccessibilityCheck(TestAgent, Action<PingConfiguration>?)

Configures the TestAgent to check IP address accessibility using ping.

public static TestAgent UseIPAddressAccessibilityCheck(this TestAgent testAgent, Action<PingConfiguration>? options = null)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

options Action<PingConfiguration>

Optional configuration settings for the ping operation.

Returns

TestAgent

UsePageValidation(TestAgent, Func<IPage, Task>)

Configures the TestAgent with a page content validator.

public static TestAgent UsePageValidation(this TestAgent testAgent, Func<IPage, Task> page)

Parameters

testAgent TestAgent

The instance of TestAgent to configure.

page Func<IPage, Task>

The validation logic to use on the Page object.

Returns

TestAgent