assertj / assertj/assertj-swing
ClassCastException on JOptionPaneFixture.title()
Open
bug
invalid
- Dominant language
- Java
- Stars
- 121
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I get `ClassCastException` when calling `JOptionPaneFixture.title()`.
My code:
`final JOptionPaneFixture optionPane = JOptionPaneFinder.findOptionPane().withTimeout(3000).using(robot);`
`final String title = optionPane.title();`
Error i get:
`java.lang.ClassCastException: javax.swing.JInternalFrame cannot be cast to java.awt.Dialog`
Im using java 8 `javax.swing.JOptionPane` in my gui.
Ofc it works if i cast it to `JInternalFrame`.
`final String title = ((JInternalFrame) optionPane.target().getRootPane().getParent()).getTitle();`
Contributor guide
Assessment
This issue has not been assessed yet.