You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by li...@apache.org on 2012/08/28 07:27:45 UTC

svn commit: r1377979 - in /incubator/ooo/trunk/main/test: testcommon/source/org/openoffice/test/vcl/ testcommon/source/org/openoffice/test/vcl/widgets/ testgui/source/testcase/gui/ testgui/source/testcase/gui/formula/catalog/ testgui/source/testcase/gu...

Author: liuzhe
Date: Tue Aug 28 05:27:44 2012
New Revision: 1377979

URL: http://svn.apache.org/viewvc?rev=1377979&view=rev
Log:
#120732 - [VCLAuto patch] Fixed problems: Screenshot is not valid. Some scripts are not stable. Add load/new documents interface.
Patch by: Li Lin Yi <li...@gmail.com>
Review by: Liu Zhe <al...@gmail.com>

Modified:
    incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/Tester.java
    incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/datapilot/DataPivotTable.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/filter/Fitler.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sheet/InsertSheet.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sort/SortDialogSetting.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/subtotals/SubtotalsFunctions.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDateSupport1024Columns.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogDefaultValue.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogSetting.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValiditySampleFile.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/HeaderAndFooterSetting.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sw/table/Table.java

Modified: incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/Tester.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/Tester.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/Tester.java (original)
+++ incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/Tester.java Tue Aug 28 05:27:44 2012
@@ -37,6 +37,8 @@ import java.util.StringTokenizer;
 public class Tester {
 	static Robot robot;
 	
+	static double factor = Double.parseDouble(System.getProperty("sleep.factor", "1.0"));
+	
 	static {
 		try {
 			robot = new Robot();
@@ -55,13 +57,13 @@ public class Tester {
 	 * 
 	 * @param delay
 	 */
-	public static void sleep(double delay) {
+	public static void sleep(double seconds) {
 		try {
-			Thread.sleep((long) (delay * 1000));
+			Thread.sleep((long) (seconds * factor * 1000));
 		} catch (InterruptedException e) {
 		}
-	}  	
-  	
+	}
+	
 	/**
 	 * Click on the screen
 	 * @param x

Modified: incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java (original)
+++ incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java Tue Aug 28 05:27:44 2012
@@ -51,7 +51,8 @@ public class VclApp {
 	}
 	
 	public VclApp(OpenOffice openOffice) {
-		this("localhost", openOffice.getAutomationPort());
+//		this("localhost", openOffice.getAutomationPort());
+		this("127.0.0.1", openOffice.getAutomationPort());	// In case "localhost" is modified incorrectly
 		this.openOffice = openOffice;
 	}
 	
@@ -87,7 +88,7 @@ public class VclApp {
 				openOffice.kill();
 				openOffice.cleanUserInstallation();
 				openOffice.start();
-				SystemUtil.sleep(5);
+				SystemUtil.sleep(10);
 			} else {
 				openOffice.start();
 			}
@@ -96,6 +97,20 @@ public class VclApp {
 		communicationManager.start();
 	}
 	
+	public void loadDocument(String file) {
+		dispatch(".uno:Open");
+		VclComboBox FilePicker_Path = new VclComboBox("SVT_HID_FILEDLG_AUTOCOMPLETEBOX");
+		FilePicker_Path.setText(file);
+		VclButton FilePicker_Open = new VclButton("fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_OPEN");
+		FilePicker_Open.click();
+		VclWindow writer = new VclWindow("SW_HID_EDIT_WIN");
+		writer.waitForExistence(10, 2);
+	}
+	
+	public void newDocument(String type) {
+		dispatch(type);
+	}
+	
 	public OpenOffice getOpenOffice() {
 		return this.openOffice;
 	}

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.java Tue Aug 28 05:27:44 2012
@@ -53,12 +53,12 @@ public class BVTFileType {
 
 	@Before
 	public void setUp() throws Exception {
-		app.start();
+		app.start(true);
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**
@@ -100,7 +100,7 @@ public class BVTFileType {
 		String saveTo = getPath("temp/" + file);
 		// Create a new text document
 		app.dispatch("private:factory/swriter");
-		sleep(3);
+		writer.waitForExistence(10, 2);
 
 		// Input some text by keyboard
 		writer.focus();
@@ -238,7 +238,7 @@ public class BVTFileType {
 		String text = "Hello Openoffice";
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
-		sleep(1);
+		impress.waitForExistence(10, 2);
 		impress.click(0.01, 0.01);
 		typeKeys(text);
 		sleep(2);
@@ -256,7 +256,6 @@ public class BVTFileType {
 		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		impress.waitForExistence(10, 2);
-		sleep(2);
 		impress.click(3, 3);
 		typeKeys("<tab><enter>");
 		app.dispatch(".uno:SelectAll");
@@ -316,7 +315,7 @@ public class BVTFileType {
 
 		// Create a new drawing document
 		app.dispatch("private:factory/sdraw");
-		sleep(3);
+		draw.waitForExistence(10, 2);
 
 		// Insert a picture fully filled with green
 		app.dispatch(".uno:InsertGraphic");
@@ -393,7 +392,7 @@ public class BVTFileType {
 
 		// Create a new math
 		app.dispatch("private:factory/smath");
-		sleep(3);
+		math_EditWindow.waitForExistence(10, 2);
 
 		// Verify if the Elements window is active
 		assertTrue(math_ElementsWindow.exists(3));

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFunction.java Tue Aug 28 05:27:44 2012
@@ -53,12 +53,12 @@ public class BVTFunction {
 
 	@Before
 	public void setUp() throws Exception {
-		app.start();
+		app.start(true);
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	@Test
@@ -89,7 +89,7 @@ public class BVTFunction {
 	public void testPrintDialog() {
 		// Create a new text document
 		app.dispatch("private:factory/swriter");
-		sleep(3);
+		writer.waitForExistence(10, 2);
 		app.dispatch(".uno:Print");
 		assertTrue(File_PrintDlg.exists(5));
 		File_PrintDlg.cancel();
@@ -158,7 +158,7 @@ public class BVTFunction {
 
 		// Create a new text document
 		app.dispatch("private:factory/swriter");
-		sleep(3);
+		writer.waitForExistence(10, 2);
 
 		// Insert a picture fully filled with green
 		writer.click(400, 400);
@@ -193,7 +193,7 @@ public class BVTFunction {
 
 		// Create a new text document
 		app.dispatch("private:factory/scalc");
-		sleep(3);
+		calc.waitForExistence(10, 2);
 
 		// Insert a picture fully filled with green
 		app.dispatch(".uno:InsertGraphic");
@@ -229,7 +229,7 @@ public class BVTFunction {
 		// Create a new text document
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
-		sleep(3);
+		impress.waitForExistence(10, 2);
 
 		// Insert a picture fully filled with green
 		app.dispatch(".uno:InsertGraphic");
@@ -339,7 +339,7 @@ public class BVTFunction {
 		};
 		// Create a new text document
 		app.dispatch("private:factory/scalc");
-		sleep(3);
+		calc.waitForExistence(10, 2);
 
 		CalcUtil.selectRange("C5");
 		typeKeys("1<enter>");
@@ -474,7 +474,7 @@ public class BVTFunction {
 
 		// Create a new drawing document
 		app.dispatch("private:factory/sdraw");
-		sleep(3);
+		draw.waitForExistence(10, 2);
 
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
@@ -498,7 +498,7 @@ public class BVTFunction {
 
 		// Create a new text document
 		app.dispatch("private:factory/swriter");
-		sleep(3);
+		writer.waitForExistence(10, 2);
 
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
@@ -522,7 +522,7 @@ public class BVTFunction {
 
 		// Create a new spreadsheet document
 		app.dispatch("private:factory/scalc");
-		sleep(3);
+		calc.waitForExistence(10, 2);
 
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
@@ -548,7 +548,7 @@ public class BVTFunction {
 		// Create a new presentation document
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
-		sleep(3);
+		impress.waitForExistence(10, 2);
 
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
@@ -572,7 +572,7 @@ public class BVTFunction {
 
 		// Create a new drawing document
 		app.dispatch("private:factory/sdraw");
-		sleep(3);
+		draw.waitForExistence(10, 2);
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable");
@@ -580,6 +580,7 @@ public class BVTFunction {
 		sleep(3);
 
 		// Verify if the table toolbar is active
+		typeKeys("123");	// Insert text to focus on table, to avoid Bug 120171 on linux
 		assertTrue(Table_Toolbar.exists(3));
 
 		// Focus on edit pane
@@ -598,7 +599,7 @@ public class BVTFunction {
 
 		// Create a new text document
 		app.dispatch("private:factory/swriter");
-		sleep(3);
+		writer.waitForExistence(10, 2);
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable");
@@ -629,7 +630,7 @@ public class BVTFunction {
 		// Create a new presentation document
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
-		sleep(3);
+		impress.waitForExistence(10, 2);
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable");
@@ -637,6 +638,7 @@ public class BVTFunction {
 		sleep(3);
 
 		// Verify if the table toolbar is active
+		typeKeys("123");	// Insert text to focus on table, to avoid Bug 120171 on linux
 		assertTrue(Table_Toolbar.exists(3));
 
 		// // Check the statusbar to verify if the table is inserted
@@ -659,8 +661,8 @@ public class BVTFunction {
 
 		// Create a new spreadsheet document
 		app.dispatch("private:factory/scalc");
-		sleep(3);
-
+		calc.waitForExistence(10, 2);
+		
 		// Insert source numbers
 		String sourceNumber1 = "5";
 		String sourceNumber2 = "3";
@@ -692,7 +694,7 @@ public class BVTFunction {
 
 		// Create a new spreadsheet document
 		app.dispatch("private:factory/scalc");
-		sleep(3);
+		calc.waitForExistence(10, 2);
 
 		// Insert source numbers and expected result
 		String sourceData = "0";
@@ -722,7 +724,7 @@ public class BVTFunction {
 
 		// Create a new spreadsheet document
 		app.dispatch("private:factory/scalc");
-		sleep(3);
+		calc.waitForExistence(10, 2);
 
 		// Insert source number
 		String sourceNumber = "-5";

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/SmokeTest.java Tue Aug 28 05:27:44 2012
@@ -55,7 +55,7 @@ public class SmokeTest {
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 	
 	@Test

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java Tue Aug 28 05:27:44 2012
@@ -50,25 +50,19 @@ public class AddDeleteSymbolsFromCatalog
 		
 		// New a formula document
 		app.dispatch("private:factory/smath");
-		sleep(3);	// If no sleep, can not find math_SymbolsDlg in mac
+		math_EditWindow.waitForExistence(10, 2);
 		
 		// Click catalog button
 		math_CatalogButton.click();
 		
-		// Verify if the "Symbols" dialog pop up
-		assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3));
-		
 		// Select "Special", click "Edit" button
 		math_SymbolsDlgListbox.select(2);
 		math_SymbolsDlgEditButton.click();
-		
-		// Verify if the "Edit Symbols" dialog pop up
-		assertTrue("Edit Symbols dialog does not pop up", math_EditSymbolsDlg.exists(3));
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java Tue Aug 28 05:27:44 2012
@@ -50,18 +50,15 @@ public class InputCharacterFromCatalogDl
 		
 		// New a formula document
 		app.dispatch("private:factory/smath");	
-		sleep(3);	// If no sleep, can not find math_SymbolsDlg in mac
+		math_EditWindow.waitForExistence(10, 2);
 		
 		// Click catalog button
 		math_CatalogButton.click();
-		
-		// Verify if the "Symbols" dialog pop up
-		assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3));
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 	
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java Tue Aug 28 05:27:44 2012
@@ -56,7 +56,7 @@ public class CreateFormulaInDifferentWay
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 	
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java Tue Aug 28 05:27:44 2012
@@ -50,12 +50,13 @@ public class ChartDialogSetting {
 
 		// Create a new spreadsheet document
 		app.dispatch("private:factory/scalc");
+		calc.waitForExistence(10, 2);
 		app.dispatch(".uno:InsertObjectChart");
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/datapilot/DataPivotTable.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/datapilot/DataPivotTable.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/datapilot/DataPivotTable.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/datapilot/DataPivotTable.java Tue Aug 28 05:27:44 2012
@@ -54,12 +54,12 @@ public class DataPivotTable {
 
 	@Before
 	public void setUp() throws Exception {
-		app.start();
+		app.start(true);
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/filter/Fitler.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/filter/Fitler.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/filter/Fitler.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/filter/Fitler.java Tue Aug 28 05:27:44 2012
@@ -57,7 +57,7 @@ public class Fitler {
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sheet/InsertSheet.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sheet/InsertSheet.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sheet/InsertSheet.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sheet/InsertSheet.java Tue Aug 28 05:27:44 2012
@@ -50,7 +50,7 @@ public class InsertSheet {
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sort/SortDialogSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sort/SortDialogSetting.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sort/SortDialogSetting.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/sort/SortDialogSetting.java Tue Aug 28 05:27:44 2012
@@ -55,11 +55,12 @@ public class SortDialogSetting {
 
 		// Create a new spreadsheet document
 		app.dispatch("private:factory/scalc");
+		calc.waitForExistence(10, 2);
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/subtotals/SubtotalsFunctions.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/subtotals/SubtotalsFunctions.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/subtotals/SubtotalsFunctions.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/subtotals/SubtotalsFunctions.java Tue Aug 28 05:27:44 2012
@@ -53,14 +53,14 @@ public class SubtotalsFunctions {
 		String file = prepareData("sc/SubtotalsSampleFile.ods");
 		app.dispatch(".uno:Open");
 		submitOpenDlg(file);
-		sleep(2);
+		calc.waitForExistence(10, 2);
 		CalcUtil.selectRange("A1:E7");
 		app.dispatch(".uno:DataSubTotals");
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDateSupport1024Columns.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDateSupport1024Columns.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDateSupport1024Columns.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDateSupport1024Columns.java Tue Aug 28 05:27:44 2012
@@ -57,7 +57,7 @@ public class ValidityDateSupport1024Colu
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogDefaultValue.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogDefaultValue.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogDefaultValue.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogDefaultValue.java Tue Aug 28 05:27:44 2012
@@ -50,7 +50,7 @@ public class ValidityDialogDefaultValue 
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogSetting.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogSetting.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValidityDialogSetting.java Tue Aug 28 05:27:44 2012
@@ -56,13 +56,14 @@ public class ValidityDialogSetting {
 
 		// New a spreadsheet, select cell range, open Validity dialog
 		app.dispatch("private:factory/scalc");
+		calc.waitForExistence(10, 2);
 		CalcUtil.selectRange("A1:C5");
 		app.dispatch(".uno:Validation");
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValiditySampleFile.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValiditySampleFile.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValiditySampleFile.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sc/validity/ValiditySampleFile.java Tue Aug 28 05:27:44 2012
@@ -48,7 +48,7 @@ public class ValiditySampleFile {
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/HeaderAndFooterSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/HeaderAndFooterSetting.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/HeaderAndFooterSetting.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/HeaderAndFooterSetting.java Tue Aug 28 05:27:44 2012
@@ -46,12 +46,12 @@ public class HeaderAndFooterSetting{
 
 	@Before
 	public void setUp() throws Exception {
-//		app.start(true);	// Bug 120476
-		app.start();
+		app.start(true);	// Bug 120476
 
 		// New a impress, insert some slides
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
+		impress.waitForExistence(10, 2);
 
 		for(int i=0; i<5;i++){
 			SD_InsertPageButtonOnToolbar.click();
@@ -64,14 +64,14 @@ public class HeaderAndFooterSetting{
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**
 	 * Test Copy slide with Apply Footer to same file and different file
 	 * @throws Exception
 	 */
-	@Test//?
+	@Test
 	public void testCopySlideWithApplyFooter() throws Exception{
 
 		//add header and footer
@@ -257,7 +257,7 @@ public class HeaderAndFooterSetting{
 	 * Test footer not show on the first slide. 
 	 * @throws Exception
 	 */
-	@Test//??
+	@Test
 	public void testFooterNotShowOn1stSlide() throws Exception{
 
 		//add header and footer
@@ -269,8 +269,12 @@ public class HeaderAndFooterSetting{
 
 		// Check slide 1
 		ImpressSlideSorter.focus();
-		typeKeys("<up><up><up><up><up>");
-		sleep(1);	// If no sleep, error occur
+//		typeKeys("<up><up><up><up><up>");	// Not stable on ubuntu10.04
+//		sleep(1);	// If no sleep, error occur
+		for (int i=0; i<5; i++) {
+			typeKeys("<up>");
+			sleep(1);
+		}
 
 		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_FooterNotShowOn1stSlide.isChecked());

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java Tue Aug 28 05:27:44 2012
@@ -45,13 +45,12 @@ public class OpenDocumentWithHeaderFoote
 
 	@Before
 	public void setUp() throws Exception {
-//		app.start(true);	// Bug 120476
-		app.start();
+		app.start(true);	// Bug 120476
 	}
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**
@@ -65,7 +64,7 @@ public class OpenDocumentWithHeaderFoote
 		String file = prepareData("sd/AOO3.4HeaderFooter.odp");
 		app.dispatch(".uno:Open");
 		submitOpenDlg(file);
-		sleep(2);	// If no sleep, error occur on mac
+		impress.waitForExistence(10, 2);
 
 		//check after reopen		
 		app.dispatch(".uno:HeaderAndFooter");
@@ -106,6 +105,7 @@ public class OpenDocumentWithHeaderFoote
 		String file = prepareData("sd/gfdd.ppt");
 		app.dispatch(".uno:Open");
 		submitOpenDlg(file);
+		impress.waitForExistence(10, 2);
 
 		//check after reopen		
 		app.dispatch(".uno:HeaderAndFooter");

Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sw/table/Table.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sw/table/Table.java?rev=1377979&r1=1377978&r2=1377979&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sw/table/Table.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sw/table/Table.java Tue Aug 28 05:27:44 2012
@@ -52,7 +52,7 @@ public class Table {
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		
 	}
 
 	/**