Class
WpfRemoteClient

This class represents a client that the WPF application will create to talk to the automation infrastructure and respond to its requests.

Definition

Namespace:ArtOfTest.WebAii.Messaging.Process

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class WpfRemoteClient

Inheritance: objectWpfRemoteClient

Constructors

WpfRemoteClient()

Create a new WpfRemoteClient object.

Declaration

cs-api-definition
public WpfRemoteClient()

Properties

ClientId

Gets this client's unique id.

Declaration

cs-api-definition
public string ClientId { get; }

Property Value

string

IsConnected

Gets whether this client is connected or not to the Manager.

Declaration

cs-api-definition
public bool IsConnected { get; }

Property Value

bool

Methods

Connect(BrowserType, string, IntPtr, bool, bool, int)

Connect this client to the Manager.

Declaration

cs-api-definition
public void Connect(BrowserType type, string version, IntPtr hwnd, bool isUILess, bool isDialog, int pid = 0)

Parameters

type

BrowserType

The type of the browser being connected.

version

string

The version of the browser being connected.

hwnd

IntPtr

The hwnd of the browser window being connected.

isUILess

bool

Whether this client is UI less or not.

isDialog

bool

Whether the browser client is a dialog (Used for IE modal/modeless dialogs).

pid

int

The process id of client application.

Disconnect()

Disconnect this client from Manager.

Declaration

cs-api-definition
public void Disconnect()

ProcessResponse(WpfCommandEventArgs)

Process a response to the Manager.

Declaration

cs-api-definition
public void ProcessResponse(WpfCommandEventArgs e)

Parameters

e

WpfCommandEventArgs

The response.

Events

ApplicationRequest

Occurs when a application request is issued. Application clients subscribe to this event and execute the command in their respective application. Once the requested command is complete, the client should call the ProcessResponse() method.

Declaration

cs-api-definition
public event EventHandler<WpfCommandEventArgs> ApplicationRequest

Event Value

EventHandler<WpfCommandEventArgs>

Remarks

Event handlers should block until the command is proceed. They should not return immediately. Otherwise we will deadlock.