Skip to main content

Configuration class

This class is used to create a configuration object that is used to configure an Eyes object by assigning it to the [Eyes configuration] property.

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.

Import statement

@import EyesXCUI

init method

Syntax

Configuration* config = [Configuration new];

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

Call syntax

AccessibilitySettings* configval; // give relevant initial value
config.accessibilityValidation = configval
configval = config.accessibilityValidation

Declaration

 (strong, nonatomic, nullable) AccessibilitySettings *accessibilityValidation

Type: AccessibilitySettings*

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

Remarks

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

agentId property

Call syntax

NSString* configval; // give relevant initial value
config.agentId = configval
configval = config.agentId

Declaration

 (copy, nonatomic) NSString *agentId

Type: NSString*

The agent id to be configured.

apiKey property

Call syntax

NSString* configval; // give relevant initial value
config.apiKey = configval
configval = config.apiKey

Declaration

 (copy, nonatomic) NSString *apiKey

Type: NSString

Your API key.

Remarks

Set this immediately after the Eyes object is created (before calling openWithApplicationName). 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

Call syntax

NSString* configval; // give relevant initial value
config.appName = configval
configval = config.appName

Declaration

 (copy, nonatomic) NSString *appName

Type: NSString

The application name to be configured for the test.

Remarks

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

baselineBranchName property

Call syntax

NSString* configval; // give relevant initial value
config.baselineBranchName = configval
configval = config.baselineBranchName

Declaration

 (copy, nonatomic) NSString *baselineBranchName

Type: NSString

The baseline branch name to be configured.

baselineEnvName property

Call syntax

NSString* configval; // give relevant initial value
config.baselineEnvName = configval
configval = config.baselineEnvName

Declaration

 (copy, nonatomic, nullable) NSString *baselineEnvName

Type: NSString

The name of the baseline environment.

batch property

Call syntax

BatchInfo* configval; // give relevant initial value
config.batch = configval
configval = config.batch

Declaration

 (strong, nonatomic) BatchInfo *batch

Type: BatchInfo*

An object that defines the batch configuration.

branchName property

Call syntax

NSString* configval; // give relevant initial value
config.branchName = configval
configval = config.branchName

Declaration

 (copy, nonatomic) NSString *branchName

Type: NSString

The branch name to be used by the configuration.

features property

Call syntax

NSArray<Feature *>* configval; // give relevant initial value
config.features = configval
configval = config.features

Declaration

 (copy, nonatomic) NSArray<Feature *> *features

Type: NSArray<Feature *>*

One or more features to set.

forceFullPageScreenshot property

Call syntax

BOOL configval; // give relevant initial value
config.forceFullPageScreenshot = configval
configval = config.forceFullPageScreenshot

Declaration

 (assign, nonatomic) BOOL forceFullPageScreenshot

Type: BOOL

If True, Eyes will do scrolling and stitching if necessary. If False, the result is browser dependent.

hostApp property

Call syntax

NSString* configval; // give relevant initial value
config.hostApp = configval
configval = config.hostApp

Declaration

 (copy, nonatomic) NSString *hostApp

Type: NSString

The value to be used for the Host App property.

hostOS property

Call syntax

NSString* configval; // give relevant initial value
config.hostOS = configval
configval = config.hostOS

Declaration

 (copy, nonatomic) NSString *hostOS

Type: NSString

The value to be used for the Host OS Property.

ignoreCaret property

Call syntax

BOOL configval; // give relevant initial value
config.ignoreCaret = configval
configval = config.ignoreCaret

Declaration

 (assign, nonatomic) BOOL ignoreCaret

Type: BOOL

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

ignoreDisplacements property

Call syntax

BOOL configval; // give relevant initial value
config.ignoreDisplacements = configval
configval = config.ignoreDisplacements

Declaration

 (assign, nonatomic) BOOL ignoreDisplacements

Type: BOOL

If true, mismatches due to displaced content will not be displayed in the Test Manager. Otherwise, they will be displayed.

Remarks

Ignore displacements is only active when using a Match level of MatchLevelStrict or MatchLevelContent

matchLevel property

Call syntax

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

Declaration

 (assign, nonatomic) MatchLevel matchLevel

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.

matchTimeout property

Call syntax

NSInteger configval; // give relevant initial value
config.matchTimeout = configval
configval = config.matchTimeout

Declaration

 (assign, nonatomic) NSInteger matchTimeout

Type: NSInteger

The timeout to set in milliseconds.

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. checkWindowWithTagYou can also override the timeout for a specific test using the check fluent timeoutInSeconds method

parentBranchName property

Call syntax

NSString* configval; // give relevant initial value
config.parentBranchName = configval
configval = config.parentBranchName

Declaration

 (copy, nonatomic) NSString *parentBranchName

Type: NSString*

The parent branch name to be configured.

proxy property

Call syntax

AbstractProxySettings* configval; // give relevant initial value
config.proxy = configval
configval = config.proxy

Declaration

 (strong, nonatomic) AbstractProxySettings *proxy

Type: AbstractProxySettings*

An object created from the AbstractProxySettings class that contains the user name, password, URI and port.

saveDiffs property

Call syntax

BOOL configval; // give relevant initial value
config.saveDiffs = configval
configval = config.saveDiffs

Declaration

 (assign, nonatomic) BOOL saveDiffs

Type: BOOL

Set to true to configure Save Diffs functionality.

saveNewTests property

Call syntax

BOOL configval; // give relevant initial value
config.saveNewTests = configval
configval = config.saveNewTests

Declaration

 (assign, nonatomic) BOOL saveNewTests

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).

serverUrl property

Call syntax

NSString* configval; // give relevant initial value
config.serverUrl = configval
configval = config.serverUrl

Declaration

 (copy, nonatomic) NSString *serverUrl

Type: NSString

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

statusBarExists property

Call syntax

BOOL configval; // give relevant initial value
config.statusBarExists = configval
configval = config.statusBarExists

Declaration

 (assign, nonatomic) BOOL statusBarExists API_AVAILABLE(ios(13))

Type: BOOL

Set to true if there is a status bar on the screen.

stitchOverlap property

Call syntax

NSInteger configval; // give relevant initial value
config.stitchOverlap = configval
configval = config.stitchOverlap

Declaration

 (assign, nonatomic) NSInteger stitchOverlap

Type: NSInteger

The width of the stitch overlap in pixels.

testName property

Call syntax

NSString* configval; // give relevant initial value
config.testName = configval
configval = config.testName

Declaration

 (copy, nonatomic) NSString *testName

Type: NSString

The test name to be configured for the test.

viewportSize property

Call syntax

CGSize configval; // give relevant initial value
config.viewportSize = configval
configval = config.viewportSize

Declaration

 (assign, nonatomic) CGSize viewportSize

Type: CGSize

An object that defines the width and height of the test browser viewport in pixels.