MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / reset_layout

Method reset_layout

web/regression/feature_utils/pgadmin_page.py:54–81  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 5

click_elementMethod · 0.95
find_by_css_selectorMethod · 0.95
click_modalMethod · 0.95
refreshMethod · 0.80

Tested by

no test coverage detected