ClassWpfRemoteClient
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:
public class WpfRemoteClient
Inheritance: objectWpfRemoteClient
Constructors
WpfRemoteClient()
Create a new WpfRemoteClient object.
Declaration
public WpfRemoteClient()
Properties
ClientId
Gets this client's unique id.
IsConnected
Gets whether this client is connected or not to the Manager.
Methods
Connect(BrowserType, string, IntPtr, bool, bool, int)
Connect this client to the Manager.
Declaration
public void Connect(BrowserType type, string version, IntPtr hwnd, bool isUILess, bool isDialog, int pid = 0)
Parameters
type
The type of the browser being connected.
version
The version of the browser being connected.
hwnd
The hwnd of the browser window being connected.
isUILess
Whether this client is UI less or not.
isDialog
Whether the browser client is a dialog (Used for IE modal/modeless dialogs).
pid
The process id of client application.
Disconnect()
Disconnect this client from Manager.
Declaration
public void Disconnect()
ProcessResponse(WpfCommandEventArgs)
Process a response to the Manager.
Declaration
public void ProcessResponse(WpfCommandEventArgs e)
Parameters
e
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
public event EventHandler<WpfCommandEventArgs> ApplicationRequest
Event Value
Remarks
Event handlers should block until the command is proceed. They should not return immediately. Otherwise we will deadlock.