We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67f2a9e commit 6a87672Copy full SHA for 6a87672
py/selenium/webdriver/common/bidi/browser.py
@@ -139,9 +139,9 @@ def from_dict(cls, data: dict) -> "ClientWindowInfo":
139
if state not in ClientWindowState.VALID_STATES:
140
raise ValueError(f"Invalid state: {state}. Must be one of {ClientWindowState.VALID_STATES}")
141
142
- width = data.get("width")
143
- if not isinstance(width, int):
144
- raise ValueError("width must be an integer")
+ width = data["width"]
+ if not isinstance(width, int) or width < 0:
+ raise ValueError(f"width must be a non-negative integer, got {width}")
145
146
height = data.get("height")
147
if not isinstance(height, int):
0 commit comments