JetBrains / intellij-ui-test-robot

The library allows you to write and execute UI tests among IntelliJ IDEA. You can test your Plugin.

Home Page:https://jetbrains-platform.slack.com/archives/C026SVA9MMM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to find 'JPopupMenuFixture' when used for 'Project SDK' dropdown menu

zcervink opened this issue · comments

  • the WaitForConditionTimeoutException is thrown when the RR framework fails to find 'JPopupMenuFixture'
  • this exception appear only sometime (on macOS Catalina 10.15 and on macOS Big Sur 11 - in both cases on github actions) other platforms are ok

This code causes sometimes WaitForConditionTimeoutException:
JPopupMenuFixture projectSdkList = find(JPopupMenuFixture.class, JPopupMenuFixture.Companion.byType(), Duration.ofSeconds(10));

This code works without issue:
ComponentFixture projectSdkList = find(ComponentFixture.class, byXpath("//div[@class='HeavyWeightWindow']"), Duration.ofSeconds(10));

130352872-50b5fa7e-b6e3-45da-8e4f-d6b07faa2f95

Hello @zcervink,
HeavyWeightWindowFixture was added in latest version (you can find it in remote-fixtures)

@zcervink, did you try to use HeavyWeightWindowFixture instead of JPopupMenuFixture
Does it fix your problem?

EDIT:

I got it to work by making the test sleeps for ~5s.


Hi,

In my case I was able to get a reference to the HeavyWeightWindowFixture, however I can't get the content of the selected items. In the particular case of JDK, we might have to wait a bit, I'll try tomorrow.

Version 0.11.7

@mkfl3x The usage of HeavyWeightWindowFixture did resolve my issue and I am using that now in my UI tests. And @bric3 has a point - that issue appears because IDEA is still searching for more SDKs and just wait resolves the issue. Additionally to that there is issue #83 describing usage of HeavyWeightWindowFixture and the IdeaSideException that appears after clicking on it. The same thing - just waiting until the search is complete resolves the issue.