File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
py/selenium/webdriver/common/bidi Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -241,20 +241,29 @@ def _callback(request):
241
241
242
242
return self .add_request_handler (event , _callback )
243
243
244
- def _continue_with_auth (self , request , username , password ):
244
+ def _continue_with_auth (self , request , username = None , password = None ):
245
245
"""Continue with authentication.
246
246
247
247
Parameters:
248
248
----------
249
249
request (Request): The request to continue with.
250
250
username (str): The username to authenticate with.
251
251
password (str): The password to authenticate with.
252
+
253
+ Notes:
254
+ -----
255
+ If username or password is None, it attempts auth with no credentials
252
256
"""
253
257
254
258
params = {}
255
259
params ["request" ] = request .request_id
256
- params ["action" ] = "provideCredentials"
257
- params ["credentials" ] = {"type" : "password" , "username" : username , "password" : password }
260
+
261
+ if not username or not password :
262
+ params ["action" ] = "default"
263
+
264
+ else :
265
+ params ["action" ] = "provideCredentials"
266
+ params ["credentials" ] = {"type" : "password" , "username" : username , "password" : password }
258
267
259
268
self .conn .execute (self .command_builder ("network.continueWithAuth" , params ))
260
269
You can’t perform that action at this time.
0 commit comments