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

Method click_modal

web/regression/feature_utils/pgadmin_page.py:94–117  ·  view source on GitHub ↗
(self, button_text, docker=False)

Source from the content-addressed store, hash-verified

92 pass
93
94 def click_modal(self, button_text, docker=False):
95 time.sleep(0.5)
96 # Find active dialog in case of multiple dialog
97 # & click on that dialog
98
99 # In case of react dialog we use different xpath
100 if docker:
101 modal_button = self.find_by_css_selector(
102 ".dock-fbox button[data-label='{}']".format(button_text))
103 else:
104 modal_button = self.find_by_css_selector(
105 ".MuiDialog-root button[data-label='{}']".format(button_text))
106
107 self.click_element(modal_button)
108
109 # Wait for the dialog backdrop to fade out so subsequent clicks
110 # are not intercepted by the closing modal. MUI v7 leaves the
111 # backdrop in the DOM for ~300ms while the close animation runs.
112 try:
113 WebDriverWait(self.driver, 5).until(
114 EC.invisibility_of_element_located(
115 (By.CSS_SELECTOR, ".MuiDialog-backdrop")))
116 except TimeoutException:
117 pass
118
119 def add_server(self, server_config):
120 server_group_node = \

Callers 14

reset_layoutMethod · 0.95
clear_query_toolMethod · 0.95
remove_serverMethod · 0.95
check_utility_errorMethod · 0.95
close_process_watcherFunction · 0.80
_debug_functionMethod · 0.80
_create_new_fileMethod · 0.80
_check_file_sortingMethod · 0.80
__clear_query_historyMethod · 0.80

Calls 2

find_by_css_selectorMethod · 0.95
click_elementMethod · 0.95

Tested by 10

close_process_watcherFunction · 0.64
_debug_functionMethod · 0.64
_create_new_fileMethod · 0.64
_check_file_sortingMethod · 0.64
__clear_query_historyMethod · 0.64
runTestMethod · 0.64