assertj / assertj/assertj-swing
AssertJ not clicking boxes - Java 11
- Lingua principale
- Java
- Stelle
- 121
- Fork
- 52
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
#### Summary
I’m not able to use basic click functionalities with AssertJ (basically everything related to activating buttons)
Opened a [thread](https://stackoverflow.com/questions/53379005/assertj-not-clicking-boxes) 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](https://github.com/joel-costigliola/assertj-examples/blob/master/assertj-swing-junit-examples/src/test/java/org/assertj/swing/junit/examples/getting_started/SimpleCopyApplicationTest.java) 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:
```java
frame.textBox("example").setText(result).requireText(result);
```
Not working:
```java
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da assertj-examples/assertj-swing-junit-examples/src/test/java/org/assertj/swing/junit/examples/getting_started/SimpleCopyApplicationTest.java e riproduci le azioni della casella di controllo e della casella combinata su Java 11. Confronta l’interazione funzionante con il campo di testo con i controlli che falliscono ed esamina la descrizione del componente segnalata. Il lavoro è completato quando viene identificata la causa e viene fornita una correzione verificata o una risoluzione chiara per queste interazioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- desktop, testing
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 32/100