OLD | NEW |
1 #!/usr/bin/python | |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 3 # found in the LICENSE file. |
5 | 4 |
6 """Factory that creates ChromeDriver instances for pyauto.""" | 5 """Factory that creates ChromeDriver instances for pyauto.""" |
7 | 6 |
8 import os | 7 import os |
9 import random | 8 import random |
10 import tempfile | 9 import tempfile |
11 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 self._chromedriver_server.start() | 52 self._chromedriver_server.start() |
54 | 53 |
55 def Stop(self): | 54 def Stop(self): |
56 """Stops the ChromeDriver server, if running.""" | 55 """Stops the ChromeDriver server, if running.""" |
57 if self._chromedriver_server is not None: | 56 if self._chromedriver_server is not None: |
58 self._chromedriver_server.stop() | 57 self._chromedriver_server.stop() |
59 self._chromedriver_server = None | 58 self._chromedriver_server = None |
60 | 59 |
61 def __del__(self): | 60 def __del__(self): |
62 self.Stop() | 61 self.Stop() |
63 | |
OLD | NEW |