@wdio/image-comparison-core
Version:
Image comparison core module for @wdio/visual-service - WebdriverIO visual testing framework
16 lines (15 loc) • 390 B
JavaScript
/**
* Hide the scrollbars
*
* There is a `try/catch` for this issue
* https://github.com/wswebcreation/webdriver-image-comparison/issues/30
* Some browsers don't wrap XML into a body element, so this will fail
*/
export default function hideScrollBars(hide) {
try {
document.body.style.overflow = hide ? 'hidden' : '';
}
catch (_e) {
// Do nothing
}
}