Skip to content

Fix Selenium screenshot cropping issue by retrying with larger height #129

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Archkik
Copy link

@Archkik Archkik commented Apr 9, 2025

In some environments, the hardcoded +90 height buffer used in set_window_size() is insufficient to capture the entire table, resulting in the bottom portion of the image being cut off.

This PR adds a simple retry mechanism:

  • It first takes a screenshot using the standard height buffer;
  • If the captured image height is still smaller than the required table height, it increases the height and retries once.

@PaleNeutron
Copy link
Collaborator

Thanks for contribution, I think it is a nice idea.

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