-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[py] Add support for full page screenshots in Chrome and Edge #16727
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
User description
🔗 Related Issues
Similar to #16725 for Ruby
Python implementation of #14116
💥 What does this PR do?
This PR adds support for full page screenshots for Chrome and Edge via
session/:session_id/screenshot/fullendpoint (like Firefox already has).🔧 Implementation Notes
I just copied the Firefox methods into the Chromium WebDriver class and added tests.
💡 Additional Considerations
I haven't even tried functionality or ran the tests yet, but let's see if CI passes.
🔄 Types of changes
PR Type
Enhancement
Description
Add full page screenshot methods to Chromium WebDriver
Implement four screenshot methods with different output formats
Add comprehensive tests for Chrome and Edge browsers
Methods support base64, PNG binary, and file output formats
Diagram Walkthrough
File Walkthrough
webdriver.py
Add four full page screenshot methods to Chromiumpy/selenium/webdriver/chromium/webdriver.py
base64andwarningsmodulesget_full_page_screenshot_as_base64()method to retrieve fullpage screenshot as base64-encoded string
get_full_page_screenshot_as_png()method to decode base64 tobinary PNG data
get_full_page_screenshot_as_file()method to save screenshotto file with validation
save_full_page_screenshot()as alias method for file savingwebdriver.py
Minor formatting adjustmentpy/selenium/webdriver/firefox/webdriver.py
chrome_takes_full_page_screenshots_tests.py
Add Chrome full page screenshot testspy/test/selenium/webdriver/chrome/chrome_takes_full_page_screenshots_tests.py
get_full_page_screenshot_as_base64()methodget_full_page_screenshot_as_png()methodedge_takes_full_page_screenshots_tests.py
Add Edge full page screenshot testspy/test/selenium/webdriver/edge/edge_takes_full_page_screenshots_tests.py
get_full_page_screenshot_as_base64()methodget_full_page_screenshot_as_png()method