diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestUtil.java b/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestUtil.java index 1010a3726903..c022a6709715 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestUtil.java +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/framework/GuiTestUtil.java @@ -548,7 +548,8 @@ GuiTestUtil { // First find the JBList which holds the popup. There could be other JBLists in the hierarchy, // so limit it to one that is actually used as a popup, as identified by its model being a ListPopupModel: assertNotNull(root); - JBList list = robot.finder().find(root, new GenericTypeMatcher(JBList.class) { + + JBList list = waitUntilFound(robot, new GenericTypeMatcher(JBList.class) { @Override protected boolean isMatching(@NotNull JBList list) { ListModel model = list.getModel(); @@ -556,6 +557,7 @@ GuiTestUtil { } }); + // We can't use the normal JListFixture method to click by label since the ListModel items are // ActionItems whose toString does not reflect the text, so search through the model items instead: ListPopupModel model = (ListPopupModel)list.getModel();