setFeatures method

Class: ConfigurationPlatform: EspressoLanguage: Java SDK:

Use this method to enable various Eyes features.

Syntax


config.setFeatures(Feature.PIXEL_COPY_SCREENSHOT);

Parameters

features
Type:Feature ...
One or more features to set.

Return value

Type: IConfigurationSetter

Remarks

The following values may be passed to this method:
PIXEL_COPY_SCREENSHOT
Enable this feature if you want the SDK to use the Android's PixelCopy method to capture screenshots. Using PixelCopy to capture screenshots can help solve rendering issues such as missing shadow layers. PixelCopy is available from Android API version 26. Example use is:
 /* test suite setup */  
suiteConfig = new Configuration() 
        .setFeatures(Feature.PIXEL_COPY_SCREENSHOT);
/* ... other configurations */ ; 
/*
 * Assign the configuration to all newly created Eyes instances
 */
eyes = new Eyes(runner); 
eyes.setConfiguration(suiteConfig);