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 11e8805 commit 67f2a9eCopy full SHA for 67f2a9e
py/selenium/webdriver/common/bidi/browser.py
@@ -133,9 +133,11 @@ def from_dict(cls, data: dict) -> "ClientWindowInfo":
133
if not isinstance(client_window, str):
134
raise ValueError("clientWindow must be a string")
135
136
- state = data.get("state")
+ state = data["state"]
137
if not isinstance(state, str):
138
raise ValueError("state must be a string")
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):
0 commit comments