Is your feature request related to a problem? Please describe.
Often, the full page screenshots are unreliable and contain ghosting of elements due to scrolling effects.
For example: see https://github.com/webdriverio/visual-testing/issues/125
Describe the solution you'd like
Multiple browsers have built in support for this that deliver a clean and ghost free image.
We should update the saveScreenshot command in WebdriverIO core to use WebDriver Bidi primitives for taking screenshots. They provide full flexibility including full page screenshots.
Is your feature request related to a problem? Please describe. Often, the full page screenshots are unreliable and contain ghosting of elements due to scrolling effects. For example: see https://github.com/webdriverio/visual-testing/issues/125
Describe the solution you'd like Multiple browsers have built in support for this that deliver a clean and ghost free image.
For Firefox, we can create a client side script that calls the
:screenshot
command. See docs here: https://firefox-source-docs.mozilla.org/devtools-user/taking_screenshots/index.html#taking-screenshots-with-the-web-consoleThen execute it with the executor function in
getFullPageScreenshotsDataDesktop
: https://github.com/webdriverio/visual-testing/blob/b40be9ddd0b8a370ac50c1e49cd6006a5225ca41/packages/webdriver-image-comparison/src/methods/screenshots.ts#L352Describe alternatives you've considered
We could also call the webdriverIO API:
browser.fullPageScreenshot()
, if thebrowser
is available to us. https://webdriver.io/docs/api/gecko/#fullpagescreenshot