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

Limiting screenshots to the visible window #113

Closed
hadiasghari opened this issue Dec 5, 2016 · 1 comment
Closed

Limiting screenshots to the visible window #113

hadiasghari opened this issue Dec 5, 2016 · 1 comment

Comments

@hadiasghari
Copy link
Contributor

The method CommandSequenec.save_screenshot() currently saves a screen shot of the FULL HTML page. This is not always desirable, and a parameter to limit the screenshot to the visible window is welcome.

The following screenshot from YouTube illustrates the point:

gb2_youtube_com

Two reasons for the parameter:

  • For purposes such as identifying cookie-notices, only the visible browser window matters, and the difference in disk-use can be significant.
  • Additionally, the full page rendering can cause Selenium timeouts, with frequent errors: "TaskManager ... Timeout while executing command, SAVE_SCREENSHOT, killing browser manager"
@englehardt
Copy link
Collaborator

Viewport-only screenshots are now the default in Selenium 3, which we moved to in #152. Thus CommandSequence::save_screenshot will only save the visible portion of the current page.

#156 adds a separate command for full page screenshots.

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

No branches or pull requests

2 participants