(self)
| 1354 | ) |
| 1355 | |
| 1356 | def go_back(self): |
| 1357 | self.__check_scope() |
| 1358 | if self.__is_cdp_swap_needed(): |
| 1359 | self.cdp.go_back() |
| 1360 | return |
| 1361 | if getattr(self, "recorder_mode", None): |
| 1362 | self.save_recorded_actions() |
| 1363 | pre_action_url = None |
| 1364 | with suppress(Exception): |
| 1365 | pre_action_url = self.driver.current_url |
| 1366 | self.__last_page_load_url = None |
| 1367 | self.driver.back() |
| 1368 | with suppress(Exception): |
| 1369 | if pre_action_url == self.driver.current_url: |
| 1370 | self.driver.back() # Again because the page was redirected |
| 1371 | if self.recorder_mode: |
| 1372 | time_stamp = self.execute_script("return Date.now();") |
| 1373 | origin = self.get_origin() |
| 1374 | action = ["go_bk", "", origin, time_stamp] |
| 1375 | self.__extra_actions.append(action) |
| 1376 | if self.browser == "safari": |
| 1377 | self.wait_for_ready_state_complete() |
| 1378 | time.sleep(0.02) |
| 1379 | self.driver.refresh() |
| 1380 | time.sleep(0.02) |
| 1381 | self.wait_for_ready_state_complete() |
| 1382 | self.__demo_mode_pause_if_active() |
| 1383 | |
| 1384 | def go_forward(self): |
| 1385 | self.__check_scope() |
nothing calls this directly
no test coverage detected