No access to 'Save Resource'-Dialog because of ui.close

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

No access to 'Save Resource'-Dialog because of ui.close

Postby a.bitsche » Tue Sep 05, 2006 3:43 am

If i close my main-shell (normally Eclipse Platform) with the ui.close-method i can't gain access to the following 'Save Resource'-Dialog.

When the following code is exceputed i get a TimeoutException (Save Resource).
Code: Select all
IUIContext ui = getUIContext();"Welcome.ctabitem", 79, 6);"&File.menuitem", "&New\tAlt+Shift+N/&Untitled Text File");
ui.waitForShellShowing("Save Resource");"&No.button");
ui.waitForShellDisposed("Save Resource");
ui.waitForShellDisposed("Eclipse Platform");

If i replace ui.close with
Code: Select all"&File.menuitem", "E&xit");
everything works fine.
Posts: 31
Joined: Tue Aug 22, 2006 2:53 am
Location: Austria

Postby Phil Quitslund » Tue Sep 05, 2006 7:12 am

This is a good point.

The close call essentially calls close() on the underlying shell. In this case, it does not seem to be the right thing to do. In fact, in general, we discourage calling close() unless absolutely necessary. (Note that you also generally don't need to explicitly call the exit menu action either as the PDE test runner closes the workspace for you already.) To avoid recording the close action, you might click the pause button on the recorder controller before exiting the application under test. In case you do record it, you can safely remove the calls from the generated class.
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest