Table of Contents

Class Configuration

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

Contains Ranorex configuration settings.

public class Configuration
Inheritance
Configuration
Inherited Members

Constructors

Configuration(Configuration)

Initializes a new instance of the Configuration class.

public Configuration(Configuration parent)

Parameters

parent Configuration

The parent configuration to inherit parameters from.

Properties

Adapter

Gets the collection of configuration parameters for the Adapter class.

public Configuration.AdapterConfig Adapter { get; }

Property Value

Configuration.AdapterConfig

The adapter configuration.

Current

Gets or sets the current configuration instance.

public static Configuration Current { get; set; }

Property Value

Configuration

The current configuration.

CustomConfigurationParameters

Gets a list of all registered custom configuration parameters (see Register(CustomConfigurationParam)).

public static IList<Configuration.CustomConfigurationParam> CustomConfigurationParameters { get; }

Property Value

IList<Configuration.CustomConfigurationParam>

Dirty

Gets a value indicating whether any of the configuration parameter values have changed since the last load/save.

public bool Dirty { get; }

Property Value

bool

EffectiveDataSetDialog

Gets the collection of configuration parameters for the EffectiveDataSetDialog.

public Configuration.EffectiveDataSetDialogConfig EffectiveDataSetDialog { get; }

Property Value

Configuration.EffectiveDataSetDialogConfig

The EffectiveDataSetDialog configuration.

GlobalDefaults

Gets the global defaults that are hard-coded default values set by Ranorex.

public static Configuration GlobalDefaults { get; }

Property Value

Configuration

The global defaults.

Imaging

Gets the collection of configuration parameters for Imaging operations.

public Configuration.ImagingConfig Imaging { get; }

Property Value

Configuration.ImagingConfig

The imaging operations configuration.

Input

Gets the collection of configuration parameters for keyboard/mouse input.

public Configuration.InputConfig Input { get; }

Property Value

Configuration.InputConfig

The input configuration.

this[string]

Gets or sets a parameter by name.

public object this[string name] { get; set; }

Parameters

name string

Property Value

object

The configuration parameter value.

KeyValueStore

Gets the collection of configuration parameters for the TestCasePropertyDialog.

public Configuration.KeyValueStoreData KeyValueStore { get; }

Property Value

Configuration.KeyValueStoreData

The TestCasePropertyDialog configuration.

Keyboard

Gets the collection of configuration parameters for the Keyboard class.

public Configuration.KeyboardConfig Keyboard { get; }

Property Value

Configuration.KeyboardConfig

ManageMobileDevicesForm

Gets the collection of configuration parameters for the ManageMobileDevicesForm.

public Configuration.ManageMobileDevicesFormConfig ManageMobileDevicesForm { get; }

Property Value

Configuration.ManageMobileDevicesFormConfig

The ManageMobileDevicesForm configuration.

Parent

Gets the parent configuration.

public Configuration Parent { get; }

Property Value

Configuration

The parent.

Plugins

Gets the collection of configuration parameters that are specific to Ranorex plugins.

public Configuration.PluginsConfig Plugins { get; }

Property Value

Configuration.PluginsConfig

The Plugins configuration.

Pointer

Gets the collection of configuration parameters for the Mouse and Ranorex.Core.Touch classes.

public Configuration.PointerConfig Pointer { get; }

Property Value

Configuration.PointerConfig

Recorder

Gets the collection of recorder configuration parameters.

public Configuration.RecorderConfig Recorder { get; }

Property Value

Configuration.RecorderConfig

The recorder configuration.

Report

Gets the collection of configuration parameters that apply to all Ranorex tools.

public Configuration.ReportConfig Report { get; }

Property Value

Configuration.ReportConfig

The Tools configuration.

Repository

Gets the collection of repository configuration parameters.

public Configuration.RepositoryConfig Repository { get; }

Property Value

Configuration.RepositoryConfig

The repository configuration.

RxPath

Gets the collection of configuration parameters for the RxPath class.

public Configuration.RxPathConfig RxPath { get; }

Property Value

Configuration.RxPathConfig

The RxPath configuration.

Spy

Gets the collection of configuration parameters for the Spy application.

public Configuration.SpyConfig Spy { get; }

Property Value

Configuration.SpyConfig

The Spy configuration.

SqlConnector

Gets the configuration parameters for the SqlConnector Configuration.

public Configuration.SqlConnectorConfig SqlConnector { get; }

Property Value

Configuration.SqlConnectorConfig

The Plugins configuration.

TestCasePropertyDialog

Gets the collection of configuration parameters for the TestCasePropertyDialog.

