From 008ad0a102a314edffde2264cfd799150b2965b5 Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:06:49 +0530 Subject: [PATCH 1/7] Implemented an approach to capture log from LSP console --- .github/workflows/build.yaml | 37 +----- .../it/SingleModJakartaLSTestCommon.java | 8 +- .../tools/intellij/it/UIBotTestUtils.java | 105 ++++++++++++++++++ .../it/fixtures/ProjectFrameFixture.java | 7 ++ 4 files changed, 122 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e0377539a..d241e30a8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -98,13 +98,10 @@ jobs: fail-fast: false matrix: runtime: [ linux, mac, windows ] - test-group: [ LSP4Jakarta-Unit, Maven-MicroProfile, Gradle-MicroProfile, Maven-Custom-Liberty-Install, Gradle-Custom-Liberty-Install, Maven-MP-Config, Gradle-MP-Config, Maven-MP-SID, Gradle-MP-SID, Maven-NLT-REST, Gradle-NLT-REST, Gradle-Language-Server, Gradle-MP-Language-Server, Gradle-Jakarta-Language-Server, Maven-Multi-Module-MP ] - exclude: - # Exclude LSP4Jakarta-Unit from mac and windows - only run on linux - - runtime: mac - test-group: LSP4Jakarta-Unit - - runtime: windows - test-group: LSP4Jakarta-Unit + test-group: [ Gradle-MP-Language-Server, Gradle-Jakarta-Language-Server ] + repeat: [ 1,2,3,4,5,6,7,8,9,10, + 11,12,13,14,15,16,17,18,19,20, + 21,22,23,24,25,26,27,28,29,30 ] include: - runtime: linux os: ubuntu-latest @@ -112,36 +109,10 @@ jobs: os: macOS-14 - runtime: windows os: windows-latest - - test-group: Maven-MicroProfile - test-class: io.openliberty.tools.intellij.it.MavenSingleModMPProjectTest - - test-group: Gradle-MicroProfile - test-class: io.openliberty.tools.intellij.it.GradleSingleModMPProjectTest - - test-group: Maven-Custom-Liberty-Install - test-class: io.openliberty.tools.intellij.it.MavenSingleModCustomWLPInstallProjectTest - - test-group: Gradle-Custom-Liberty-Install - test-class: io.openliberty.tools.intellij.it.GradleSingleModCustomWLPInstallProjectTest - - test-group: Maven-MP-Config - test-class: io.openliberty.tools.intellij.it.MavenSingleModMPCfgProjectTest - - test-group: Gradle-MP-Config - test-class: io.openliberty.tools.intellij.it.GradleSingleModMPCfgProjectTest - - test-group: Maven-MP-SID - test-class: io.openliberty.tools.intellij.it.MavenSingleModMPSIDProjectTest - - test-group: Gradle-MP-SID - test-class: io.openliberty.tools.intellij.it.GradleSingleModMPSIDProjectTest - - test-group: Maven-NLT-REST - test-class: io.openliberty.tools.intellij.it.MavenSingleModNLTRestProjectTest - - test-group: Gradle-NLT-REST - test-class: io.openliberty.tools.intellij.it.GradleSingleModNLTRestProjectTest - - test-group: Gradle-Language-Server - test-class: io.openliberty.tools.intellij.it.GradleSingleModLSTest - test-group: Gradle-MP-Language-Server test-class: io.openliberty.tools.intellij.it.GradleSingleModMPLSTest - test-group: Gradle-Jakarta-Language-Server test-class: io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest - - test-group: Maven-Multi-Module-MP - test-class: io.openliberty.tools.intellij.it.MavenMPMultipleProjectTest - - test-group: LSP4Jakarta-Unit - test-class: "io.openliberty.tools.intellij.lsp4jakarta.it.*" env: USE_LOCAL_PLUGIN: ${{ inputs.useLocalPlugin || false }} REF_LSP4IJ: ${{ needs.fetch_merge_commit_sha_from_lsp4ij_PR.outputs.pr_details }} diff --git a/src/test/java/io/openliberty/tools/intellij/it/SingleModJakartaLSTestCommon.java b/src/test/java/io/openliberty/tools/intellij/it/SingleModJakartaLSTestCommon.java index 69886aad2..2c509e5e0 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/SingleModJakartaLSTestCommon.java +++ b/src/test/java/io/openliberty/tools/intellij/it/SingleModJakartaLSTestCommon.java @@ -149,13 +149,16 @@ public void testJakartaDiagnosticsInJavaPart() { /** * Tests Jakarta Language Server quick fix support in a Java source file */ -// @Test -// @Video + @Test + @Video public void testJakartaQuickFixInJavaPart() { String publicString = "public Response getProperties() {"; String privateString = "private Response getProperties() {"; String flaggedString = "getProperties"; + UIBotTestUtils.clickOnWindowPaneStripeButton(remoteRobot, "Language Servers"); + UIBotTestUtils.enableDebugTraceInLS(remoteRobot); + Path pathToSrc = Paths.get(projectsPath, projectName, "src", "main", "java", "io", "openliberty", "mp", "sample", "system", "SystemResource2.java"); String quickfixChooserString = "Make method public"; @@ -183,6 +186,7 @@ public void testJakartaQuickFixInJavaPart() { finally { // Replace modified content with the original content UIBotTestUtils.pasteOnActiveWindow(remoteRobot); + UIBotTestUtils.captureLSPConsoleLog(remoteRobot); } } diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index 472828335..c6df21cf2 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -26,13 +26,18 @@ import java.awt.*; import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.event.KeyEvent; import java.io.BufferedReader; import java.io.FileWriter; +import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.time.Duration; import java.util.HashMap; import java.util.List; @@ -2939,4 +2944,104 @@ public static void clickOnLoad(RemoteRobot remoteRobot) { TestUtils.sleepAndIgnoreException(5); } + + /** + * Enable the trace level to verbose in LSP console + * + * @param remoteRobot Instance of the RemoteRobot to interact with the IntelliJ UI. + */ + public static void enableDebugTraceInLS(RemoteRobot remoteRobot) { + ComponentFixture node = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); + + List rts = node.findAllText(); + for (RemoteText rt : rts) { + if (rt.getText().contains("Jakarta EE")) + rt.click(); + } + + ComponentFixture node1 = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); + List rts1 = node1.findAllText(); + for (RemoteText rt : rts1) { + if (rt.getText().contains("Debug")) + rt.click(); + } + + ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofMinutes(2)); + List comboBoxes = projectFrame.getComboBoxButton(); + ComboBoxFixture comboBox = comboBoxes.get(1); + comboBox.selectItem("verbose"); + + String xPath = "//div[starts-with(@accessiblename, 'Apply') and @class='ActionButton']"; + ComponentFixture actionButton = projectFrame.getActionButton(xPath, "10"); + actionButton.click(); + + ComponentFixture node3 = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); + List rts3 = node3.findAllText(); + for (RemoteText rt : rts3) { + if (rt.getText().contains("started pid")) { + rt.click(); + break; + } + } + } + + /** + * Access editor content in LSP console + * + * @param remoteRobot Instance of the RemoteRobot to interact with the IntelliJ UI. + */ + public static void captureLSPConsoleLog(RemoteRobot remoteRobot) { + Locator locator = byXpath("//div[@class='EditorComponentImpl' and @accessiblename='Editor' ]"); + EditorFixture editorNew = remoteRobot.find(EditorFixture.class, locator, Duration.ofSeconds(20)); + editorNew.click(); + + copyEditorContent(remoteRobot); + } + + /** + * Copies the entire content of the LSP console, + * writes it to a log file, and then triggers the “Hide” action button in the UI. + * + * @param remoteRobot Instance of the RemoteRobot to interact with the IntelliJ UI. + */ + public static void copyEditorContent(RemoteRobot remoteRobot) { + Keyboard keyboard = new Keyboard(remoteRobot); + keyboard.hotKey(remoteRobot.isMac() ? KeyEvent.VK_META : KeyEvent.VK_CONTROL, KeyEvent.VK_A); + keyboard.hotKey(remoteRobot.isMac() ? KeyEvent.VK_META : KeyEvent.VK_CONTROL, KeyEvent.VK_C); + + String copiedText = getClipboardText(); + Path logPath = Path.of("build/reports/problems/lsp4ij-logs.log"); + try { + Files.createDirectories(logPath.getParent()); + + Files.writeString( + logPath, + copiedText + System.lineSeparator(), + StandardOpenOption.CREATE, + StandardOpenOption.TRUNCATE_EXISTING + ); + } catch (IOException e) { + throw new RuntimeException(e); + } + + ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofMinutes(2)); + String xPath = "//div[starts-with(@accessiblename, 'Hide') and @class='ActionButton']"; + ComponentFixture actionButton = projectFrame.getActionButton(xPath, "10"); + actionButton.click(); + } + + /** + * Retrieves the current text content from the system clipboard. + */ + private static String getClipboardText() { + try { + TestUtils.sleepAndIgnoreException(1); + return (String) Toolkit.getDefaultToolkit() + .getSystemClipboard() + .getData(DataFlavor.stringFlavor); + } catch (UnsupportedFlavorException | IOException e) { + throw new RuntimeException("Failed to read from clipboard", e); + } + } + } diff --git a/src/test/java/io/openliberty/tools/intellij/it/fixtures/ProjectFrameFixture.java b/src/test/java/io/openliberty/tools/intellij/it/fixtures/ProjectFrameFixture.java index 25a7de186..967a4b4d4 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/fixtures/ProjectFrameFixture.java +++ b/src/test/java/io/openliberty/tools/intellij/it/fixtures/ProjectFrameFixture.java @@ -446,4 +446,11 @@ public void clickOnMainMenuWithActions(RemoteRobot remoteRobot, String... action throw new IllegalStateException("Failed to perform the menu actions after multiple attempts."); } } + + /** + * Method to get list of comboBoxes + */ + public List getComboBoxButton() { + return comboBoxes(byXpath("//div[@class='ComboBox']")); + } } From 56c22d6b7f0bf72a47cac527e549da953270e1f8 Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Tue, 2 Dec 2025 14:23:45 +0530 Subject: [PATCH 2/7] Changed the keyword to capture Jakarta log --- .../java/io/openliberty/tools/intellij/it/UIBotTestUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index c6df21cf2..e38a37dce 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -2978,7 +2978,7 @@ public static void enableDebugTraceInLS(RemoteRobot remoteRobot) { ComponentFixture node3 = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); List rts3 = node3.findAllText(); for (RemoteText rt : rts3) { - if (rt.getText().contains("started pid")) { + if (rt.getText().contains("start")) { rt.click(); break; } From 7cd5384404602f566feac4233167bc1fd788ca1f Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:06:51 +0530 Subject: [PATCH 3/7] Modification to capture LSP console log from all the cases --- .github/workflows/build.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d241e30a8..b94d1a2da 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -98,10 +98,7 @@ jobs: fail-fast: false matrix: runtime: [ linux, mac, windows ] - test-group: [ Gradle-MP-Language-Server, Gradle-Jakarta-Language-Server ] - repeat: [ 1,2,3,4,5,6,7,8,9,10, - 11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30 ] + test-group: [ Gradle-Jakarta-Language-Server ] include: - runtime: linux os: ubuntu-latest @@ -109,8 +106,6 @@ jobs: os: macOS-14 - runtime: windows os: windows-latest - - test-group: Gradle-MP-Language-Server - test-class: io.openliberty.tools.intellij.it.GradleSingleModMPLSTest - test-group: Gradle-Jakarta-Language-Server test-class: io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest env: @@ -173,7 +168,7 @@ jobs: working-directory: ./liberty-tools-intellij run: bash ./src/test/resources/ci/scripts/run.sh - name: 'Archive Test logs and reports' - if: ${{ failure() && steps.run_tests.conclusion == 'failure' }} + if: ${{ always() }} uses: actions/upload-artifact@v4.3.4 with: name: ${{ matrix.runtime }}-${{ matrix.test-group }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }} From 17bbd0ee42b3ecc16fccaa937a54d551fa2daf6b Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:35:29 +0530 Subject: [PATCH 4/7] Test modified to capture LSP4MP quickfix intermittent failure logs as well --- .github/workflows/build.yaml | 19 +++++---- .../intellij/it/SingleModMPLSTestCommon.java | 8 ++++ .../tools/intellij/it/UIBotTestUtils.java | 40 +++++++++++++++++++ 3 files changed, 60 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b94d1a2da..9c8e147bc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -98,7 +98,10 @@ jobs: fail-fast: false matrix: runtime: [ linux, mac, windows ] - test-group: [ Gradle-Jakarta-Language-Server ] + test-group: [ Gradle-MP-Language-Server ] + repeat: [ 1,2,3,4,5,6,7,8,9,10, + 11,12,13,14,15,16,17,18,19,20, + 21,22,23,24,25,26,27,28,29,30 ] include: - runtime: linux os: ubuntu-latest @@ -106,8 +109,8 @@ jobs: os: macOS-14 - runtime: windows os: windows-latest - - test-group: Gradle-Jakarta-Language-Server - test-class: io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest + - test-group: Gradle-MP-Language-Server + test-class: io.openliberty.tools.intellij.it.GradleSingleModMPLSTest env: USE_LOCAL_PLUGIN: ${{ inputs.useLocalPlugin || false }} REF_LSP4IJ: ${{ needs.fetch_merge_commit_sha_from_lsp4ij_PR.outputs.pr_details }} @@ -168,9 +171,11 @@ jobs: working-directory: ./liberty-tools-intellij run: bash ./src/test/resources/ci/scripts/run.sh - name: 'Archive Test logs and reports' - if: ${{ always() }} + if: ${{ failure() && steps.run_tests.conclusion == 'failure' }} uses: actions/upload-artifact@v4.3.4 with: - name: ${{ matrix.runtime }}-${{ matrix.test-group }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }} - path: | - liberty-tools-intellij/build/reports/ + name: ${{ matrix.runtime }}-${{ matrix.test-group }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }}-${{ github.run_attempt }} + path: liberty-tools-intellij/build/reports/ + if-no-files-found: warn + compression-level: 6 + overwrite: true \ No newline at end of file diff --git a/src/test/java/io/openliberty/tools/intellij/it/SingleModMPLSTestCommon.java b/src/test/java/io/openliberty/tools/intellij/it/SingleModMPLSTestCommon.java index 2f1743cc5..ae2ed842e 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/SingleModMPLSTestCommon.java +++ b/src/test/java/io/openliberty/tools/intellij/it/SingleModMPLSTestCommon.java @@ -161,6 +161,9 @@ public void testMPQuickFixInJavaFile() { String quickfixChooserString = "Insert " + livenessString; String mainQuickFixActionStr = "Generate OpenAPI Annotations for 'ServiceLiveHealthCheck'"; + UIBotTestUtils.clickOnWindowPaneStripeButton(remoteRobot, "Language Servers"); + UIBotTestUtils.enableMPDebugTraceInLS(remoteRobot); + // get focus on file tab prior to copy UIBotTestUtils.clickOnFileTab(remoteRobot, "ServiceLiveHealthCheck.java"); @@ -185,6 +188,7 @@ public void testMPQuickFixInJavaFile() { } finally { // Replace modified content with the original content UIBotTestUtils.pasteOnActiveWindow(remoteRobot); + UIBotTestUtils.captureLSPConsoleLog(remoteRobot); } } @@ -296,6 +300,9 @@ public void testQuickFixInMicroProfileConfigProperties() { Path pathToMpCfgProperties = Paths.get(projectsPath, projectName,"src", "main", "resources", "META-INF", "microprofile-config.properties"); + UIBotTestUtils.clickOnWindowPaneStripeButton(remoteRobot, "Language Servers"); + UIBotTestUtils.enableMPDebugTraceInLS(remoteRobot); + // get focus on file tab prior to copy UIBotTestUtils.clickOnFileTab(remoteRobot, "microprofile-config.properties"); @@ -314,6 +321,7 @@ public void testQuickFixInMicroProfileConfigProperties() { } finally { // Replace modified microprofile-config.properties with the original content UIBotTestUtils.pasteOnActiveWindow(remoteRobot, true); + UIBotTestUtils.captureLSPConsoleLog(remoteRobot); } } diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index e38a37dce..c4e362889 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -2985,6 +2985,46 @@ public static void enableDebugTraceInLS(RemoteRobot remoteRobot) { } } + /** + * Enable the trace level to verbose in LSP console + * + * @param remoteRobot Instance of the RemoteRobot to interact with the IntelliJ UI. + */ + public static void enableMPDebugTraceInLS(RemoteRobot remoteRobot) { + ComponentFixture node = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); + + List rts = node.findAllText(); + for (RemoteText rt : rts) { + if (rt.getText().contains("MicroProfile")) + rt.click(); + } + + ComponentFixture node1 = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); + List rts1 = node1.findAllText(); + for (RemoteText rt : rts1) { + if (rt.getText().contains("Debug")) + rt.click(); + } + + ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofMinutes(2)); + List comboBoxes = projectFrame.getComboBoxButton(); + ComboBoxFixture comboBox = comboBoxes.get(1); + comboBox.selectItem("verbose"); + + String xPath = "//div[starts-with(@accessiblename, 'Apply') and @class='ActionButton']"; + ComponentFixture actionButton = projectFrame.getActionButton(xPath, "10"); + actionButton.click(); + + ComponentFixture node3 = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='LSPConsoleToolWindowPanel']"), Duration.ofSeconds(10)); + List rts3 = node3.findAllText(); + for (RemoteText rt : rts3) { + if (rt.getText().contains("started pid")) { + rt.click(); + break; + } + } + } + /** * Access editor content in LSP console * From 5d5f4a8aa2162e09d5a36c0e36fd05ca460989b4 Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Tue, 9 Dec 2025 19:58:18 +0530 Subject: [PATCH 5/7] Renamed failed artifact test log --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9c8e147bc..74e373efe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -174,7 +174,7 @@ jobs: if: ${{ failure() && steps.run_tests.conclusion == 'failure' }} uses: actions/upload-artifact@v4.3.4 with: - name: ${{ matrix.runtime }}-${{ matrix.test-group }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }}-${{ github.run_attempt }} + name: ${{ matrix.runtime }}-${{ matrix.test-group }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }}-run-${{ matrix.repeat }} path: liberty-tools-intellij/build/reports/ if-no-files-found: warn compression-level: 6 From cb87fb8d59402d838c93af3bbb7d7a570659a8b7 Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Tue, 9 Dec 2025 20:39:02 +0530 Subject: [PATCH 6/7] Updated XPath to capture MP log --- .../java/io/openliberty/tools/intellij/it/UIBotTestUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index c4e362889..269e86a29 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -3031,7 +3031,7 @@ public static void enableMPDebugTraceInLS(RemoteRobot remoteRobot) { * @param remoteRobot Instance of the RemoteRobot to interact with the IntelliJ UI. */ public static void captureLSPConsoleLog(RemoteRobot remoteRobot) { - Locator locator = byXpath("//div[@class='EditorComponentImpl' and @accessiblename='Editor' ]"); + Locator locator = byXpath("(//div[@class='EditorComponentImpl' and @accessiblename='Editor'])[1]"); EditorFixture editorNew = remoteRobot.find(EditorFixture.class, locator, Duration.ofSeconds(20)); editorNew.click(); From 8af60840586d3e27957c16a5218f0fe8fa5c54d4 Mon Sep 17 00:00:00 2001 From: dessina-devasia <143582034+dessina-devasia@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:23:10 +0530 Subject: [PATCH 7/7] Modification to capture MP log --- .../java/io/openliberty/tools/intellij/it/UIBotTestUtils.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index 269e86a29..c13f2dd53 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -3020,7 +3020,6 @@ public static void enableMPDebugTraceInLS(RemoteRobot remoteRobot) { for (RemoteText rt : rts3) { if (rt.getText().contains("started pid")) { rt.click(); - break; } } }