assertj-swing icon indicating copy to clipboard operation
assertj-swing copied to clipboard

Unable to find JFileChooserFixture on OSX

Open croesch opened this issue 11 years ago • 1 comments

Issue by Clinton from Tue, 2 Feb 2010 05:40:03 -0600 Originally opened as http://jira.codehaus.org/browse/FEST-303


Attempting to get a JFileChooserFixture from a FrameFixture fails on OSX:

// mainFrameFixture is a FrameFixture.
JFileChooserFixture jFileChooser = mainFrameFixture.fileChooser(); // Basically get a timeout waiting for the JFileChooser (even though it is present on the screen).

When playing around, I tried specifying an incorrect dialog name (mainFrameFixture.fileChooser("blah"); I get the following error message on windows: javax.swing.JDialog[name='dialog0', title='Open', enabled=true, modal=true, visible=true, showing=true] javax.swing.JRootPane[] javax.swing.JPanel[name='null.glassPane'] javax.swing.JLayeredPane[] javax.swing.JPanel[name='null.contentPane'] org.project.views.ProjectFileChooser[name=null, dialogTitle=null, dialogType=OPEN_DIALOG, currentDirectory=C:\projects\other-samples, enabled=true, visible=true, showing=true] sun.swing.WindowsPlacesBar[name=null] javax.swing.JToggleButton[name=null,text='<html><center>My Recent Documents</center></html>', selected=false, enabled=true, visible=true, showing=true] javax.swing.Box$Filler[,42,70,1x1,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] javax.swing.JToggleButton[name=null,text='<html><center>Desktop</center></html>', selected=false, enabled=true, visible=true, showing=true] javax.swing.Box$Filler[,42,140,1x1,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] javax.swing.JToggleButton[name=null,text='<html><center>My Documents</center></html>', selected=false, enabled=true, visible=true, showing=true] javax.swing.Box$Filler[,42,210,1x1,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] javax.swing.JToggleButton[name=null, text='<html><center>My Computer</center></html>', selected=false, enabled=true, visible=true, showing=true] javax.swing.Box$Filler[,42,280,1x1,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] javax.swing.JToggleButton[name=null, text='<html><center>My Network Places</center></html>', selected=false, enabled=true, visible=true, showing=true] javax.swing.JToolBar[name=null] com.sun.java.swing.plaf.windows.WindowsFileChooserUI$1[name=null, text='Look in:', enabled=true, visible=true, showing=true] javax.swing.Box$Filler[,86,13,8x0,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=] com.sun.java.swing.plaf.windows.WindowsFileChooserUI$2[name=null, selectedItem=C:\projects\other-samples, contents=[...], editable=false, enabled=true, visible=true, showing=true]

But when I run the same code on OSX it only reports the top level jDialog: javax.swing.JDialog[name='dialog0', title='Open', enabled=true,modal=true, visible=false, showing=false]


votes (original issue): 0 watches (original issue): 0

croesch avatar Feb 08 '14 12:02 croesch

Comment by alexruiz from Sat, 17 Apr 2010 00:05:29 -0500


I tried to reproduce this bug with my old MacBook Pro, running Mac OS X 10.4.11 and Java 1.5 but I couldn't. I need to get a machine with Snow Leopard.

croesch avatar Feb 08 '14 12:02 croesch