onWindowOfType
Finds the single realized window of type T. Convenience for onWindow(SwingMatcher.isOfType<T>()).
The returned interaction carries T, so a property of the window is read without naming the type a second time. SwingWindowInteraction.fetch is the last resort: to read a value, use org.jetbrains.compose.swing.test.interaction.assertProperty or an assertion.
setContent { Window(onCloseRequest = {}, title = "Main") { ... } }
onWindowOfType<JFrame>().assertProperty(JFrame.NORMAL) { extendedState }Content copied to clipboard
Return
a handle that fails on use unless exactly one realized window is a T.