OPTIONS.md

July 4, 2020 ยท View on GitHub

Plugin options

OptionTypeRequiredDefault valueDescription
outputDirstringfalseregressionWorking directory. Images, report, etc will be saved into this folder
instanceFolderFunctionfalseundefinedCallback to create folder by specific browser. See details below
customMatchersFunction[]false[ ]Add custom matchers to webdriverio
largeImageThresholdnumberfalse1200Skips pixels when the image width or height is larger than this one
allowedMismatchnumberfalse0.1Ignore failed result if mismatch percentage less than allowed

instanceFolder

This option allow to provide custom folder name per each browser. The callback must return folder name as string. For example:

instanceFolder: info => {
  const [ version ] = info.browserVersion.split('.');
  return `${ info.browserName }_${ version }`;
}

The callback's argument contain the following properties:

interface BrowserInfo {
  browserName?: string;
  browserVersion?: string;
  platform?: string;
}