CI: Hide scrollbars from screenshots Copy technique from wdio-screenshot as mentioned by #722
diff --git a/script/screenshots.js b/script/screenshots.js index 9460479..75a2017 100644 --- a/script/screenshots.js +++ b/script/screenshots.js
@@ -95,8 +95,10 @@ return browserDriver.get(url) .then(willLog(sessionName, 'get')) .safeExecute('document.body.focus()') // blur anything that's auto-focused + .then(willLog(sessionName, 'document.body.focus()')) + .safeExecute('document.documentElement.style.overflow = "hidden"') // hide scrollbars + .then(willLog(sessionName, 'hide scrollbars')) .then(function() { - console.log(sessionName, 'document.body.focus()'); return [browserDriver.safeExecute('document.documentElement.scrollHeight'), browserDriver.safeExecute('document.documentElement.clientHeight')]; })