Author: hdu
Date: Thu Aug 29 14:58:02 2013
New Revision: 1518666

URL: http://svn.apache.org/r1518666
Log:
#i123142# handle "file changed by others" msgbox in autotests

autotests are routinely deleting/rewriting/overwriting temporary files
and a warning msgbox pops up for that which needs to be handled, else
the autotest runs into a timeout and thus fails.

Unfortunately the "file changed by others" message box doesn't have
an e.g. helpid or other constant for finding it, so the msgbox's
message itself has to be checked.

Modified:
    openoffice/trunk/test/testgui/source/testlib/gui/AppTool.java

Modified: openoffice/trunk/test/testgui/source/testlib/gui/AppTool.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/test/testgui/source/testlib/gui/AppTool.java?rev=1518666&r1=1518665&r2=1518666&view=diff
==============================================================================
--- openoffice/trunk/test/testgui/source/testlib/gui/AppTool.java (original)
+++ openoffice/trunk/test/testgui/source/testlib/gui/AppTool.java Thu Aug 29 
14:58:02 2013
@@ -97,7 +97,13 @@ public class AppTool extends Tester {
                submitSaveDlg(getPath(path));
                if (alienFormatDlg.exists(3))
                        alienFormatDlg.ok();
-               app.waitSlot(5 * 60); // 10 minutes
+               if( activeMsgBox.exists(1)) {
+                       String msg = activeMsgBox.getMessage();
+                       // #i123142# confirm overwriting of test files
+                       if( msg.indexOf( "overwrite changes") >= 0)
+                               activeMsgBox.yes();
+               }
+               app.waitSlot(5 * 60); // 5 minutes
        }
        
        public static void close() {


Reply via email to