Skip to main content

Configuration class

This class is used to create a configuration object that is used to configure an Eyes object by passing it to the Eyes.SetConfiguration method.

You can use this configuration object instead of using the various Eyes methods and properties that set the same attributes. Typically you set up a Configuration object by calling its setXXXX methods chained with a '.' in a Fluent coding style.

Using statement

using Configuration = Applitools.Configuration;

Configuration method

Syntax

Configuration config = new Configuration();

Parameters

This method does not take any parameters.

Return value

Type: Configuration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

AccessibilityValidation property

Syntax

AccessibilitySettings configval; // give relevant initial value
config.AccessibilityValidation = configval;
configval = config.AccessibilityValidation

Type: AccessibilitySettings

Remarks

For more information about the Contrast advisor feature see Contrast advisor.

AgentId property

Syntax

string configval; // give relevant initial value
config.AgentId = configval;
configval = config.AgentId

Type: string

ApiKey property

Syntax

string configval; // give relevant initial value
config.ApiKey = configval;
configval = config.ApiKey

Type: string

Remarks

Set this immediately after the Eyes object is created (before calling Open). If you have an environment variable called APPLITOOLS_API_KEY that is set to the value of your API key, then you do not need to call this method, and Eyes will take the string from the environment value.

AppName property

Syntax

string configval; // give relevant initial value
config.AppName = configval;
configval = config.AppName

Type: string

Remarks

If you call this method, it must be called before the call to Eyes.Open. In the call to Eyes.Open, if you provide the application parameter, then it will override the value set here. If you don't provide the parameter or pass a null, then the value set here will be used.

BaselineBranchName property

Syntax

string configval; // give relevant initial value
config.BaselineBranchName = configval;
configval = config.BaselineBranchName

Type: string

BaselineEnvName property

Syntax

string configval; // give relevant initial value
config.BaselineEnvName = configval;
configval = config.BaselineEnvName

Type: string

Batch property

Syntax

BatchInfo configval; // give relevant initial value
config.Batch = configval;
configval = config.Batch

Type: BatchInfo

BranchName property

Syntax

string configval; // give relevant initial value
config.BranchName = configval;
configval = config.BranchName

Type: string

HostApp property

Syntax

string configval; // give relevant initial value
config.HostApp = configval;
configval = config.HostApp

Type: string

HostOS property

Syntax

string configval; // give relevant initial value
config.HostOS = configval;
configval = config.HostOS

Type: string

IgnoreCaret property

Syntax

bool configval; // give relevant initial value
config.IgnoreCaret = configval;
configval = config.IgnoreCaret

Type: bool

IgnoreDisplacements property

Syntax

bool configval; // give relevant initial value
config.IgnoreDisplacements = configval;
configval = config.IgnoreDisplacements

Type: bool

Remarks

Ignore displacements is only active when using a Match level of Strict or IgnoreColors

MatchLevel property

Syntax

MatchLevel configval; // give relevant initial value
config.MatchLevel = configval;
configval = config.MatchLevel

Type: MatchLevel

Remarks

For a full description of the affect of each match levels and the different ways to apply them to tests, checkpoints and regions, How to use Eyes match levels.

MatchTimeout property

Syntax

TimeSpan configval; // give relevant initial value
config.MatchTimeout = configval;
configval = config.MatchTimeout

Type: TimeSpan

Remarks

You can override the default timeout set by this property for a specific set checkpoint by passing a timeout to one of the check_XXXX methods that support a timeout parameter, e.g. CheckWindowYou can also override the timeout for a specific test using the check fluent Timeout method

BranchName property

Syntax

string configval; // give relevant initial value
config.ParentBranchName = configval;
configval = config.ParentBranchName

Type: string

SaveDiffs property

Syntax

bool? configval; // give relevant initial value
config.SaveDiffs = configval;
configval = config.SaveDiffs

Type: bool?

SaveNewTests property

Syntax

bool configval; // give relevant initial value
config.SaveNewTests = configval;
configval = config.SaveNewTests

Type: bool

ServerUrl property

Syntax

string configval; // give relevant initial value
config.ServerUrl = configval;
configval = config.ServerUrl

Type: string

TestName property

Syntax

string configval; // give relevant initial value
config.TestName = configval;
configval = config.TestName

Type: string

Clone method

Syntax

Configuration configval = config.Clone();

Parameters

This method does not take any parameters.

Return value

Type: Configuration

A cloned Configuration object.

SetAccessibilityValidation method

Syntax

IConfiguration configval = config.SetAccessibilityValidation(value);
config.AccessibilityValidation = configval;
= config.AccessibilityValidation;

Note that this feature is available as both a method and a property.

Parameters

value

Type: AccessibilitySettings

The required accessibility settings. A value of null will disable accessibility checking.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

Remarks

For more information about the Contrast advisor feature see Contrast advisor.

SetAgentId method

Syntax

IConfiguration configval = config.SetAgentId(value);
config.AgentId = configval;
= config.AgentId;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The agent id to be configured.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetApiKey method

Syntax

IConfiguration configval = config.SetApiKey(value);
config.ApiKey = configval;
= config.ApiKey;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

Your API key.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

Remarks

