MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / DriverContext

Class DriverContext

seleniumbase/plugins/driver_manager.py:44–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44class DriverContext():
45 def __init__(self, *args, **kwargs):
46 self.driver = Driver(*args, **kwargs)
47
48 def __enter__(self):
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
67def Driver(

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…