(self, exc_type, exc_val, exc_tb)
| 49 | return self.driver |
| 50 | |
| 51 | def __exit__(self, exc_type, exc_val, exc_tb): |
| 52 | try: |
| 53 | if ( |
| 54 | hasattr(self, "driver") |
| 55 | and hasattr(self.driver, "quit") |
| 56 | and ( |
| 57 | "win32" not in sys.platform |
| 58 | or self.driver.service.process |
| 59 | ) |
| 60 | ): |
| 61 | self.driver.quit() |
| 62 | except Exception: |
| 63 | pass |
| 64 | return False |
| 65 | |
| 66 | |
| 67 | def Driver( |