MarketSquare / MarketSquare/remoteswinglibrary
Top-level JFrame can be selected, top-level JDialog cannot
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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