Skip to content

Commit 348f49e

Browse files
committed
[py] raise exception when creating webdriver.Remote() without options
1 parent f629044 commit 348f49e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

py/selenium/webdriver/remote/webdriver.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ def __init__(
221221
- Custom client configuration to use. Defaults to None.
222222
"""
223223

224-
if isinstance(options, list):
224+
if options is None:
225+
raise TypeError(
226+
"missing 1 required keyword-only argument: 'options' (instance of driver `options.Options` class)"
227+
)
228+
elif isinstance(options, list):
225229
capabilities = create_matches(options)
226230
_ignore_local_proxy = False
227231
else:

0 commit comments

Comments
 (0)