incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1365867 [1/2] - in /incubator/ooo/trunk/main/test/testgui: data/sc/ source/testcase/gui/ source/testcase/gui/formula/catalog/ source/testcase/gui/formula/importexport/ source/testcase/gui/sc/chart/ source/testcase/gui/sc/filter/ source/tes...
Date Thu, 26 Jul 2012 01:57:19 GMT
Author: liuzhe
Date: Thu Jul 26 01:57:18 2012
New Revision: 1365867

URL: http://svn.apache.org/viewvc?rev=1365867&view=rev
Log:
#120323# - Automated Test: Make test code under testcase.sc/sw/sd.* language-neutral 
Patch by Li Lin Yi
Review by Liu Zhe

Added:
    incubator/ooo/trunk/main/test/testgui/data/sc/SortOptionsIncludeFormats.ods   (with props)
Modified:
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/BVTFileType.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/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
    incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java

Added: incubator/ooo/trunk/main/test/testgui/data/sc/SortOptionsIncludeFormats.ods
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/data/sc/SortOptionsIncludeFormats.ods?rev=1365867&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/trunk/main/test/testgui/data/sc/SortOptionsIncludeFormats.ods
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -99,7 +99,7 @@ public class BVTFileType {
 	private void saveNewDocument(String file) {
 		String saveTo = getPath("temp/" + file);
 		//Create a new text document
-		app.dispatch("private:factory/swriter", 3);
+		app.dispatch("private:factory/swriter");
 		sleep(3);
 		
 		// Input some text by keyboard
@@ -107,7 +107,7 @@ public class BVTFileType {
 	
 		String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? ";
 		typeText(text);
-		app.dispatch(".uno:SelectAll", 3);
+		app.dispatch(".uno:SelectAll");
 		app.setClipboard(".wrong");
 		sleep(1);
 		typeKeys("<$copy>");
@@ -119,7 +119,7 @@ public class BVTFileType {
 		// Set the text style
 		writer.openContextMenu();
 //		menuItem("Text Properties...").select();
-		app.dispatch(".uno:FontDialog", 3);
+		app.dispatch(".uno:FontDialog");
 		EffectsPage.select();
 		EffectsPage_Color.select(6);
 		EffectsPage.ok();
@@ -134,14 +134,14 @@ public class BVTFileType {
 		
 		
 		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc", 3);
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 		// Reopen the saved file
-		app.dispatch(".uno:Open", 3);
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		writer.waitForExistence(10, 2);
 		
-		app.dispatch(".uno:SelectAll", 3);
+		app.dispatch(".uno:SelectAll");
 		app.setClipboard(".wrong");
 		typeKeys("<$copy>");
 		sleep(1);
@@ -253,16 +253,16 @@ public class BVTFileType {
 		if (AlienFormatDlg.exists(3))
 			AlienFormatDlg.ok();
 		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc", 3);
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 		// Reopen the saved file
-		app.dispatch(".uno:Open", 3);
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		impress.waitForExistence(10, 2);
 		sleep(2);
 		impress.click(3, 3);
 		typeKeys("<tab><enter>");
-		app.dispatch(".uno:SelectAll", 3);
+		app.dispatch(".uno:SelectAll");
 //		app.setClipboard(".wrong");
 		typeKeys("<$copy>");
 		sleep(1);
@@ -319,11 +319,11 @@ public class BVTFileType {
 		String bmp_green = prepareData("pure_green_64x64.bmp");
 		
 		// Create a new drawing document
-		app.dispatch("private:factory/sdraw", 3);
+		app.dispatch("private:factory/sdraw");
 		sleep(3);
 		
 		// Insert a picture fully filled with green
-		app.dispatch(".uno:InsertGraphic", 3);
+		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_green);
 		sleep(3);
 		// Focus on edit pane
@@ -343,11 +343,11 @@ public class BVTFileType {
 			AlienFormatDlg.ok();	// Keep the current format
 		
 		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc", 3);
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 		
 		// Reopen the saved file
-		app.dispatch(".uno:Open", 3);
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		draw.waitForExistence(10, 2);
 		
@@ -395,7 +395,7 @@ public class BVTFileType {
 		String saveTo = getPath("temp/" + filename);
 		
 		// Create a new math
-		app.dispatch("private:factory/smath", 3);
+		app.dispatch("private:factory/smath");
 		sleep(3);
 		
 		// Verify if the Elements window is active		
@@ -404,7 +404,7 @@ public class BVTFileType {
 		// Insert a formula
 		String text = "5 times 3 = 15";
 		typeText(text);
-		app.dispatch(".uno:Select", 3);
+		app.dispatch(".uno:Select");
 		typeKeys("<$copy>");
 		sleep(1);
 		
@@ -420,21 +420,21 @@ public class BVTFileType {
 			AlienFormatDlg.ok();	// Keep the current format
 	
 		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc", 3);
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 		
 		// Reopen the saved file
-		app.dispatch(".uno:Open", 3);
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		math_EditWindow.waitForExistence(10, 2);
 		
 		// Verify if the formula still exists in the file
-		app.dispatch(".uno:Select", 3);
+		app.dispatch(".uno:Select");
 		typeKeys("<$copy>");
 		sleep(1);
 		assertEquals("The typed formula into math is saved", text, app.getClipboard());
 		
 		// Close the file to avoid the app closing the Elements window automatically
-		app.dispatch(".uno:CloseDoc", 3);
+		app.dispatch(".uno:CloseDoc");
 	}
 }

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -49,20 +49,17 @@ public class AddDeleteSymbolsFromCatalog
 		app.start();
 		
 		// New a formula document
-		startcenter.menuItem("File->New->Formula").select();
-		sleep(3);		
+		app.dispatch("private:factory/smath");
 		
 		// Click catalog button
 		math_CatalogButton.click();
-		sleep(1);
 		
 		// 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("Special");
+		math_SymbolsDlgListbox.select(2);
 		math_SymbolsDlgEditButton.click();
-		sleep(1);
 		
 		// Verify if the "Edit Symbols" dialog pop up
 		assertTrue("Edit Symbols dialog does not pop up", math_EditSymbolsDlg.exists(3));
@@ -87,7 +84,6 @@ public class AddDeleteSymbolsFromCatalog
 		int nIndex = 1;
 		do {
 			math_EditSymbolsDlgViewControl.click(100*nIndex, 10);	// risk: after 6 or 7 circles, this will click out of ViewControl
-			sleep(1);
 			selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 			nIndex++;
 			// Find if the selected symbol is already in the list
@@ -102,7 +98,6 @@ public class AddDeleteSymbolsFromCatalog
 		} while (bSelectSymbolNotInList);
 		math_EditSymbolsDlgAdd.click();
 		math_EditSymbolsDlg.ok();
-		sleep(1);
 		
 		// Verify if the symbol is added to Symbol set
 		math_SymbolsDlgEditButton.click();
@@ -138,7 +133,6 @@ public class AddDeleteSymbolsFromCatalog
 		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 		math_EditSymbolsDlgModify.click();
 		math_EditSymbolsDlg.ok();
-		sleep(1);
 		
 		// Verify if the font of symbol is modified successfully
 		math_SymbolsDlgEditButton.click();
@@ -167,7 +161,6 @@ public class AddDeleteSymbolsFromCatalog
 		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 		math_EditSymbolsDlgModify.click();
 		math_EditSymbolsDlg.ok();
-		sleep(1);
 		
 		// Verify if the typeface of symbol is modified successfully
 		math_SymbolsDlgEditButton.click();
@@ -191,7 +184,6 @@ public class AddDeleteSymbolsFromCatalog
 		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 		math_EditSymbolsDlgDelete.click();
 		math_EditSymbolsDlg.ok();
-		sleep(1);
 		
 		// Verify if the selected symbol is deleted successfully
 		math_SymbolsDlgEditButton.click();

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -49,12 +49,10 @@ public class InputCharacterFromCatalogDl
 		app.start();
 		
 		// New a formula document
-		startcenter.menuItem("File->New->Formula").select();
-		sleep(3);		
+		app.dispatch("private:factory/smath");	
 		
 		// Click catalog button
 		math_CatalogButton.click();
-		sleep(1);
 		
 		// Verify if the "Symbols" dialog pop up
 		assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3));
@@ -73,22 +71,19 @@ public class InputCharacterFromCatalogDl
 	public void testInputGreekFromCatalog() throws Exception{
 		
 		// Select "Greek", click "Edit" button to get the selected Symbol
-		math_SymbolsDlgListbox.select("Greek");
+		math_SymbolsDlgListbox.select(0);
 		math_SymbolsDlgEditButton.click();
-		sleep(1);
 		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 		math_EditSymbolsDlg.ok();
-		sleep(1);		
 		
 		// Insert the selected symbol
 		math_SymbolsDlgInsertButton.click();
 		math_SymbolsDlgCloseButton.click();
 		
 		// Verify if the symbol is inserted successfully
-		math_EditWindow.activate();
-		math_EditWindow.menuItem("Edit->Select All").select();
-		math_EditWindow.menuItem("Edit->Copy").select();
-		sleep(1);
+		math_EditWindow.click(5, 5);
+		app.dispatch(".uno:Select");
+		app.dispatch(".uno:Copy");
 		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard());	// add "%" in the front, add " " in the end
 		
 		// Close all dialogs
@@ -103,12 +98,10 @@ public class InputCharacterFromCatalogDl
 	public void testInputIGreekFromCatalog() throws Exception{
 		
 		// Select "iGreek", click "Edit" button to get the selected Symbol
-		math_SymbolsDlgListbox.select("iGreek");
+		math_SymbolsDlgListbox.select(1);
 		math_SymbolsDlgEditButton.click();
-		sleep(1);
 		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 		math_EditSymbolsDlg.ok();
-		sleep(1);		
 		
 		// Insert the selected symbol
 		math_SymbolsDlgInsertButton.click();
@@ -116,9 +109,8 @@ public class InputCharacterFromCatalogDl
 		
 		// Verify if the symbol is inserted successfully
 		math_EditWindow.click(5, 5);
-		math_EditWindow.menuItem("Edit->Select All").select();
-		math_EditWindow.menuItem("Edit->Copy").select();
-		sleep(1);
+		app.dispatch(".uno:Select");
+		app.dispatch(".uno:Copy");
 		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard());	// add "%" in the front, add " " in the end
 		
 		// Close all dialogs
@@ -133,21 +125,19 @@ public class InputCharacterFromCatalogDl
 	public void testInputSpecialFromCatalog() throws Exception{
 		
 		// Select "Special", "Insert" the default first symbol
-		math_SymbolsDlgListbox.select("Special");
+		math_SymbolsDlgListbox.select(2);
 		math_SymbolsDlgInsertButton.click();	
 		
 		// Click "Edit" button to get the selected Symbol
 		math_SymbolsDlgEditButton.click();
-		sleep(1);
 		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
 		math_EditSymbolsDlg.ok();
 		math_SymbolsDlgCloseButton.click();
 		
 		// Verify if the symbol is inserted successfully
 		math_EditWindow.click(5, 5);
-		math_EditWindow.menuItem("Edit->Select All").select();
-		math_EditWindow.menuItem("Edit->Copy").select();
-		sleep(1);
+		app.dispatch(".uno:Select");
+		app.dispatch(".uno:Copy");
 		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard());	// add "%" in the front, add " " in the end
 		
 		// Close all dialogs

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -29,13 +29,13 @@ package testcase.gui.formula.importexpor
 import static testlib.gui.AppUtil.*;
 import static testlib.gui.UIMap.*;
 import static org.junit.Assert.*;
+import static org.openoffice.test.common.Testspace.*;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.Ignore;
 import org.openoffice.test.common.FileUtil;
-import org.openoffice.test.common.Testspace;
-
 import testlib.gui.Log;
 
 /**
@@ -49,6 +49,9 @@ public class CreateFormulaInDifferentWay
 	@Before
 	public void setUp() throws Exception {
 		app.start();
+		
+		// New a formula document
+		app.dispatch("private:factory/smath");
 	}
 
 	@After
@@ -62,24 +65,14 @@ public class CreateFormulaInDifferentWay
 	 */
 	@Test
 	public void testElementsWindowActive() throws Exception{
-		
-		// New a formula document
-		startcenter.menuItem("File->New->Formula").select();
-		sleep(3);		
-		
+
 		// Check if the "View->Elements" menu is selected
-		math_EditWindow.menuItem("View").select();
-		boolean viewElements = math_EditWindow.menuItem("View->Elements").isSelected();
-		
-		// If the menu is selected, the Elements window should display
-		assertEquals("Elements window displays correctly", viewElements, math_ElementsWindow.exists());
+		boolean viewElements = math_ElementsWindow.exists();
+
+		// Active or inactive the Elements window
+		app.dispatch(".uno:ToolBox");
 		
-		// Active or inactive the Elements window, it should display correctly
-		math_EditWindow.menuItem("View->Elements").select();
-		sleep(1);
-		math_EditWindow.menuItem("View").select();
-		viewElements = math_EditWindow.menuItem("View->Elements").isSelected();
-		assertEquals("Elements window display correctly", viewElements, math_ElementsWindow.exists());
+		assertNotSame("Elements window active/inactive failed", viewElements, math_ElementsWindow.exists());
 	}
 	
 	/**
@@ -88,51 +81,41 @@ public class CreateFormulaInDifferentWay
 	 */
 	@Test
 	public void testCreateFormulaFromElementsWindow() throws Exception{
-		String saveTo = Testspace.getPath("temp/" + "FormulaFromElements.odf");
-		
-		// New a formula document
-		startcenter.menuItem("File->New->Formula").select();
-		sleep(3);
+		String saveTo = getPath("temp/" + "FormulaFromElements.odf");
 
 		// Make Elements window pop up
-		math_EditWindow.menuItem("View").select();
-		if (!math_EditWindow.menuItem("View->Elements").isSelected()) {
-			math_EditWindow.menuItem("View->Elements").select();			
+		if (!math_ElementsWindow.exists()) {
+			app.dispatch(".uno:ToolBox");
 		}
-		math_EditWindow.click(1, 1);
 		
 		// Click a formula in Elements window and edit the formula in the commands window
 		math_ElementsRelations.click();
 		math_ElementsRelationsNotEqual.click();
-		sleep(0.5);
 		typeKeys("a");
-		math_EditWindow.menuItem("Edit->Next Marker").select();
-		sleep(0.5);
+		app.dispatch(".uno:NextMark");
 		typeKeys("b");
 		String insertedFormula = "a <> b";
 		
 		// Verify if the formula is correct
 		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
-		sleep(1);		
 		assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard());	// add " "
 		
 		// Save the formula
-		math_EditWindow.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);
 		
 		// Close and reopen it
-		math_EditWindow.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		math_EditWindow.waitForExistence(10, 2);	
 		
 		// Verify if the formula still exists in the file, and correct
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
-		sleep(1);
 		assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard());	// add " "
 		
 		// Close all dialogs
@@ -145,11 +128,7 @@ public class CreateFormulaInDifferentWay
 	 */
 	@Test
 	public void testCreateFormulaFromRightClickMenu() throws Exception{
-		String saveTo = Testspace.getPath("temp/FormulaFromRightClickMenu.odf");
-		
-		// New a formula document
-		startcenter.menuItem("File->New->Formula").select();
-		sleep(3);
+		String saveTo = getPath("temp/" + "FormulaFromRightClickMenu.odf");
 		
 		// Right click in equation editor, choose "Functions->More->arcsin(x)", input a
 		math_EditWindow.rightClick(5, 5);
@@ -158,37 +137,34 @@ public class CreateFormulaInDifferentWay
 		typeKeys("<down>");
 		typeKeys("<down>");
 		typeKeys("<enter>");
-		sleep(0.5);
 		typeKeys("<up>");
 		typeKeys("<enter>");
-		sleep(0.5);
 		typeKeys("<enter>");
-		sleep(0.5);
 		typeKeys("a");
+		sleep(2);	// If no sleep, error occur on mac
 		String insertedFormula = "arcsin(a)";
 		
 		// Verify if the formula is correct
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
-		sleep(1);		
+
 		assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard());	// add " "
 		
 		// Save the formula
-		math_EditWindow.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);
 		
 		// Close and reopen it
-		math_EditWindow.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		math_EditWindow.waitForExistence(10, 2);	
 		
 		// Verify if the formula still exists in the file, and correct
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
-		sleep(1);
 		assertEquals("The inserted formula into math", insertedFormula.concat(" "), app.getClipboard());	// add " "
 				
 		// Close all dialogs
@@ -199,35 +175,28 @@ public class CreateFormulaInDifferentWay
 	 * Test undo/redo in math
 	 * @throws Exception
 	 */
-	@Test
+	@Ignore("Bug 119077 - defect in windows only")
 	public void testUndoRedoInMath() throws Exception{
-		
-		// New a formula document
-		startcenter.menuItem("File->New->Formula").select();
-		sleep(3);
 
-		// Make Elements window pop up (For AOO3.4: View->Elements)
-		math_EditWindow.menuItem("View").select();
-		if (!math_EditWindow.menuItem("View->Elements").isSelected()) {
-			math_EditWindow.menuItem("View->Elements").select();			
+		// Make Elements window pop up
+		if (!math_ElementsWindow.exists()) {
+			app.dispatch(".uno:ToolBox");
 		}
-		math_EditWindow.click(1, 1);
 		
 		// Click a formula in Elements window and edit the formula in the commands window
 		math_ElementsUnaryBinary.click();
 		math_ElementsUnaryBinaryPlus.click();
-		sleep(1);
 		typeKeys("a");	// "+a";
 		
 		// Undo and verify if it works fine
-		math_EditWindow.menuItem("Edit->Undo: Insert").select();
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Undo");
+		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
 		assertEquals("The inserted formula into math", "+<?> ", app.getClipboard());	// add " "	
 		
 		// Redo and verify if it works fine
-		math_EditWindow.menuItem("Edit->Redo: Insert").select();
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Redo");
+		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
 		assertEquals("The inserted formula into math", "+a ", app.getClipboard());	// add " "		
 	}

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -49,7 +49,8 @@ public class ChartDialogSetting {
 		app.start();
 
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc");
+		app.dispatch(".uno:InsertObjectChart");
 	}
 
 	@After
@@ -64,7 +65,6 @@ public class ChartDialogSetting {
 	 */
 	@Test
 	public void testChartDialogCancelBack() {
-		calc.menuItem("Insert->Chart...").select();
 		WizardNextButton.click();
 		assertTrue(ChartRangeChooseTabPage.isEnabled());
 		WizardBackButton.click();
@@ -72,14 +72,4 @@ public class ChartDialogSetting {
 		Chart_Wizard.cancel();
 		assertFalse(Chart_Wizard.exists());
 	}
-
-	/**
-	 * Verify Chart Wizard dialog title words
-	 */
-	@Test
-	public void testChartWizardTitle() {
-		calc.menuItem("Insert->Chart...").select();
-		assertEquals("Chart Wizard",Chart_Wizard.getText());
-		Chart_Wizard.cancel();
-	}
 }

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -52,7 +52,7 @@ public class Fitler {
 		app.start();
 
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc");
 	}
 
 	@After
@@ -62,7 +62,7 @@ public class Fitler {
 
 	/**
 	 * 
-	 * Verify Chart Wizard dialog title words
+	 * Verify 2+ won't be treated as 2
 	 */
 	@Ignore("Bug 120076")
 	public void testAutoFilterWithPlusSign() {

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -60,14 +60,20 @@ public class InsertSheet {
 	@Test
 	public void testInsertMultipleSheet(){
 		//Open Insert Sheet dialog via main menu Insert-> Sheet
-		calc.menuItem("Insert->Sheet...").select();
+		app.dispatch(".uno:Insert");
 		//Change new sheet number into 3 to insert 3 new sheet one time
 		SCSheetNumber.setText("3");
 		//Click OK button to create sheet with default setting
 		SCInsertSheetDlg.ok();
 		//Verify new sheets have been inserted before Sheet1
-		calc.menuItem("Edit->Sheet->Select...").select();
-		assertArrayEquals(new String[] { "Sheet4", "Sheet5", "Sheet6", "Sheet1", "Sheet2", "Sheet3" }, SCSheetsList.getItemsText());
+		app.dispatch(".uno:SelectTables");
+		// To support multi-language, just verify the number in the sheet name
+		assertTrue(SCSheetsList.getItemsText()[0].contains("4"));
+		assertTrue(SCSheetsList.getItemsText()[1].contains("5"));
+		assertTrue(SCSheetsList.getItemsText()[2].contains("6"));
+		assertTrue(SCSheetsList.getItemsText()[3].contains("1"));
+		assertTrue(SCSheetsList.getItemsText()[4].contains("2"));
+		assertTrue(SCSheetsList.getItemsText()[5].contains("3"));
 		SCSelectSheetsDlg.ok();
 	}
 
@@ -78,12 +84,16 @@ public class InsertSheet {
 	@Test
 	public void testInsertOneSheet(){
 		//Open Insert Sheet dialog via main menu Insert-> Sheet
-		calc.menuItem("Insert->Sheet...").select();
+		app.dispatch(".uno:Insert");
 		//Click OK button to create sheet with default setting
 		SCInsertSheetDlg.ok();
 		//Verify new sheet has been inserted before Sheet1
-		calc.menuItem("Edit->Sheet->Select...").select();
-		assertArrayEquals(new String[]{"Sheet4", "Sheet1", "Sheet2", "Sheet3"},SCSheetsList.getItemsText());
+		app.dispatch(".uno:SelectTables");
+		// To support multi-language, just verify the number in the sheet name
+		assertTrue(SCSheetsList.getItemsText()[0].contains("4"));
+		assertTrue(SCSheetsList.getItemsText()[1].contains("1"));
+		assertTrue(SCSheetsList.getItemsText()[2].contains("2"));
+		assertTrue(SCSheetsList.getItemsText()[3].contains("3"));
 		SCSelectSheetsDlg.ok();
 	}
 }

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -54,7 +54,7 @@ public class SortDialogSetting {
 		app.start();
 
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc");
 	}
 
 	@After
@@ -90,7 +90,7 @@ public class SortDialogSetting {
 		app.dispatch(".uno:ChangeCaseToLower");	// In case SC capitalize first letter automatically
 
 		// "Data->Sort...", choose "Ascending", check "Case sensitive"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_CaseSensitive.check();
 		SortOptionsPage.ok();		
@@ -99,21 +99,21 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result", expectedSortedResult, CalcUtil.getCellTexts("A2:A6"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A2:A6"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult, CalcUtil.getCellTexts("A2:A6"));
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "RowsSortWithOptionsCaseSensitive.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Saved sorted result", expectedSortedResult, CalcUtil.getCellTexts("A2:A6"));
@@ -149,7 +149,7 @@ public class SortDialogSetting {
 		typeKeys("D<down>FLK<down>E<down>BC<down>GE<down>AB");
 
 		// Data->Sort..., choose "Ascending", check "Copy sort results to:"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_CopyResultTo.check();
 		SortOptionsPage_CopyResultToEdit.setText("$Sheet3.$A4");
@@ -159,20 +159,20 @@ public class SortDialogSetting {
 		assertArrayEquals("Copy sorted result to", expectedSortedResult, CalcUtil.getCellTexts("$Sheet3.$A4:$B9"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertEquals("Undo sorted result", "", CalcUtil.getCellText("$Sheet3.$A4"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult, CalcUtil.getCellTexts("$Sheet3.$A4:$B9"));
 
 		// Move focus to sheet2 then select a cell range, Insert->Names->Define...
 		CalcUtil.selectRange("$Sheet2.$A1:$B3");
-		calc.menuItem("Insert->Names->Define...").select();
+		app.dispatch(".uno:DefineName");
 		DefineNamesDlg_NameEdit.setText("cellRange");
 		DefineNamesDlg.ok();
 
 		// Set focus to the original data, Data->Sort...
 		CalcUtil.selectRange("$Sheet1.$B1");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_CopyResultTo.check();
 		SortOptionsPage_CopyResultToCellRange.select("cellRange");
@@ -182,21 +182,21 @@ public class SortDialogSetting {
 		assertArrayEquals("Copy sorted result to cell range", expectedSortedResult, CalcUtil.getCellTexts("$Sheet2.$A1:$B6"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertEquals("Undo sorted result", "", CalcUtil.getCellText("$Sheet2.$A1"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult, CalcUtil.getCellTexts("$Sheet2.$A1:$B6"));
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "RowsSortWithOptionsCopyResultTo.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Saved sorted result", expectedSortedResult, CalcUtil.getCellTexts("$Sheet3.$A4:$B9"));
@@ -241,36 +241,36 @@ public class SortDialogSetting {
 		typeKeys("D<down>FLK<down>E<down>BC<down>GE<down>AB");
 
 		// "Data->Sort...", choose "Ascending", sort first by Column B
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortPage_Ascending1.check();
-		SortPage_By1.select("Column B");
+		SortPage_By1.select(2);	// "Column B"
 		SortPage.ok();
 
 		// Verify sorted result
 		assertArrayEquals("Sorted result", expectedResultSortByColumnBAscending, CalcUtil.getCellTexts("A1:B6"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:B6"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultSortByColumnBAscending, CalcUtil.getCellTexts("A1:B6"));
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortCriteriaSortFirstBy.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen, "Data->Sort...", choose "Descending", sort first by Column A
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortPage_Descending1.check();
-		SortPage_By1.select("Column A");
+		SortPage_By1.select(1);	// "Column A"
 		SortPage.ok();		
 
 		// Verify sorted result
@@ -315,37 +315,37 @@ public class SortDialogSetting {
 		typeKeys("D<down>FLK<down>E<down>AB<down>GE<down>AB");
 
 		// "Data->Sort...", choose "Ascending", sort first by Column B
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortPage_Ascending1.check();
-		SortPage_By1.select("Column B");
+		SortPage_By1.select(2);	// "Column B"
 		SortPage.ok();
 
 		// Verify sorted result
 		assertArrayEquals("Sorted result", expectedResultSortFirstByB, CalcUtil.getCellTexts("A1:B6"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:B6"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultSortFirstByB, CalcUtil.getCellTexts("A1:B6"));
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortCriteriaSortSecondBy.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen, "Data->Sort...", sort first by Column B "Ascending", sort second by Column A "Descending"
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
-		calc.menuItem("Data->Sort...").select();
-		SortPage_By1.select("Column B");
+		app.dispatch(".uno:DataSort");
+		SortPage_By1.select(2);	// "Column B"
 		SortPage_Ascending1.check();
-		SortPage_By2.select("Column A");
+		SortPage_By2.select(1);	// "Column A"
 		SortPage_Descending2.check();
 		SortPage.ok();
 
@@ -411,11 +411,10 @@ public class SortDialogSetting {
 		typeKeys("AB<down>FLK<down>E<down>AB<down>GE<down>AB<down>EFYU<down>DS<down>AB");
 		CalcUtil.selectRange("C1");
 		typeKeys("2<down>5<down>4<down>1<down>6<down>2<down>7<down>8<down>1");
-		sleep(0.5);
 
 		// "Data->Sort...", choose "Ascending", sort first by Column B
-		calc.menuItem("Data->Sort...").select();
-		SortPage_By1.select("Column B");
+		app.dispatch(".uno:DataSort");
+		SortPage_By1.select(2);	// "Column B"
 		SortPage_Ascending1.check();
 		SortPage.ok();
 
@@ -423,28 +422,28 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result", expectedResultSortFirstByB, CalcUtil.getCellTexts("A1:C9"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:C9"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultSortFirstByB, CalcUtil.getCellTexts("A1:C9"));
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortCriteriaSortThirdBy.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen, "Data->Sort...", sort first by Column B "Ascending", sort second by Column C "Descending"
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
-		calc.menuItem("Data->Sort...").select();
-		SortPage_By1.select("Column B");
+		app.dispatch(".uno:DataSort");
+		SortPage_By1.select(2);	// "Column B"
 		SortPage_Ascending1.check();
-		SortPage_By2.select("Column C");
+		SortPage_By2.select(3);	// "Column C"
 		SortPage_Descending2.check();
 		SortPage.ok();
 
@@ -452,12 +451,12 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result", expectedResultSortSecondByC, CalcUtil.getCellTexts("A1:C9"));
 
 		// "Data->Sort...", sort first by Column B "Ascending", sort second by Column C "Descending", sort third by Column A "Descending"
-		calc.menuItem("Data->Sort...").select();
-		SortPage_By1.select("Column B");
+		app.dispatch(".uno:DataSort");
+		SortPage_By1.select(2);	// "Column B"
 		SortPage_Ascending1.check();
-		SortPage_By2.select("Column C");
+		SortPage_By2.select(3);	// "Column C"
 		SortPage_Descending2.check();
-		SortPage_By3.select("Column A");
+		SortPage_By3.select(1);	// "Column A"
 		SortPage_Descending3.check();
 		SortPage.ok();
 
@@ -465,21 +464,21 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result", expectedResultSortThirdByA, CalcUtil.getCellTexts("A1:C9"));	
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", expectedResultSortSecondByC, CalcUtil.getCellTexts("A1:C9"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultSortThirdByA, CalcUtil.getCellTexts("A1:C9"));
 
 		// Save and close document
 		saveTo = getPath("temp/" + "SortCriteriaSortThirdBy1.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify data sort is not lost
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Saved sorted result", expectedResultSortThirdByA, CalcUtil.getCellTexts("A1:C9"));	
@@ -515,12 +514,12 @@ public class SortDialogSetting {
 		// Click "Copy" button, "OK", close the document		
 		OptionsDlg_SortListsTabCopy.click();
 		OptionsDlg.ok();
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		MsgBox_AdditionalRowsNotSaved.no();
 		// Dependencies end
 
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc");
 
 		// Input some data
 		String[][] data = new String[][] {
@@ -557,12 +556,12 @@ public class SortDialogSetting {
 
 		// "Data->Sort...", "Options" tab, check "Range contains column labels", no custom sort order, "Ascending", sort first by Color
 		CalcUtil.selectRange("A1:A7");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_CustomSortOrder.uncheck();
 		SortPage.select();
-		SortPage_By1.select("Color");
+		SortPage_By1.select(1);	// "Color"
 		SortPage_Ascending1.check();
 		SortPage.ok();	
 
@@ -570,26 +569,28 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result without custom sort order", expectedResultNoCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultNoCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 
 		// Copy original data to sheet2
 		CalcUtil.selectRange("A1:A7");
-		calc.menuItem("Edit->Copy").select();
-		CalcUtil.selectRange("Sheet2.A1");
-		calc.menuItem("Edit->Paste").select();		
+		app.dispatch(".uno:Copy");
+		app.dispatch(".uno:SelectTables");
+		SCSheetsList.select(1);
+		SCSelectSheetsDlg.ok();
+		app.dispatch(".uno:Paste");	
 
 		// "Data->Sort...", "Options" tab, check "Range contains column labels", choose custom sort order, "Ascending", sort first by Color
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_CustomSortOrder.check();
 		SortOptionsPage_CustomSortOrderList.select("red,yellow,blue,green,white,black");
 		SortPage.select();
-		SortPage_By1.select("Color");
+		SortPage_By1.select(1);	// "Color"
 		SortPage_Ascending1.check();
 		SortPage.ok();	
 
@@ -597,25 +598,31 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result with custom sort order", expectedResultCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortOptionsCustomSortOrderPredefineFromCopyList.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
-		assertArrayEquals("Original data", data, CalcUtil.getCellTexts("$Sheet1.$A1:$A7"));
-		assertArrayEquals("Saved sorted result", expectedResultCustomSortOrder, CalcUtil.getCellTexts("$Sheet2.$A1:$A7"));
+		app.dispatch(".uno:SelectTables");
+		SCSheetsList.select(0);	// Sheet 1
+		SCSelectSheetsDlg.ok();
+		assertArrayEquals("Original data", data, CalcUtil.getCellTexts("$A1:$A7"));
+		app.dispatch(".uno:SelectTables");
+		SCSheetsList.select(1);	// Sheet 2
+		SCSelectSheetsDlg.ok();
+		assertArrayEquals("Saved sorted result", expectedResultCustomSortOrder, CalcUtil.getCellTexts("$A1:$A7"));
 	}	
 
 	/**
@@ -643,14 +650,12 @@ public class SortDialogSetting {
 		OptionsDlg_SortListsTabNew.click();
 		typeKeys("white,red,yellow,blue,green,black");
 		OptionsDlg_SortListsTabAdd.click();
-		sleep(0.5);
 		OptionsDlg.ok();
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		// Dependencies end
 
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
-		sleep(3);
+		app.dispatch("private:factory/scalc");
 
 		// Input some data
 		String[][] data = new String[][] {
@@ -687,12 +692,12 @@ public class SortDialogSetting {
 
 		// "Data->Sort...", "Options" tab, check "Range contains column labels", no custom sort order, "Ascending", sort first by Color
 		CalcUtil.selectRange("A1:A7");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_CustomSortOrder.uncheck();
 		SortPage.select();
-		SortPage_By1.select("Color");
+		SortPage_By1.select(1);	// "Color"
 		SortPage_Ascending1.check();
 		SortPage.ok();	
 
@@ -700,26 +705,28 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result without custom sort order", expectedResultNoCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultNoCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 
 		// Copy original data to sheet2
 		CalcUtil.selectRange("A1:A7");
-		calc.menuItem("Edit->Copy").select();
-		CalcUtil.selectRange("Sheet2.A1");
-		calc.menuItem("Edit->Paste").select();		
+		app.dispatch(".uno:Copy");
+		app.dispatch(".uno:SelectTables");
+		SCSheetsList.select(1);	// Sheet 2
+		SCSelectSheetsDlg.ok();
+		app.dispatch(".uno:Paste");	
 
 		// "Data->Sort...", "Options" tab, check "Range contains column labels", choose custom sort order, "Ascending", sort first by Color
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_CustomSortOrder.check();
 		SortOptionsPage_CustomSortOrderList.select("white,red,yellow,blue,green,black");
 		SortPage.select();
-		SortPage_By1.select("Color");
+		SortPage_By1.select(1);	// "Color"
 		SortPage_Ascending1.check();
 		SortPage.ok();	
 
@@ -727,27 +734,34 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result with custom sort order", expectedResultCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedResultCustomSortOrder, CalcUtil.getCellTexts("A1:A7"));
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortOptionsCustomSortOrderPredefineFromNewList.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
-		assertArrayEquals("Original data", data, CalcUtil.getCellTexts("$Sheet1.$A1:$A7"));
-		assertArrayEquals("Saved sorted result", expectedResultCustomSortOrder, CalcUtil.getCellTexts("$Sheet2.$A1:$A7"));
+		app.dispatch(".uno:SelectTables");
+		SCSheetsList.select(0);	// Sheet 1
+		SCSelectSheetsDlg.ok();
+		assertArrayEquals("Original data", data, CalcUtil.getCellTexts("$A1:$A7"));
+		app.dispatch(".uno:SelectTables");
+		SCSheetsList.select(1);	// Sheet 2
+		SCSelectSheetsDlg.ok();
+		assertArrayEquals("Saved sorted result", expectedResultCustomSortOrder, CalcUtil.getCellTexts("$A1:$A7"));
 	}	
 
+	
 	/**
 	 * Test sort options: sort columns, direction "Left to right"
 	 * @throws Exception
@@ -764,14 +778,15 @@ public class SortDialogSetting {
 		};
 		CalcUtil.selectRange("A1");
 		typeKeys("Units<right>7<right>27<right>4<right>12<right>3<right>6");
+		sleep(1);	// If no sleep, some strings lost
 
 		// "Data->Sort...", check "Range contains column labels", "Left to right", sort first by"Units", "Ascending"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_LeftToRight.check();
 		SortPage.select();
-		SortPage_By1.select("Units");
+		SortPage_By1.select(1);	// Choose "Units"
 		SortPage_Ascending1.check();
 		SortPage.ok();		
 
@@ -779,21 +794,21 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result", expectedSortedResult, CalcUtil.getCellTexts("A1:G1"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data, CalcUtil.getCellTexts("A1:G1"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult, CalcUtil.getCellTexts("A1:G1"));
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortOptionsDirectionSortColumns.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Saved sorted result", expectedSortedResult, CalcUtil.getCellTexts("A1:G1"));
@@ -838,7 +853,6 @@ public class SortDialogSetting {
 
 		// Input source data
 		String file = prepareData("sc/SortOptionsIncludeFormats.ods");
-		//		String file = testFile("sc/FFC252FFCSC_XML_Datarange0235.xls");
 		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(file);
 		calc.waitForExistence(10, 2);
@@ -888,12 +902,12 @@ public class SortDialogSetting {
 		//		FormatCellsDlg_NumbersPage.ok();	
 
 		// "Data->Sort...", check "Range contains column labels", check "Include formats", sort first by "Units", "Ascending"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_IncludeFormats.check();
 		SortPage.select();
-		SortPage_By1.select("Units");
+		SortPage_By1.select(1);	// "Units"
 		SortPage_Ascending1.check();
 		SortPage.ok();		
 
@@ -901,25 +915,25 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result include formats", expectedSortedResultIncludeFormat, CalcUtil.getCellTexts("A1:A7"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", dataWithCurrencyFormats, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResultIncludeFormat, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 
 		// Copy the original data to sheet2
 		CalcUtil.selectRange("A1:A7");
-		calc.menuItem("Edit->Copy").select();
+		app.dispatch(".uno:Copy");
 		CalcUtil.selectRange("Sheet2.A1");
-		calc.menuItem("Edit->Paste").select();		
+		app.dispatch(".uno:Paste");	
 
 		// "Data->Sort...", check "Range contains column labels", uncheck "Include formats", sort first by "Units", "Ascending"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_IncludeFormats.uncheck();
 		SortPage.select();
-		SortPage_By1.select("Units");
+		SortPage_By1.select(1);	// "Units"
 		SortPage_Ascending1.check();
 		SortPage.ok();		
 
@@ -927,21 +941,21 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result exclude formats", expectedSortedResultExcludeFormat, CalcUtil.getCellTexts("A1:A7"));	
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", dataWithCurrencyFormats, CalcUtil.getCellTexts("A1:A7"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResultExcludeFormat, CalcUtil.getCellTexts("A1:A7"));
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortOptionsIncludeFormats.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Original data", dataWithCurrencyFormats, CalcUtil.getCellTexts("$Sheet1.$A1:$A7"));
@@ -989,13 +1003,14 @@ public class SortDialogSetting {
 		};
 		CalcUtil.selectRange("A1");
 		typeKeys("D<down>C<down>B<down>A<down>E");
+		sleep(1);	// If no sleep, some strings lost
 
 		// "Data->Sort...", uncheck "Range contains column labels", sort first by "Column A", "Ascending"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.uncheck();
 		SortPage.select();
-		SortPage_By1.select("Column A");
+		SortPage_By1.select(1);	// "Column A"
 		SortPage_Ascending1.check();
 		SortPage.ok();		
 
@@ -1003,9 +1018,9 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result", expectedSortedResult1, CalcUtil.getCellTexts("A1:A5"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data1, CalcUtil.getCellTexts("A1:A5"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult1, CalcUtil.getCellTexts("A1:A5"));
 
 		// Input data2 into same sheet, data1 and data2 are not overlapped
@@ -1014,13 +1029,13 @@ public class SortDialogSetting {
 
 		// Focus on data2, "Data->Sort...", "Copy result to" partially overlap with data1, sort first by "Column G", "Ascending"
 		CalcUtil.selectRange("G10");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.uncheck();
 		SortOptionsPage_CopyResultTo.check();
 		SortOptionsPage_CopyResultToEdit.setText("A4");
 		SortPage.select();
-		SortPage_By1.select("Column G");
+		SortPage_By1.select(1);	// "Column G"
 		SortPage_Ascending1.check();
 		SortPage.ok();			
 
@@ -1029,14 +1044,14 @@ public class SortDialogSetting {
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortOptionsMultipleSortDataOverlap.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Saved sorted result", expectedSortedResultDataOverlap, CalcUtil.getCellTexts("A1:A8"));
@@ -1083,15 +1098,16 @@ public class SortDialogSetting {
 		};
 		CalcUtil.selectRange("A1");
 		typeKeys("D<down>C<down>B<down>A<down>E");
+		sleep(1);	// If no sleep, some strings lost
 
 		// "Data->Sort...", uncheck "Range contains column labels", check "Case sensitive" and "Include formats", sort first by "Column A", "Ascending"
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.uncheck();
 		SortOptionsPage_CaseSensitive.check();
 		SortOptionsPage_IncludeFormats.check();
 		SortPage.select();
-		SortPage_By1.select("Column A");
+		SortPage_By1.select(1);	// "Column A"
 		SortPage_Ascending1.check();
 		SortPage.ok();		
 
@@ -1099,9 +1115,9 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result1", expectedSortedResult1, CalcUtil.getCellTexts("A1:A5"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data1, CalcUtil.getCellTexts("A1:A5"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult1, CalcUtil.getCellTexts("A1:A5"));
 
 		// Input data2 into same sheet, data1 and data2 are not overlapped
@@ -1110,13 +1126,13 @@ public class SortDialogSetting {
 
 		// Focus on data2, "Data->Sort...", check "Range contains column labels", uncheck "Case sensitive" and "Include formats", sort first by "Numbers", "Ascending"
 		CalcUtil.selectRange("G10");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.check();
 		SortOptionsPage_CaseSensitive.uncheck();
 		SortOptionsPage_IncludeFormats.uncheck();
 		SortPage.select();
-		SortPage_By1.select("Numbers");
+		SortPage_By1.select(1);	// "Numbers"
 		SortPage_Ascending1.check();
 		SortPage.ok();			
 
@@ -1124,13 +1140,13 @@ public class SortDialogSetting {
 		assertArrayEquals("Sorted result2", expectedSortedResult2, CalcUtil.getCellTexts("G10:G15"));
 
 		// Uodo/redo
-		calc.menuItem("Edit->Undo: Sort").select();
+		app.dispatch(".uno:Undo");
 		assertArrayEquals("Undo sorted result", data2, CalcUtil.getCellTexts("G10:G15"));
-		calc.menuItem("Edit->Redo: Sort").select();
+		app.dispatch(".uno:Redo");
 		assertArrayEquals("Redo sorted result", expectedSortedResult2, CalcUtil.getCellTexts("G10:G15"));
 
 		// Open sort dialog, check its setting
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		assertTrue("Range contains column labels should be checked", SortOptionsPage_RangeContainsColumnLabels.isChecked());
 		assertFalse("Case sensitive should not be checked", SortOptionsPage_CaseSensitive.isChecked());
@@ -1139,19 +1155,19 @@ public class SortDialogSetting {
 
 		// Save and close document
 		String saveTo = getPath("temp/" + "SortOptionsMultipleSortParameterSaved.ods");
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 
 		// Reopen and verify sorted result and sort parameters
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		assertArrayEquals("Saved sorted result1", expectedSortedResult1, CalcUtil.getCellTexts("A1:A5"));
 		assertArrayEquals("Saved sorted result2", expectedSortedResult2, CalcUtil.getCellTexts("G10:G15"));
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortOptionsPage.select();
 		assertTrue("Range contains column labels should be checked", SortOptionsPage_RangeContainsColumnLabels.isChecked());
 		assertFalse("Case sensitive should not be checked", SortOptionsPage_CaseSensitive.isChecked());

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -51,11 +51,11 @@ public class SubtotalsFunctions {
 	public void setUp() throws Exception {
 		app.start();
 		String file = prepareData("sc/SubtotalsSampleFile.ods");
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(file);
 		sleep(2);
 		CalcUtil.selectRange("A1:E7");
-		calc.menuItem("Data->Subtotals...").select();
+		app.dispatch(".uno:DataSubTotals");
 	}
 
 	@After
@@ -64,14 +64,14 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Average function in SubTotals
 	 */
 	@Test
 	public void testAverage() {
-		SCSubTotalsGroupByListBox.select("Team");
+		SCSubTotalsGroupByListBox.select(4);	// "Team"
 		SCCalcSubTotalForColumns.click(10, 25);
-		SCCalcSubTotolsFuncionList.select("Average");
+		SCCalcSubTotolsFuncionList.select(2);	// "Average"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -82,13 +82,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Count Numbers only function in SubTotals
 	 */
 	@Test
 	public void testCountNumbersOnly() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("Count (numbers only)");
+		SCCalcSubTotolsFuncionList.select(6);	// "Count (numbers only)"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -99,13 +99,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Max Numbers function in SubTotals
 	 */
 	@Test
 	public void testMax() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("Max");
+		SCCalcSubTotolsFuncionList.select(3);	// "Max"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -116,13 +116,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Min Numbers function in SubTotals
 	 */
 	@Test
 	public void testMin() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("Min");
+		SCCalcSubTotolsFuncionList.select(4);	// "Min"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -133,13 +133,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Product function in SubTotals
 	 */
 	@Test
 	public void testProduct() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("Product");
+		SCCalcSubTotolsFuncionList.select(5);	// "Product"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -150,13 +150,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify StDevP (Population) function in SubTotals
 	 */
 	@Test
 	public void testStDevPPopulation() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("StDevP (Population)");
+		SCCalcSubTotolsFuncionList.select(8);	// "StDevP (Population)"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -167,13 +167,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify sum function in SubTotals
 	 */
 	@Test
 	public void testSum() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("Sum");
+		SCCalcSubTotolsFuncionList.select(0);	// "Sum"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -184,13 +184,13 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Var Sample function in SubTotals
 	 */
 	@Test
 	public void testVarSample() {
 		SCCalcSubTotalForColumns.click(10, 45);
-		SCCalcSubTotolsFuncionList.select("Var (Sample)");
+		SCCalcSubTotolsFuncionList.select(9);	// "Var (Sample)"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 
@@ -201,12 +201,12 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Don't sort in Sub totals
 	 */
 	@Test
 	public void testDoNotSortOption() {
-		SCSubTotalsGroupByListBox.select("Team");
+		SCSubTotalsGroupByListBox.select(4);	// "Team"
 		SCCalcSubTotalForColumns.click(10, 25);
 		SCSubTotalsOptionsTabPage.select();
 		SCSubtotalsPreSortToGroupCheckBox.uncheck();
@@ -220,7 +220,7 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify SubTotals Options default UI
 	 */
 	@Test
@@ -240,20 +240,20 @@ public class SubtotalsFunctions {
 	}
 
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Subtotals using all group
 	 */
 	@Test
 	public void testUsingAllGroup() {
 		SCSubTotalsGroup1Dialog.select();
-		SCSubTotalsGroupByListBox.select("Level");
+		SCSubTotalsGroupByListBox.select(1);	// "Level"
 		SCCalcSubTotalForColumns.click(10, 45);
 		SCSubTotalsGroup2Dialog.select();
-		SCSubTotalsGroupByListBox.select("Team");
+		SCSubTotalsGroupByListBox.select(4);	// "Team"
 		SCCalcSubTotalForColumns.click(10, 25);
-		SCCalcSubTotolsFuncionList.select("Max");
+		SCCalcSubTotolsFuncionList.select(3);	// "Max"
 		SCSubTotalsGroup3Dialog.select();
-		SCSubTotalsGroupByListBox.select("Name");
+		SCSubTotalsGroupByListBox.select(5);	// "Name"
 		SCCalcSubTotalForColumns.click(10, 25);
 		SCSubTotalsGroup1Dialog.select();
 		SCSubTotalsGroup1Dialog.ok();
@@ -270,7 +270,7 @@ public class SubtotalsFunctions {
 	
 	
 	/**
-	 * 
+	 * Just support en-US language
 	 * Verify Subtotals_Recalculate and refresh results when data rows deleted.
 	 */
 	@Test
@@ -285,7 +285,7 @@ public class SubtotalsFunctions {
 				{ "Grand Total", "", "21", "", "" } }, CalcUtil.getCellTexts("A1:E11"));
 		
 		CalcUtil.selectRange("A3:E3");
-		calc.menuItem("Edit->Delete Cells...").select();
+		app.dispatch(".uno:DeleteCell");
 		SCDeleteCellsDeleteRowsRadioButton.check();
 		SCDeleteCellsDialog.ok();
 		sleep(1);
@@ -298,14 +298,13 @@ public class SubtotalsFunctions {
 	}
 	
 	/**
-	 * 
 	 * Verify Recalculates when source data changed with Average function in SubTotals
 	 */
 	@Test
 	public void testRecalculateWhenDataChanged() {
-		SCSubTotalsGroupByListBox.select("Team");
+		SCSubTotalsGroupByListBox.select(4);	// "Team"
 		SCCalcSubTotalForColumns.click(10,25);
-		SCCalcSubTotolsFuncionList.select("Average");
+		SCCalcSubTotolsFuncionList.select(2);	// "Average"
 		SCSubTotalsGroup1Dialog.ok();
 		sleep(1);
 		

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -65,13 +65,13 @@ public class ValidityDateSupport1024Colu
 	 */
 	@Test
 	public void testValidityDateSupport1024Columns() {
-		startcenter.menuItem("File->New->Spreadsheet").select();
-		CalcUtil.selectRange("Sheet1.ALM1000:Sheet1.ALO1005");	
-		calc.menuItem("Data->Validity...").select();	
+		app.dispatch("private:factory/scalc");
+		CalcUtil.selectRange("ALM1000:ALO1005");	
+		app.dispatch(".uno:Validation");
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Date");
-		SC_ValidityDecimalCompareOperator.select("greater than");
+		SC_ValidityCriteriaAllowList.select(3);	// "Date"
+		SC_ValidityDecimalCompareOperator.select(2);	// "greater than"
 		SC_ValiditySourceInput.setText("01/01/08");
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
@@ -79,29 +79,29 @@ public class ValidityDateSupport1024Colu
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.ALM1001");
+		CalcUtil.selectRange("ALM1001");
 		SC_InputBar_Input.activate();
 		typeKeys("02/01/08<enter>");
-		assertEquals("02/01/08",CalcUtil.getCellText("Sheet1.ALM1001"));
+		assertEquals("02/01/08",CalcUtil.getCellText("ALM1001"));
 
-		CalcUtil.selectRange("Sheet1.ALM1002");
+		CalcUtil.selectRange("ALM1002");
 		SC_InputBar_Input.activate();
 		typeKeys("01/02/08<enter>");
-		assertEquals("01/02/08",CalcUtil.getCellText("Sheet1.ALM1002"));
+		assertEquals("01/02/08",CalcUtil.getCellText("ALM1002"));
 
-		CalcUtil.selectRange("Sheet1.ALM1003");
+		CalcUtil.selectRange("ALM1003");
 		SC_InputBar_Input.activate();
 		typeKeys("01/01/08<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.ALM1003"));
+		assertEquals("",CalcUtil.getCellText("ALM1003"));
 
-		CalcUtil.selectRange("Sheet1.AML1003");
+		CalcUtil.selectRange("AML1003");
 		SC_InputBar_Input.activate();
 		typeKeys("12/31/07<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.AML1003"));
+		assertEquals("",CalcUtil.getCellText("AML1003"));
 	}
 }
 

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -44,8 +44,8 @@ public class ValidityDialogDefaultValue 
 		app.start();
 
 		// New a spreadsheet, open Validity dialog
-		startcenter.menuItem("File->New->Spreadsheet").select();
-		calc.menuItem("Data->Validity...").select();
+		app.dispatch("private:factory/scalc");
+		app.dispatch(".uno:Validation");
 	}
 
 	@After
@@ -60,7 +60,7 @@ public class ValidityDialogDefaultValue 
 	public void testValidityUICellRange() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Cell range");
+		SC_ValidityCriteriaAllowList.select(5);	// "Cell range"
 
 		assertEquals(true,SC_ValidityAllowBlankCells.isChecked());
 		assertEquals(true,SC_ValidityShowSelectionList.isChecked());
@@ -79,12 +79,12 @@ public class ValidityDialogDefaultValue 
 
 		SC_ValidityErrorAlertTabPage.select();
 		assertEquals(true,SC_ValidityErrorAlertActionList.isEnabled());
-		assertEquals("Stop",SC_ValidityErrorAlertActionList.getSelText());
+//		assertEquals("Stop",SC_ValidityErrorAlertActionList.getSelText());	// Do not test this. Do it in GVT.
 		assertEquals(true,SC_ValidityErrorMessageTitle.isEnabled());
 		assertEquals("",SC_ValidityErrorMessageTitle.getText());
 		assertEquals(true,SC_ValidityErrorMessage.isEnabled());
 		assertEquals("",SC_ValidityErrorMessage.getText());
-		SC_ValidityErrorAlertActionList.select("Macro");
+		SC_ValidityErrorAlertActionList.select(3);	// "Macro"
 		assertEquals(true,SC_ValidityErrorBrowseButton.isEnabled());
 	}
 



Mime
View raw message