Set this immediately after the Eyes object is created (before calling Open). If you have an environment variable called APPLITOOLS_API_KEY that is set to the value of your API key, then you do not need to call this method, and Eyes will take the string from the environment value.

SetAppName method

Syntax

IConfiguration configval = config.SetAppName(value);
config.AppName = configval;
= config.AppName;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The application name to be configured for the test.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

Remarks

If you call this method, it must be called before the call to Eyes.Open. In the call to Eyes.Open, if you provide the application parameter, then it will override the value set here. If you don't provide the parameter or pass a null, then the value set here will be used.

SetBaselineBranchName method

Syntax

IConfiguration configval = config.SetBaselineBranchName(value);
config.BaselineBranchName = configval;
= config.BaselineBranchName;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The baseline branch name to be configured.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetBaselineEnvName method

Syntax

IConfiguration configval = config.SetBaselineEnvName(value);
config.BaselineEnvName = configval;
= config.BaselineEnvName;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The name of the baseline environment.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetBatch method

Syntax

IConfiguration configval = config.SetBatch(value);
config.Batch = configval;
= config.Batch;

Note that this feature is available as both a method and a property.

Parameters

value

Type: BatchInfo

An object that defines the batch configuration.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetBranchName method

Syntax

IConfiguration configval = config.SetBranchName(value);
config.BranchName = configval;
= config.BranchName;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The branch name to be used by the configuration.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetHostApp method

Syntax

IConfiguration configval = config.SetHostApp(value);
config.HostApp = configval;
= config.HostApp;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The value to be used for the Host App property.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetHostOS method

Syntax

IConfiguration configval = config.SetHostOS(value);
config.HostOS = configval;
= config.HostOS;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The value to be used for the Host OS Property.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetIgnoreCaret method

Syntax

IConfiguration configval = config.SetIgnoreCaret(value);
config.IgnoreCaret = configval;
= config.IgnoreCaret;

Note that this feature is available as both a method and a property.

Parameters

value

Type: bool

If set to true, then Eyes does extra processing to eliminate artifacts introduced by blinking cursors.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetIgnoreDisplacements method

Syntax

IConfiguration configval = config.SetIgnoreDisplacements(value);
config.IgnoreDisplacements = configval;
= config.IgnoreDisplacements;

Note that this feature is available as both a method and a property.

Parameters

value

Type: bool

If a value of true is passed, then mismatches due to displaced content will not be displayed in the Test Manager. Otherwise, they will be displayed.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

Remarks

Ignore displacements is only active when using a Match level of Strict or IgnoreColors

SetMatchLevel method

Syntax

IConfiguration configval = config.SetMatchLevel(value);
config.MatchLevel = configval;
= config.MatchLevel;

Note that this feature is available as both a method and a property.

Parameters

value

Type: MatchLevel

Available match level values are:

For a description of these match levels and the different ways to apply them to tests, checkpoints, and regions, see Eyes match levels.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

Remarks

For a full description of the affect of each match levels and the different ways to apply them to tests, checkpoints and regions, How to use Eyes match levels.

SetMatchTimeout method

Syntax

IConfiguration configval = config.SetMatchTimeout(value);
config.MatchTimeout = configval;
= config.MatchTimeout;

Note that this feature is available as both a method and a property.

Parameters

value

Type: TimeSpan

The timeout to set in seconds.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

Remarks

You can override the default timeout set by this property for a specific set checkpoint by passing a timeout to one of the check_XXXX methods that support a timeout parameter, e.g. CheckWindowYou can also override the timeout for a specific test using the check fluent Timeout method

SetParentBranchName method

Syntax

IConfiguration configval = config.SetParentBranchName(value);
config.ParentBranchName = configval;
= config.ParentBranchName;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The parent branch name to be configured.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetProxy method

Syntax

IConfiguration configval = config.SetProxy(proxy);
config.Proxy = configval;
= config.Proxy;

Note that this feature is available as both a method and a property.

Parameters

proxy

Type: WebProxy

An object that provides the user credentials.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetSaveDiffs method

Syntax

IConfiguration configval = config.SetSaveDiffs(value);
config.SaveDiffs = configval;
= config.SaveDiffs;

Note that this feature is available as both a method and a property.

Parameters

value

Type: bool?

Set to true to configure Save Diffs functionality.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetSaveNewTests method

Syntax

IConfiguration configval = config.SetSaveNewTests(value);
config.SaveNewTests = configval;
= config.SaveNewTests;

Note that this feature is available as both a method and a property.

Parameters

value

Type: bool

If False, the user will need to save the baseline explicitly in the Test Manager for new tests to be saved to the baseline. If True, Eyes will automatically create a baseline for tests with a status of 'new' (the default behavior).

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetServerUrl method

Syntax

IConfiguration configval = config.SetServerUrl(value);
config.ServerUrl = configval;
= config.ServerUrl;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The URL of the Eyes server. Pass a value of null to use the default cloud server.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.

SetTestName method

Syntax

IConfiguration configval = config.SetTestName(value);
config.TestName = configval;
= config.TestName;

Note that this feature is available as both a method and a property.

Parameters

value

Type: string

The test name to be configured for the test.

Return value

Type: IConfiguration

The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.