From 4cd4aabace5740f55700b6bd9413daaa118c2910 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 27 Apr 2024 14:22:24 -0400 Subject: [PATCH] Potential selenium fix. --- lib/galaxy/selenium/navigates_galaxy.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index de765d0375fe..fc4d4caae9fa 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -153,6 +153,11 @@ def _retry(*args, **kwds): return _retry +def retry_index_during_transitions(e): + exception_check = exception_seems_to_indicate_transition(e) or isinstance(e, IndexError) + return partial(retry_during_transitions, exception_check=exception_check) + + def edit_details(f, scope=".history-index"): """Open the editor, run the edits, hit the save button""" @@ -1421,7 +1426,11 @@ def workflow_card_elements(self): return self.components.workflows.workflow_card.all() def workflow_card_element(self, workflow_index=0): - return self.workflow_card_elements()[workflow_index] + @retry_index_during_transitions + def fetch(): + return self.workflow_card_elements()[workflow_index] + + return fetch() @retry_during_transitions def workflow_index_column_text(self, column_index, workflow_index=0):