benjamin84 / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

ButtonFixture.click() appears to not function in a headless environment using vncserver #134

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have a JUnit test case which uses FEST-Swing 1.01.  It works
perfectly on two Linux systems and I can observe the test manipulating
the Swing GUI on display 127.0.0.1:0.

The problem occurs when the continuous integration server, which is
headless, attempts to run with the display set to a 1600x1200 virtual
X display.  From what I can see in the logs, the test appears to run
normally until a certain JButtonFixture is clicked, then it fails
because the JButton's action handler is not invoked.

The following assertions pass:
btnFixture.focus();
btnFixture.requireVisible();
btnFixture.requireEnabled();
btnFixture.requireText(" Open ");

The problem is that btnFixture.click() has no effect, nor does it log
anything to stdout or throw any exceptions.  I have also seen this
behavior when the button exists but is outside of the display's
visible area.  My initial guess is that there is some way that
btnFixture.click() can return without throwing an exception or
invoking the Swing method doClick().

The reason I think this is that
btnFixture.targetCastedTo(javax.swing.JButton.class).doClick() _does_
work if I substitute it for the method call above.
What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
This bug occurs in FEST-Swing 1.01a on Redhat Enterprise Linux 3.

Please provide any additional information below.
This bug is probably related to running the JUnit test case under the
'vncserver' X Serve.  The environment is not truly headless
(java.awt.headless=true) because vncserver does allow X11 calls, which
means Swing components can be instantiated and for the most part FEST-Swing
seems to work properly.  The exception is invoking JButtonFixture.click(),
which works in some cases but not in others.

Original issue reported on code.google.com by woody.fo...@gmail.com on 30 Apr 2008 at 1:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Fixed implementation of 'click(AbstractButton)' in AbstractButtonDriver.

Original comment by wanghy1...@gmail.com on 18 Jun 2008 at 3:24

GoogleCodeExporter commented 9 years ago
Needed to roll back changes and re-open this bug. Fixing this bug introduced 
some 
regressions. We will fix this bug in our next release.

Original comment by wanghy1...@gmail.com on 23 Jun 2008 at 6:40

GoogleCodeExporter commented 9 years ago
This still appears to be a problem in fest-swing-1.0b2
Is there a fix for this or an eta on a fix?
(Having the information about when it might be fixed is useful)

Original comment by andy.kri...@gmail.com on 23 Oct 2008 at 7:23

GoogleCodeExporter commented 9 years ago
Hi Andy,

We plan to fix this bug in 1.0-rc1 (to be released by the end of November.) :)

Best regards,
-Alex

Original comment by Alex.Rui...@gmail.com on 23 Oct 2008 at 8:50

GoogleCodeExporter commented 9 years ago
org.fest.swing.core.RobotFixture now throws ActionFailedException if the 
component to
click is out of the boundaries of the screen.

Original comment by Alex.Rui...@gmail.com on 30 Nov 2008 at 4:19

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 1:57

GoogleCodeExporter commented 9 years ago
Hi,

I am having the same problem. The JButtonFixture.click() is not firing when 
running
it on my continuous integration server. Was there a work around? 

thank you.

Original comment by michael....@dtf.wa.gov.au on 19 Apr 2009 at 11:36

GoogleCodeExporter commented 9 years ago
I ended up working around the problem by configuring the vncserver to use a 
higher
resolution so that the button would not be outside of the display boundaries.

Original comment by woody.fo...@gmail.com on 21 Apr 2009 at 1:21

GoogleCodeExporter commented 9 years ago
Michael & Woody,

I'm sorry for the late reply. Which version of FEST-Swing are you using? I'd 
also
like to know a little bit more about your environment (OS, Java version, etc.)

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 21 Apr 2009 at 7:41

GoogleCodeExporter commented 9 years ago
This is an old bug which I think came up in FEST 0.7 on Linux. because I have 
kept
the vncserver workaround in order to view running tests remotely, I have not 
seen it
again, so I cannot verify whether it still occurs.

Original comment by woody.fo...@gmail.com on 27 Apr 2009 at 6:18