is there a way to get the AWT window in a compose test? I want to fire a 'Escape' press without any of my composables having focus
inb4 why: I am building tooltips. they need to be dismissed on Escape and can be shown when an area is hovered (not focused)
Alex Styl
10/08/2025, 6:08 AM
I had a quick look at the code of the compose ui test rule and I don't think there is an actual 'window' here, is there?
I would probably need to create an AWT test for this instead of a compose
s
seb
10/08/2025, 6:22 AM
No, there is no window in these tests, they draw to a bitmap and run in headless mode
a
Alex Styl
10/08/2025, 6:24 AM
thanks for confirming Seb. I'll see if I can test this an other way
👍 1
a
Alexander Maryanovsky
10/08/2025, 9:16 PM
Semantic roots are now exposed in ComposeWindow etc., so you could, in theory, implement a “real” testing framework.