Bug 245219 - WebDriver throws blank WebDriverException when saving screenshot over 8192 pixels tall or wide in Selenium for Python
Summary: WebDriver throws blank WebDriverException when saving screenshot over 8192 pi...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: Other
Hardware: Mac (Apple Silicon) Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-15 07:09 PDT by Kieran
Modified: 2023-04-11 17:06 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kieran 2022-09-15 07:09:58 PDT
macOS 12.6
Safari 16.0

Overview
WebDriver throws an WebDriverException with empty message for images with width or height exceeding 8192pixels in width or height.


Steps to Reproduce:

1) Install Selenium for Python
python pip3 install selenium

2) Initialise an instance of Safari WebDriver in Python like so...
from selenium import webdriver
driver = webdriver.Safari()
driver.get("http://google.co.uk")

driver.set_window_size(734,8192)
driver.get_screenshot_as_base64() # This should succeed.

driver.set(window_size(734,8193)
driver.get_screenshot_as_base46() # This should throw the above error.


Actual Result
selenium.common.exceptions.WebDriverException: Message: 


Expected result
A successful screenshot of the full view.

Hardware:
Occurs consistently on M1 Macbook Pro
Comment 1 Radar WebKit Bug Importer 2022-09-16 11:03:28 PDT
<rdar://problem/100034479>
Comment 2 Brent Fulgham 2023-04-11 17:06:43 PDT
The cause of this bug is outside of WebKit code, so resolving as MOVED.

The fix was tracked under <rdar://99894810>, and shipped in iOS 16.4.1 and macOS 13.3.1.