diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index bb249fb109d7..e231fc765a4a 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -2116,11 +2116,27 @@ def select_set_value(self, container_selector_or_elem, value, multiple=False): else: container_elem = container_selector_or_elem container_elem.click() - text_input = container_elem.find_element(By.CSS_SELECTOR, "input[class='multiselect__input']") - text_input.send_keys(value) - self.send_enter(text_input) - if multiple: - self.send_escape(text_input) + try: + text_input = container_elem.find_element(By.CSS_SELECTOR, "input[class='multiselect__input']") + except Exception: + text_input = None + if text_input: + text_input.send_keys(value) + self.send_enter(text_input) + if multiple: + self.send_escape(text_input) + else: + self.sleep_for(WAIT_TYPES.UX_RENDER) + elems = container_elem.find_elements(By.CSS_SELECTOR, "[role='option'] .multiselect__option span") + discovered_options = [] + found = False + for elem in elems: + elem_value = elem.text + discovered_options.append(elem_value) + if elem_value == value: + elem.click() + found = True + assert found, "Failed to find specified select value [{value}] in browser options [{discovered_options}]" def select2_set_value(self, container_selector_or_elem, value, with_click=True, clear_value=False): # There are two hacky was to select things from the select2 widget - diff --git a/lib/galaxy_test/selenium/test_uploads.py b/lib/galaxy_test/selenium/test_uploads.py index 062756af0cb3..c1f78b506c4a 100644 --- a/lib/galaxy_test/selenium/test_uploads.py +++ b/lib/galaxy_test/selenium/test_uploads.py @@ -221,7 +221,7 @@ def test_rules_example_2_list(self): self.perform_upload(self.get_filename("rules/PRJDA60709.tsv")) self.history_panel_wait_for_hid_ok(1) self.upload_rule_start() - self.upload_rule_set_data_type("Collection") + self.upload_rule_set_data_type("Collections") self.upload_rule_dataset_dialog() self.upload_rule_set_dataset(1) self.screenshot("rules_example_2_1_inputs") @@ -248,7 +248,7 @@ def test_rules_example_3_list_pairs(self): self.perform_upload(self.get_filename("rules/PRJDB3920.tsv")) self.history_panel_wait_for_hid_ok(1) self.upload_rule_start() - self.upload_rule_set_data_type("Collection") + self.upload_rule_set_data_type("Collections") self.upload_rule_dataset_dialog() self.upload_rule_set_dataset(1) self._wait_for_upload_modal() @@ -359,7 +359,7 @@ def test_rules_example_6_nested_lists(self): self.perform_upload(self.get_filename("rules/PRJNA355367.tsv")) self.history_panel_wait_for_hid_ok(1) self.upload_rule_start() - self.upload_rule_set_data_type("Collection") + self.upload_rule_set_data_type("Collections") self.upload_rule_dataset_dialog() self.upload_rule_set_dataset(1) @@ -437,7 +437,7 @@ def test_rules_deferred_list(self): self.perform_upload(self.get_filename("rules/PRJNA355367.tsv")) self.history_panel_wait_for_hid_ok(1) self.upload_rule_start() - self.upload_rule_set_data_type("Collection") + self.upload_rule_set_data_type("Collections") self.upload_rule_dataset_dialog() self.upload_rule_set_dataset(1) @@ -491,7 +491,7 @@ def _setup_uniprot_example(self): self.perform_upload(self.get_filename("rules/uniprot.tsv")) self.history_panel_wait_for_hid_ok(1) self.upload_rule_start() - self.upload_rule_set_data_type("Collection") + self.upload_rule_set_data_type("Collections") self.upload_rule_dataset_dialog() self.upload_rule_set_dataset(1)