Issue 193 in robotframework-swinglibrary: Create a new keywod to close a window without hiding the window

8 views
Skip to first unread message

robotframewor...@googlecode.com

unread,
Aug 18, 2011, 5:18:45 AM8/18/11
to robotframework...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 193 by daniel.g...@gmail.com: Create a new keywod to close a
window without hiding the window
http://code.google.com/p/robotframework-swinglibrary/issues/detail?id=193

The current closeWindow keyword sends a window closing event to the event
queue and then hides the window. There is, however, a problem with hiding
the window: For example when answering "No" in a confirm exit dialog. The
user expects to continue working with the application but the main window
is gone.


robotframewor...@googlecode.com

unread,
Apr 24, 2012, 7:58:57 AM4/24/12
to robotframework...@googlegroups.com

Comment #4 on issue 193 by janne.t....@gmail.com: Create a new keywod

Is there still interest in getting this fixed?

robotframewor...@googlecode.com

unread,
Apr 24, 2012, 4:53:41 PM4/24/12
to robotframework...@googlegroups.com

Comment #5 on issue 193 by geoff.ba...@gmail.com: Create a new keywod to

Yes, I would say so - we have hacked around this too and it's somewhat more
central as confirmation dialogs when closing applications are hardly
unusual.

Whether it should be a new keyword, or the existing one should be fixed to
not hide the window, is another question.

One way to fix, as we have done, is to use Abbot's window closing method
instead of Jemmy's.


robotframewor...@googlecode.com

unread,
Apr 24, 2012, 4:55:12 PM4/24/12
to robotframework...@googlegroups.com

Comment #6 on issue 193 by geoff.ba...@gmail.com: Create a new keywod to

btw I think this and issue 196 are essentially two different suggestions
for the same problem.


robotframewor...@googlecode.com

unread,
Apr 25, 2012, 2:04:07 AM4/25/12
to robotframework...@googlegroups.com

Comment #7 on issue 193 by janne.t....@gmail.com: Create a new keywod

I am inclining more towards changing the default behavior. Seems really
strange that Jemmy is not actually closing the windows at all. I'll change
the implementation to use Abbot, and if it passes our own tests, I'll push
that.

robotframewor...@googlecode.com

unread,
Apr 25, 2012, 5:47:05 AM4/25/12
to robotframework...@googlegroups.com

Comment #8 on issue 193 by janne.t....@gmail.com: Create a new keywod

Geoff, are you doing anything else in your patched version than this:

public void closeWindow(String identifier) {
FrameOperator frameOperator = operatorFactory
.createOperator(identifier);
new WindowTester().actionClose(frameOperator.getSource());
}

This passes the SwingLibrary tests, but not the test script attached to
issue 196

robotframewor...@googlecode.com

unread,
Apr 25, 2012, 3:30:17 PM4/25/12
to robotframework...@googlegroups.com

Comment #9 on issue 193 by geoff.ba...@gmail.com: Create a new keywod to
Hi Janne,

Here's our Abbot code for closing frames (apologies for Python, but I'm
sure you can translate:

from org.robotframework.abbot.tester import Robot

System.setProperty("abbot.robot.mode", "awt")
robot = Robot()
robot.setEventMode(Robot.EM_AWT)
class CloseRunnable(Runnable):
def run(self):
robot.close(frame)
swing.SwingUtilities.invokeAndWait(CloseRunnable())
robot.waitForIdle()


Reply all
Reply to author
Forward
0 new messages