MarketSquare / MarketSquare/remoteswinglibrary

Top-level JFrame can be selected, top-level JDialog cannot

Open
#116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
32
Forks
41
PR merge metrics
No merged PRs in 30d

Description

I'm trying to understand why Robot Framework can't seem to connect when using a JDialog as the top level window but it works perfectly when using a JFrame.

The test:
```robot
*** Settings ***
Library RemoteSwingLibrary debug=True

*** Test Cases ***
My Test Case
Start Application DialogTest java -cp /projects/rdialog DialogTest
Select Dialog Main
Push Button Close
```

A minimal dialog example:
```java
import javax.swing.*;

public class DialogTest {
public static void main(String[] args) {
JButton button = new JButton("Close");
JDialog dialog = new JDialog();
dialog.setTitle("Main");
dialog.add(button);
dialog.setBounds(50, 50, 200, 100);
button.addActionListener(e -> {
dialog.dispose();
});
dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
}
}
```
When attempting to run the test it fails with `RemoteSwingLibraryTimeoutError: Agent port not received before timeout`.
Running the test with `Select Window` instead of `Select Dialog` and replacing `JDialog` with `JFrame` in the source works. What am I missing here?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RemoteSwingLibrary handling behind Select Dialog and Select Window, then reproduce the issue using the provided Robot test and minimal DialogTest Java application. Done means a top-level JDialog connects without the Agent port timeout and the test can select Main and push Close.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
desktop, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.