File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -529,18 +529,24 @@ def login(self):
529529
530530 def tear_down_driver (self ):
531531 exception = None
532- try :
533- self .close ()
534- except Exception as e :
535- if "cannot kill Chrome" in str (e ):
536- print (f"Ignoring likely harmless error in Selenium shutdown { e } " )
537- else :
532+ if self .backend_type == "playwright" :
533+ try :
534+ self .quit ()
535+ except Exception as e :
538536 exception = e
537+ else :
538+ try :
539+ self .close ()
540+ except Exception as e :
541+ if "cannot kill Chrome" in str (e ):
542+ print (f"Ignoring likely harmless error in Selenium shutdown { e } " )
543+ else :
544+ exception = e
539545
540- try :
541- self .display .stop ()
542- except Exception as e :
543- exception = e
546+ try :
547+ self .display .stop ()
548+ except Exception as e :
549+ exception = e
544550
545551 if exception is not None :
546552 raise exception
You can’t perform that action at this time.
0 commit comments