Skip to content

Commit 9c04377

Browse files
Update py/selenium/webdriver/common/bidi/browser.py
Co-authored-by: Navin Chandra <[email protected]>
1 parent 6a87672 commit 9c04377

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

py/selenium/webdriver/common/bidi/browser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ def from_dict(cls, data: dict) -> "ClientWindowInfo":
143143
if not isinstance(width, int) or width < 0:
144144
raise ValueError(f"width must be a non-negative integer, got {width}")
145145

146-
height = data.get("height")
147-
if not isinstance(height, int):
148-
raise ValueError("height must be an integer")
146+
height = data["height"]
147+
if not isinstance(height, int) or height < 0:
148+
raise ValueError(f"height must be a non-negative integer, got {height}")
149149

150150
x = data.get("x")
151151
if not isinstance(x, int):

0 commit comments

Comments
 (0)