Agent Class

Description

Agent is the class for the Open Agent, the component of Silk4NET that interacts with the graphical user interface.

Agent has a predefined identifier, Agent. To call a method of the Agent, use this syntax:

Agent.method()

Inheritance Hierarchy

Agent does not derive from any class, and no classes derive from it.

Syntax

C#
public class Agent
VB
'Declaration
Public Class Agent

Properties

Name Description
Desktop Gets the root GUI object.
SystemFunctions Gets the SystemFunctions object, which allows you to perform operating-system-specific operations, both on the local machine and on remote machines on which the Open Agent is installed.

Methods

Name Description
Attach Attaches to the given application. Enables you to specify an additional command-line pattern and tech domain.
CloseTrueLogSection Closes the TrueLog section that was last opened with OpenTrueLogSection.
Connect Connects to an agent on the given machine by using the specified host and port.
Decrypt Decrypts the given string. Only strings that were encrypted with the Encrypt method can be decrypted.
DetachAll Detaches all currently attached applications.
Encrypt Encrypts the given string.
ExecuteBaseState Ensures that the test application is running and ready for testing.
GetOption Retrieves the value of an agent option.
LogError Logs an error message and a screenshot to the TrueLog file that is written during test execution.
LogInfo Logs an informational message to the TrueLog file that is written during test execution.
LogWarning Logs a warning message to the TrueLog file that is written during test execution.
OpenTrueLogSection Creates a new section in the TrueLog file.
ResetOptions Resets all agent options to their default values.
SetOption Sets an agent option. This option is distributed to all technology domains.
Shutdown Stops the agent. Should be called only when the test execution is finished.