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):
241241
242242 return self .add_request_handler (event , _callback )
243243
244- def _continue_with_auth (self , request , username , password ):
244+ def _continue_with_auth (self , request , username = None , password = None ):
245245 """Continue with authentication.
246246
247247 Parameters:
248248 ----------
249249 request (Request): The request to continue with.
250250 username (str): The username to authenticate with.
251251 password (str): The password to authenticate with.
252+
253+ Notes:
254+ -----
255+ If username or password is None, it attempts auth with no credentials
252256 """
253257
254258 params = {}
255259 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 }
258267
259268 self .conn .execute (self .command_builder ("network.continueWithAuth" , params ))
260269
You can’t perform that action at this time.
0 commit comments