ClassBrowserRemoteClient
This class represents a client that the browser 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 BrowserRemoteClient : IBrowserRemotedClient
Inheritance: objectBrowserRemoteClient
Implements:
Constructors
BrowserRemoteClient(Action<string, MemoryStream>)
Create a new BrowserRemoteClient object.
Declaration
public BrowserRemoteClient(Action<string, MemoryStream> customAssemblyHandler)
Parameters
customAssemblyHandler
Properties
ClientId
Gets this client's unique id.
IsConnected
Gets whether this client is connected or not to the Manager.
Settings
Get the testcase execution settings as pushed by the server.
Declaration
public BrowserRemotedSettings Settings { get; }
Property Value
BrowserRemotedSettings
Implements
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()
Implements
DispatchJavascriptEvent(JavascriptEventMessage)
Dispatches a Javascript event to WebAii
Declaration
public void DispatchJavascriptEvent(JavascriptEventMessage eventMessage)
Parameters
eventMessage
JavascriptEventMessage
Message containing information about the event
Implements
DoProvision()
Will attempt to provision this client, else will return false.
Declaration
public bool DoProvision()
Returns
True/False whether the client is provisioned.
Implements
LogMessage(LogType, string)
Log a message to the centralized logging location.
ProcessResponse(BrowserCommandEventArgs)
Process a response to the Manager.
Declaration
public void ProcessResponse(BrowserCommandEventArgs e)
Parameters
e
The response.
Implements
Events
BrowserRequest
Occurs when a browser request is issued. Browser clients subscribe to this event and execute the command in their respective browser. Once the requested command is complete, the client should call the ProcessResponse() method.
Declaration
public event EventHandler<BrowserCommandEventArgs> BrowserRequest
Event Value
Implements
Remarks
Event handlers should block until the command is proceed. They should not return immediately. Otherwise we will deadlock.