AssertJ not clicking boxes - Java 11
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
Research direction
Start with assertj-examples/assertj-swing-junit-examples/src/test/java/org/assertj/swing/junit/examples/getting_started/SimpleCopyApplicationTest.java and reproduce the checkbox and combo-box actions on Java 11. Compare the working text-field interaction with the failing controls and inspect the reported component description. Done means identifying the cause and providing a verified fix or a clear resolution for these interactions.
Written by the indexing model from the issue text.
Description
Summary
I’m not able to use basic click functionalities with AssertJ (basically everything related to activating buttons)
Opened a thread about it in STO as well -
I’m not sure if it’s a regression or if I’m just missing out something obvious… the example here - Example is not working on my env as well (Java 11)
Example
The GUI is a JPanel and I use Containers.showInFrame to display it.
The panel has some text fields, JCheckboxes and JComboboxes.
I'm able to set text in the text fields, but I am not able to check/select the boxes. Been breaking my head but couldn't figure out what is missing...
Working:
frame.textBox("example").setText(result).requireText(result);
Not working:
frame.checkBox("exampleCheckBox").uncheck().requireNotSelected();
frame.checkBox("example2CheckBox").check().requireSelected();
panel.comboBox("exampleComboBox").selectItem(2);
The component description that I get for a checkbox is:
[javax.swing.JCheckBox[name='exampleCheckBox', text='Mandatory', selected=true, enabled=true, visible=true, showing=true] - property:'selected']
Using Java 11, Gradle build, latest assertj-swing-junit and assertj-core.
Would highly appreciate any leads!
Thank you
- Dominant language
- Java
- Stars
- 121
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
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.
More from assertj/assertj-swing
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
assertj/assertj-swing#279 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
assertj/assertj-swing#278 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
assertj/assertj-swing#276 · 1 comment ·
-
Update unit test to avoid deprecated `ExpectedException.none()` by using `Assert.assertThrows()` Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
assertj/assertj-swing#275 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
assertj/assertj-swing#277 · 1 comment ·
All issues in assertj/assertj-swing
Similar issues
-
certification
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Needs: Triage Type: Feature request
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·