Make sure we have a fresh window (without restarting the browser).
(self)
| 32 | super().get("file://" + filepath) |
| 33 | |
| 34 | def clean_window(self): |
| 35 | """Make sure we have a fresh window (without restarting the browser).""" |
| 36 | # open new tab |
| 37 | self.execute_script("window.open();") |
| 38 | # close old tab |
| 39 | self.close() |
| 40 | # switch to new tab |
| 41 | self.switch_to.window(self.window_handles[0]) |
| 42 | |
| 43 | def verify_js_logs(self): |
| 44 | """Raise an error if there are errors in the browser JS console.""" |