@wdio/image-comparison-core
Version:
Image comparison core module for @wdio/visual-service - WebdriverIO visual testing framework
11 lines (10 loc) • 586 B
JavaScript
import checkAppElement from './checkAppElement.js';
import checkWebElement from './checkWebElement.js';
/**
* Compare an image of the element
*/
export default async function checkElement({ browserInstance, instanceData, folders, element, tag, checkElementOptions, isNativeContext, testContext, }) {
return isNativeContext
? checkAppElement({ browserInstance, element, folders, instanceData, checkElementOptions, isNativeContext, tag, testContext })
: checkWebElement({ browserInstance, element, folders, instanceData, checkElementOptions, tag, testContext });
}