(self)
| 52 | self.wait_for_spinner_to_disappear() |
| 53 | |
| 54 | def reset_layout(self): |
| 55 | attempt = 0 |
| 56 | while attempt < 4: |
| 57 | try: |
| 58 | self.click_element(self.find_by_css_selector( |
| 59 | "button[data-label='File']")) |
| 60 | break |
| 61 | except (TimeoutException, NoSuchWindowException): |
| 62 | self.driver.refresh() |
| 63 | try: |
| 64 | WebDriverWait(self.driver, 3).until(EC.alert_is_present()) |
| 65 | self.driver.switch_to.alert.accept() |
| 66 | attempt = attempt + 1 |
| 67 | except TimeoutException: |
| 68 | attempt = attempt + 1 |
| 69 | |
| 70 | self.click_element(self.find_by_css_selector( |
| 71 | "li[data-label='Reset Layout']")) |
| 72 | self.click_modal('Yes', docker=True) |
| 73 | confirmation_alert = True |
| 74 | try: |
| 75 | WebDriverWait(self.driver, 1).until(EC.alert_is_present()) |
| 76 | except TimeoutException: |
| 77 | confirmation_alert = False |
| 78 | |
| 79 | if confirmation_alert: |
| 80 | self.driver.switch_to.alert.accept() |
| 81 | self.wait_for_reloading_indicator_to_disappear() |
| 82 | |
| 83 | def refresh_page(self): |
| 84 | try: |
nothing calls this directly
no test coverage detected