Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take advantage of built in support for full page screenshots #622

Open
nextlevelbeard opened this issue Nov 14, 2024 · 2 comments
Open

Take advantage of built in support for full page screenshots #622

nextlevelbeard opened this issue Nov 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@nextlevelbeard
Copy link
Member

nextlevelbeard commented Nov 14, 2024

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 #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-console

Then execute it with the executor function in getFullPageScreenshotsDataDesktop:

export async function getFullPageScreenshotsDataDesktop(

Describe alternatives you've considered

We could also call the webdriverIO API: browser.fullPageScreenshot(), if the browser is available to us.
https://webdriver.io/docs/api/gecko/#fullpagescreenshot

@christian-bromann
Copy link
Member

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.

@wswebcreation
Copy link
Member

Thanks for your FR @nextlevelbeard , I've investigated the Firefox one in the past and wasn't fully reliable. But I can do a research again

@christian-bromann That would be great! Adding a flag for fullpage might be very useful

@wswebcreation wswebcreation added the enhancement New feature or request label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants