openWithApplicationName method

Class: EyesPlatform: ImagesLanguage: Objective-C SDK:

Call this method to start a test, before calling any of the check methods.

Syntax

Call syntax


 [ eyes openWithApplicationName  : appName testName: testName   ];

 [ eyes openWithApplicationName  : appName testName: testName viewportSize: viewportSize   ];

Declaration

(void)openWithApplicationName:(nullable NSString *)appName testName:(nullable NSString *)testName viewportSize:(CGSize)viewportSize

Parameters

appName
Type:NSString*
The application name. This may be any string. You can set the application name for all tests using the method(s) [Configuration appName]. If you do so, then set this parameter to a value of nil to indicate that the configuration default should be used.
testName
Type:NSString*
The name of the test. This name must be unique within the scope of the application name. It may be any string.
viewportSize
Type:CGSize

The size of the viewport

The size of the viewport passed as an object.

The size of the viewport passed as an object {'width':, 'height':}

Defines the viewport size of the browser that will be set before the start of the test. If this parameter is not provided then the viewport size will be based on the current browser window size. See Using viewports in Eyes for more details.

Return value

Type: void

Remarks

After making a call to this method, you must eventually terminate the test by calling [Eyes close] (in case of a normal completion) or [Eyes abortIfNotClosed] (in case of an aborted test). If you want to run another test, then it is recomended to do this with a newly created Eyes instance to avoid side effects. However, in principle, it is legal to call [Eyes openWithApplicationName] again to start a new test on the same Eyes instance.