public Configuration.TestCasePropertyDialogConfig TestCasePropertyDialog { get; }

Property Value

Configuration.TestCasePropertyDialogConfig

The TestCasePropertyDialog configuration.

Tools

Gets the collection of configuration parameters that apply to all Ranorex tools.

public Configuration.ToolsConfig Tools { get; }

Property Value

Configuration.ToolsConfig

The Tools configuration.

UserSettingsFilename

The name of the file where the current user configuration settings are stored.

public static string UserSettingsFilename { get; }

Property Value

string

Validation

Gets the collection of configuration parameters for Validate operations.

public Configuration.ValidationConfig Validation { get; }

Property Value

Configuration.ValidationConfig

The validation action configuration.

VariableStoreEditorForm

Gets the collection of configuration parameters for the VariableStoreEditorForm.

public Configuration.VariableStoreEditorFormConfig VariableStoreEditorForm { get; }

Property Value

Configuration.VariableStoreEditorFormConfig

The VariableStoreEditorForm configuration.

Methods

CreateFromFile(string, Configuration, bool)

Creates a configuration instance from an XML file.

public static Configuration CreateFromFile(string settingsFile, Configuration parent, bool importMode)

Parameters

settingsFile string

The name of the file.

parent Configuration

The designated parent configuration.

importMode bool

If set to true, merge imported nonlocal parameters with current local parameters.

Returns

Configuration

The loaded configuration instance.

CreateFromXml(XmlNode, Configuration, bool, Configuration)

Creates a configuration instance from an XML representation.

public static Configuration CreateFromXml(XmlNode node, Configuration parent, bool mergeNonLocal, Configuration currentLocal)

Parameters

node XmlNode

The node.

parent Configuration

The parent.

mergeNonLocal bool

If true, the loaded non-local parameters are merged with the local parameters from the specified local config.

currentLocal Configuration

The current local config to merge with if only non-local parameters are loaded.

Returns

Configuration

The created configuration instance.

Export(string)

Exports the Current configuration to the specified file.

public static void Export(string configurationFileName)

Parameters

configurationFileName string

The name of the file to export the configuration to.

Get<T>(string)

Gets a configuration parameter by specifying a name and a target type.

public T Get<T>(string name)

Parameters

name string

The name of the configuration parameter.

Returns

T

The current parameter value.

Type Parameters

T

The desired target type for the configuration parameter.

HandleCommandLineArguments()

Handles the command line arguments passed when the process was started.

public static bool HandleCommandLineArguments()

Returns

bool

true if an action was taken according to the passed command line arguments and execution should not be continued (e.g. when the help text should be shown or when the configuration parameters should be listed); otherwise false.

Import(string)

Imports the configuration from the specified file name and sets it to the Current configuration.

public static void Import(string configurationFileName)

Parameters

configurationFileName string

The name of the file to import the configuration from.

LoadFromUserSettings(Configuration)

Creates a configuration instance from user settings (current user / application data).

public static Configuration LoadFromUserSettings(Configuration parent)

Parameters

parent Configuration

The parent configuration.

Returns

Configuration

The loaded configuration instance.

LoadFromUserSettings(Configuration, bool)

Creates a configuration instance from user settings (current user / application data).

public static Configuration LoadFromUserSettings(Configuration parent, bool createIfNotFound)

Parameters

parent Configuration

The parent configuration.

createIfNotFound bool

If set to true and no configuration file is found in the user settings, then a configuration file is created.

Returns

Configuration

The loaded configuration instance.

Register(CustomConfigurationParam)

Registers a new custom configuration parameter.

public static void Register(Configuration.CustomConfigurationParam newParam)

Parameters

newParam Configuration.CustomConfigurationParam

The new parameter.

Remarks

You can retrieve a list of all registered custom configuration parameters using the CustomConfigurationParameters property.

SaveToUserSettings()

Stores the configuration to the user settings file. (current user / application data)

public void SaveToUserSettings()

Remarks

Only overwrites configuration parameters that were actually changed since the last load/save.

ToXmlNode(XmlNode, bool)

Creates a XML node representing the parameters in the configuration instance.

public XmlNode ToXmlNode(XmlNode parent, bool forExport)

Parameters

parent XmlNode

The desired parent XML node.

forExport bool

If set to true, only non-local parameters are stored.

Returns

XmlNode

The created XML node.

TrySaveToUserSettings()

Tries to save the configuration by calling SaveToUserSettings() and catching and returning any exception thrown.

public Exception TrySaveToUserSettings()

Returns

Exception

Any exception thrown by SaveToUserSettings() or null if no exception is thrown.