diff --git a/dbaccess/qa/uitest/edit_field/tdf75509.py b/dbaccess/qa/uitest/edit_field/tdf75509.py index 3fc1957ff07c..e221f539cb43 100644 --- a/dbaccess/qa/uitest/edit_field/tdf75509.py +++ b/dbaccess/qa/uitest/edit_field/tdf75509.py @@ -23,6 +23,10 @@ class tdf75509(UITestCase): xDbWindow = self.xUITest.getTopFocusWindow() self.xUITest.executeCommand(".uno:DBViewTables") + # The above command is run asynchronously via an event on the main thread so we need to + # wait until it is dispatched before executing the next command + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.waitUntilAllIdlesDispatched() # We just want to select the single table in the list of tables but it seems difficult # to get access to the treeview window for it because there are multiple treeviews in a diff --git a/dbaccess/qa/uitest/query/tdf99619_create_join_undo_redo.py b/dbaccess/qa/uitest/query/tdf99619_create_join_undo_redo.py index eccaf8162c71..5aa55dc7557d 100644 --- a/dbaccess/qa/uitest/query/tdf99619_create_join_undo_redo.py +++ b/dbaccess/qa/uitest/query/tdf99619_create_join_undo_redo.py @@ -24,6 +24,10 @@ class tdf99619(UITestCase): xDbWindow = self.xUITest.getTopFocusWindow() self.xUITest.executeCommand(".uno:DBViewQueries") + # The above command is run asynchronously via an event on the main thread so we need to + # wait until it is dispatched before executing the next command + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.waitUntilAllIdlesDispatched() # We just want to select the single query in the list of queries but it seems difficult # to get access to the treeview window for it because there are multiple treeviews in a