Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

AssertJ not clicking boxes - Java 11

Open
#229 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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

Java11
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

Open the contributing guide

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.

More from assertj/assertj-swing

All issues in assertj/assertj-swing

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.