Skip to content

JavaDriver/WidgetDropdown fix#4316

Merged
Maheshkale447 merged 6 commits into
masterfrom
Enhacement/JavaDriver
Oct 3, 2025
Merged

JavaDriver/WidgetDropdown fix#4316
Maheshkale447 merged 6 commits into
masterfrom
Enhacement/JavaDriver

Conversation

@GokulBothe99

@GokulBothe99 GokulBothe99 commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Thank you for your contribution.
Before submitting this PR, please make sure:

  • PR description and commit message should describe the changes done in this PR
  • Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
  • Latest Code from master or specific release branch is merged to your branch
  • No unwanted\commented\junk code is included
  • No new warning upon build solution
  • Code Summary\Comments are added to my code which explains what my code is doing
  • Existing unit test cases are passed
  • New Unit tests are added for your development
  • Sanity Tests are successfully executed for New and Existing Functionality
  • Verify that changes are compatible with all relevant browsers and platforms.
  • After creating pull request there should not be any conflicts
  • Resolve all Codacy comments
  • Builds and checks are passed before PR is sent for review
  • Resolve code review comments
  • Update the Help Library document to match any feature changes

Summary by CodeRabbit

  • Bug Fixes
    • Fixed JNLP and JAR Java launch command assembly so additional parameters are appended correctly and quoted properly, improving launch reliability.
    • Corrected web widget selection behavior so “Select” and “SelectByIndex” use the provided selection value, improving dropdown/selection accuracy.

@coderabbitai

coderabbitai Bot commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updates JNLP and JAR command assembly in the Java WS launcher to conditionally incorporate one-line parameters with adjusted quoting; updates JS widget selection so both "Select" and "SelectByIndex" use ValueToSelect, plus minor formatting/bracing edits.

Changes

Cohort / File(s) Summary of Changes
Java WS Launch Command Handling
Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs
When URLExtensionType is JNLP, sets command to "<mURL_Calc>" and, if commandParams_OneLine is present, removes a trailing quote, appends params, then re-adds the closing quote. When JAR, starts command with -jar "<mURL_Calc>" and appends params only inside that branch. Removed unconditional append of commandParams_OneLine.
Widget Selection Value Handling
Ginger/GingerCoreNET/Resources/JavaScripts/GingerHTMLHelper.js
In widgets handling, both "Select" and "SelectByIndex" branches now assign Value from inputValues.ValueToSelect. Minor formatting/bracing changes only.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant ActLaunch as ActLaunchJavaWSApplication
    participant Shell as ExecuteCommandSync

    Caller->>ActLaunch: Launch request (mURL_Calc + commandParams_OneLine)
    alt URLExtensionType == JNLP
        ActLaunch->>ActLaunch: command = "\"" + mURL_Calc + "\""
        alt commandParams_OneLine not empty
            ActLaunch->>ActLaunch: remove trailing '"' from command
            ActLaunch->>ActLaunch: append " " + commandParams_OneLine
            ActLaunch->>ActLaunch: add closing '"'
        end
    else URLExtensionType == JAR
        ActLaunch->>ActLaunch: command = "-jar \"" + mURL_Calc + "\""
        alt commandParams_OneLine not empty
            ActLaunch->>ActLaunch: append " " + commandParams_OneLine
        end
    end
    ActLaunch->>Shell: ExecuteCommandSync(finalCommand)
    Shell-->>ActLaunch: result
    ActLaunch-->>Caller: return result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Maheshkale447

Poem

I nibble at quotes and tuck params tight,
A gentle trim, then close at night.
Selects now borrow the value I bring,
A hop, a click — the launch takes wing. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “JavaDriver/WidgetDropdown fix” only references the widget dropdown change and omits the substantial modifications to the Java application launch logic, so it does not accurately summarize the main changes in this PR. Please update the title to clearly reflect both the Java application launch command enhancements and the widget dropdown fix or split these into separate PRs so each title succinctly summarizes its respective change.
Description Check ⚠️ Warning The PR description only repeats the repository’s generic contributor checklist and provides no details about what was actually changed, why it was changed, or how to verify it. Please provide a description summarizing the purpose of the changes, the specific files and behaviors modified, and any testing or migration steps so reviewers can understand and validate the PR.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Enhacement/JavaDriver

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11a012b and 682eaff.

📒 Files selected for processing (1)
  • Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (1 hunks)
🔇 Additional comments (2)
Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (2)

730-742: LGTM! JNLP parameter handling is correct.

The JNLP command construction correctly appends URL query parameters inside the quoted URL string, producing commands like:

"http://example.com/app.jnlp?param1=value1&param2=value2"

This is the expected format for JNLP URLs.


744-750: LGTM! JAR parameter handling correctly fixed.

The JAR command construction now properly appends parameters as separate quoted arguments after the JAR path. Since commandParams_OneLine already includes leading space and quoted params (built at lines 712, 723), the direct append produces:

-jar "path/to/app.jar" "param1=value1" "param2=value2"

This correctly addresses the critical issue raised in the previous review where parameters were being inserted inside the JAR path quotes.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d5d3652 and da21778.

📒 Files selected for processing (2)
  • Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (2 hunks)
  • Ginger/GingerCoreNET/Resources/JavaScripts/GingerHTMLHelper.js (2 hunks)
🔇 Additional comments (2)
Ginger/GingerCoreNET/Resources/JavaScripts/GingerHTMLHelper.js (1)

174-181: No action needed on dropdown mapping
All callers—including UI edit pages, action conversion tests, web and Selenium drivers, and Java/Windows handlers—consistently set and consume ValueToSelect for both “Select” and “SelectByIndex” actions.

Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (1)

730-748: Ignore unnecessary JNLP quoting. Removed quotes around the JNLP URL are correct: javaws.exe expects a percent-encoded URL (no raw spaces), and ProcessStartInfo.Arguments handles it without explicit wrapping.

Likely an incorrect or invalid review comment.

Comment thread Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 1, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between da21778 and 11a012b.

📒 Files selected for processing (1)
  • Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs (1 hunks)

Comment thread Ginger/GingerCore/Actions/ActLaunchJavaWSApplication.cs Outdated
@Maheshkale447
Maheshkale447 merged commit d288013 into master Oct 3, 2025
4 of 5 checks passed
@Maheshkale447
Maheshkale447 deleted the Enhacement/JavaDriver branch October 3, 2025 08:29
@coderabbitai coderabbitai Bot mentioned this pull request Nov 20, 2025
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants