diff --git a/pages/base_page.py b/pages/base_page.py index f3aef65..9b38f96 100644 --- a/pages/base_page.py +++ b/pages/base_page.py @@ -113,9 +113,10 @@ def select_combobox_option(self, input_locator, option_text): combo.clear() combo.send_keys(option_text) - # Wait for dropdown option to appear + # Options are often populated by a GraphQL query on page load, so allow + # the same 30s select_sdg_goals already uses for its option list. xpath = f"//div[@role='option' and normalize-space(.)='{option_text}']" - opt = self.wait.until(EC.element_to_be_clickable((By.XPATH, xpath))) + opt = self.wait_with_timeout(30).until(EC.element_to_be_clickable((By.XPATH, xpath))) try: opt.click() diff --git a/pages/provider/my_dashboard_page.py b/pages/provider/my_dashboard_page.py index 6f43a93..c64f9d0 100644 --- a/pages/provider/my_dashboard_page.py +++ b/pages/provider/my_dashboard_page.py @@ -91,7 +91,7 @@ def click_add_new_dataset(self) -> CreateDatasetPage: create_btn.click() # Wait for the metadata tab to confirm we're inside the creation form - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab to appear after creating dataset" ) @@ -128,7 +128,7 @@ def click_add_new_prompt_dataset(self) -> CreateDatasetPage: ) create_btn.click() - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab after creating prompt dataset" ) diff --git a/pages/provider/organizations_page.py b/pages/provider/organizations_page.py index db29f31..e3240b0 100644 --- a/pages/provider/organizations_page.py +++ b/pages/provider/organizations_page.py @@ -102,7 +102,7 @@ def click_add_new_dataset(self): create_btn.click() # Wait for metadata tab - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab to appear after creating dataset" ) @@ -141,7 +141,7 @@ def click_add_new_prompt_dataset(self): ) create_btn.click() - self.wait_with_timeout(10).until( + self.wait_with_timeout(30).until( EC.visibility_of_element_located((By.XPATH, CreateDatasetLocators.TAB_METADATA)), message="Timed out waiting for Metadata tab after creating prompt dataset" )