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

[java] Fix getScreenshotAs: avoid unnecessary conversions #9308

Merged

Conversation

alb-i986
Copy link
Contributor

@alb-i986 alb-i986 commented Mar 19, 2021

Description

I've noticed that the getScreenshotAs methods were not leveraging OutputType#convertFromPngBytes; instead, they were all using OutputType#convertFromBase64Png, even when the raw bytes was what we got from the Server.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@alb-i986 alb-i986 force-pushed the getScreenshotAs-avoid-extra-conversions branch 2 times, most recently from dc46b06 to 9cd4530 Compare March 19, 2021 14:59
@diemol
Copy link
Member

diemol commented Mar 22, 2021

@alb-i986, could you please update your fork? Somehow I cannot do it myself through the GitHub UI

@alb-i986 alb-i986 force-pushed the getScreenshotAs-avoid-extra-conversions branch from 9cd4530 to 3a8a755 Compare March 22, 2021 15:48
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @alb-i986!

@diemol diemol merged commit 5004ca8 into SeleniumHQ:trunk Mar 22, 2021
@alb-i986 alb-i986 deleted the getScreenshotAs-avoid-extra-conversions branch April 3, 2021 16:16
@alb-i986
Copy link
Contributor Author

alb-i986 commented Apr 3, 2021

Thank you @diemol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants