Skip to content

Commit

Permalink
fix: Fixed MenuBar XPath for windows for IJ 2024.1
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Kocian <[email protected]>

rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
richardkocian committed May 6, 2024
1 parent 3e037c9 commit 1368767
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ private JButtonFixture mainMenuItem(String label) {
CommonContainerFixture cf;
if (remoteRobot.isLinux()) {
cf = remoteRobot.find(CommonContainerFixture.class, byXpath(XPathDefinitions.LINUX_MAIN_MENU), Duration.ofSeconds(10));
} else if (remoteRobot.isWin() && ideaVersion.toInt() >= 20241) {
cf = remoteRobot.find(CommonContainerFixture.class, byXpath(XPathDefinitions.WINDOWS_MAIN_MENU_2024_1_AND_NEWER), Duration.ofSeconds(10));
} else if (remoteRobot.isWin() && ideaVersion.toInt() >= 20222) {
cf = remoteRobot.find(CommonContainerFixture.class, byXpath(XPathDefinitions.WINDOWS_MAIN_MENU_2022_2_AND_NEWER), Duration.ofSeconds(10));
cf = remoteRobot.find(CommonContainerFixture.class, byXpath(XPathDefinitions.WINDOWS_MAIN_MENU_2022_2_TO_2023_2), Duration.ofSeconds(10));
} else if (remoteRobot.isWin() && ideaVersion.toInt() >= 20203) {
cf = remoteRobot.find(CommonContainerFixture.class, byXpath(XPathDefinitions.WINDOWS_MAIN_MENU_2020_3_TO_2022_1), Duration.ofSeconds(10));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class XPathDefinitions {
public static final String MAVEN_TOOL_WINDOW = "//div[@accessiblename='Maven Tool Window']";
public static final String GRADLE_TOOL_WINDOW = "//div[@accessiblename='Gradle Tool Window']";
public static final String LINUX_MAIN_MENU = "//div[@class='LinuxIdeMenuBar']";
public static final String WINDOWS_MAIN_MENU_2022_2_AND_NEWER = "//div[@class='IdeMenuBar']";
public static final String WINDOWS_MAIN_MENU_2024_1_AND_NEWER = "//div[@class='IdeJMenuBar']";
public static final String WINDOWS_MAIN_MENU_2022_2_TO_2023_2 = "//div[@class='IdeMenuBar']";
public static final String WINDOWS_MAIN_MENU_2020_3_TO_2022_1 = "//div[@class='MenuFrameHeader']";
public static final String WINDOWS_MAIN_MENU_2020_2_AND_OLDER = "//div[@class='CustomHeaderMenuBar']";
public static final String IDE_STATUS_BAR = "//div[@class='IdeStatusBarImpl']";
Expand Down

0 comments on commit 1368767

Please sign in to comment.