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 [2/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
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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -55,9 +55,9 @@ public class ValidityDialogSetting {
 		app.start();
 
 		// New a spreadsheet, select cell range, open Validity dialog
-		startcenter.menuItem("File->New->Spreadsheet").select();
-		CalcUtil.selectRange("Sheet1.A1:C5");
-		calc.menuItem("Data->Validity...").select();
+		app.dispatch("private:factory/scalc");
+		CalcUtil.selectRange("A1:C5");
+		app.dispatch(".uno:Validation");
 	}
 
 	@After
@@ -71,8 +71,8 @@ public class ValidityDialogSetting {
 	@Test
 	public void testAllowDateNotBetween() {
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Date");
-		SC_ValidityDecimalCompareOperator.select("not between");
+		SC_ValidityCriteriaAllowList.select(3);	// "Date"
+		SC_ValidityDecimalCompareOperator.select(7);	// "not between"
 		SC_ValiditySourceInput.setText("01/01/08");
 		SC_ValidityMaxValueInput.setText("03/01/08");
 		SC_ValidityErrorAlertTabPage.select();
@@ -81,65 +81,65 @@ public class ValidityDialogSetting {
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("12/31/07");
 		typeKeys("<enter>");
-		assertEquals("12/31/07",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("12/31/07",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("03/02/08");
 		typeKeys("<enter>");
-		assertEquals("03/02/08",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("03/02/08",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A3");
+		CalcUtil.selectRange("A3");
 		SC_InputBar_Input.activate();
 		typeKeys("01/01/08");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A3"));
+		assertEquals("",CalcUtil.getCellText("A3"));
 
-		CalcUtil.selectRange("Sheet1.A4");
+		CalcUtil.selectRange("A4");
 		SC_InputBar_Input.activate();
 		typeKeys("03/01/08");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A4"));
+		assertEquals("",CalcUtil.getCellText("A4"));
 
-		CalcUtil.selectRange("Sheet1.A5");
+		CalcUtil.selectRange("A5");
 		SC_InputBar_Input.activate();
 		typeKeys("01/02/08");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A5"));
+		assertEquals("",CalcUtil.getCellText("A5"));
 
-		CalcUtil.selectRange("Sheet1.B1");
+		CalcUtil.selectRange("B1");
 		SC_InputBar_Input.activate();
 		typeKeys("02/29/08");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B1"));
+		assertEquals("",CalcUtil.getCellText("B1"));
 
-		CalcUtil.selectRange("Sheet1.B2");
+		CalcUtil.selectRange("B2");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B2"));
+		assertEquals("",CalcUtil.getCellText("B2"));
 
-		CalcUtil.selectRange("Sheet1.B3");
+		CalcUtil.selectRange("B3");
 		SC_InputBar_Input.activate();
 		typeKeys("39448");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B3"));
+		assertEquals("",CalcUtil.getCellText("B3"));
 	}
 
 	/**
@@ -149,8 +149,8 @@ public class ValidityDialogSetting {
 	public void testAllowDecimalEqual() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Decimal");
-		SC_ValidityDecimalCompareOperator.select("equal");
+		SC_ValidityCriteriaAllowList.select(2);	// "Decimal"
+		SC_ValidityDecimalCompareOperator.select(0);	// "equal"
 		SC_ValiditySourceInput.setText("0.33333333");
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
@@ -158,43 +158,43 @@ public class ValidityDialogSetting {
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("0.33333333");
 		typeKeys("<enter>");
-		assertEquals("0.33333333",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("0.33333333",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("=1/3");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A3");
+		CalcUtil.selectRange("A3");
 		SC_InputBar_Input.activate();
 		typeKeys("0.3");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A3"));
+		assertEquals("",CalcUtil.getCellText("A3"));
 
-		CalcUtil.selectRange("Sheet1.A4");
+		CalcUtil.selectRange("A4");
 		SC_InputBar_Input.activate();
 		typeKeys("0.333333333");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A4"));
+		assertEquals("",CalcUtil.getCellText("A4"));
 
-		CalcUtil.selectRange("Sheet1.B2");
+		CalcUtil.selectRange("B2");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B2"));
+		assertEquals("",CalcUtil.getCellText("B2"));
 	}
 
 	/**
@@ -204,8 +204,8 @@ public class ValidityDialogSetting {
 	public void testAllowGreaterTextLength() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Text length");
-		SC_ValidityDecimalCompareOperator.select("greater than or equal to");
+		SC_ValidityCriteriaAllowList.select(7);	// "Text length"
+		SC_ValidityDecimalCompareOperator.select(4);	// "greater than or equal to"
 		SC_ValiditySourceInput.setText("10");
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
@@ -213,33 +213,33 @@ public class ValidityDialogSetting {
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("testtesttesttest");
 		typeKeys("<enter>");
-		assertEquals("testtesttesttest",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("testtesttesttest",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("test test ");
 		typeKeys("<enter>");
-		assertEquals("test test ",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("test test ",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A4");
+		CalcUtil.selectRange("A4");
 		SC_InputBar_Input.activate();
 		typeKeys(" ");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A4"));
+		assertEquals("",CalcUtil.getCellText("A4"));
 
-		CalcUtil.selectRange("Sheet1.A3");
+		CalcUtil.selectRange("A3");
 		SC_InputBar_Input.activate();
 		typeKeys("Testatest");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A3"));
+		assertEquals("",CalcUtil.getCellText("A3"));
 	}
 
 	/**
@@ -248,11 +248,11 @@ public class ValidityDialogSetting {
 	@Ignore("Bug 93128")
 	public void testAllowLessThanTextLength() {
 
-		calc.menuItem("Data->Validity...").select();
+		app.dispatch(".uno:Validation");
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Text length");
-		SC_ValidityDecimalCompareOperator.select("less than");
+		SC_ValidityCriteriaAllowList.select(7);	// "Text length"
+		SC_ValidityDecimalCompareOperator.select(1);	// "less than"
 		SC_ValiditySourceInput.setText("10");
 
 		SC_ValidityInputHelpTabPage.select();
@@ -267,27 +267,27 @@ public class ValidityDialogSetting {
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("testtesttesttest<enter>");
 		ActiveMsgBox.ok();
-		assertEquals("testtesttesttest",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("testtesttesttest",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("sfsafsddddddd<enter>");
 		ActiveMsgBox.cancel();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("10<enter>");
-		assertEquals("10",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("10",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A3");
+		CalcUtil.selectRange("A3");
 		SC_InputBar_Input.activate();
 		typeKeys("ok<enter>");
-		assertEquals("ok",CalcUtil.getCellText("Sheet1.A3"));
+		assertEquals("ok",CalcUtil.getCellText("A3"));
 	}
 
 	/**
@@ -297,7 +297,7 @@ public class ValidityDialogSetting {
 	public void testAllowListSpecialChar() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("List");
+		SC_ValidityCriteriaAllowList.select(6);	// "List"
 		SC_ValidityEntries.focus();
 		typeKeys("a");
 		typeKeys("<enter>");
@@ -312,15 +312,16 @@ public class ValidityDialogSetting {
 		calc.rightClick(1, 1);
 		typeKeys("<shift s>");
 		typeKeys("<down><enter>");	// Choose a
-		assertEquals("a",CalcUtil.getCellText("Sheet1.A1"));
+		sleep(2);	// if no sleep, error occur
+		assertEquals("a",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.B2");
+		CalcUtil.selectRange("B2");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B2"));
+		assertEquals("",CalcUtil.getCellText("B2"));
 	}
 
 	/**
@@ -330,8 +331,8 @@ public class ValidityDialogSetting {
 	public void testAllowTimeBetween() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Time");
-		SC_ValidityDecimalCompareOperator.select("between");
+		SC_ValidityCriteriaAllowList.select(4);	// "Time"
+		SC_ValidityDecimalCompareOperator.select(6);	// "between"
 		SC_ValiditySourceInput.setText("27:00");
 		SC_ValidityMaxValueInput.setText("21:00");
 		SC_ValidityErrorAlertTabPage.select();
@@ -340,83 +341,83 @@ public class ValidityDialogSetting {
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("21:00");
 		typeKeys("<enter>");
-		assertEquals("09:00:00 PM",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("09:00:00 PM",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("27:00");
 		typeKeys("<enter>");
-		assertEquals("27:00:00",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("27:00:00",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A3");
+		CalcUtil.selectRange("A3");
 		SC_InputBar_Input.activate();
 		typeKeys("1.125");
 		typeKeys("<enter>");
-		assertEquals("1.125",CalcUtil.getCellText("Sheet1.A3"));
+		assertEquals("1.125",CalcUtil.getCellText("A3"));
 
-		CalcUtil.selectRange("Sheet1.A4");
+		CalcUtil.selectRange("A4");
 		SC_InputBar_Input.activate();
 		typeKeys("0.875");
 		typeKeys("<enter>");
-		assertEquals("0.875",CalcUtil.getCellText("Sheet1.A4"));
+		assertEquals("0.875",CalcUtil.getCellText("A4"));
 
-		CalcUtil.selectRange("Sheet1.B1");
+		CalcUtil.selectRange("B1");
 		SC_InputBar_Input.activate();
 		typeKeys("03:00:01");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B1"));
+		assertEquals("",CalcUtil.getCellText("B1"));
 
-		CalcUtil.selectRange("Sheet1.B2");
+		CalcUtil.selectRange("B2");
 		SC_InputBar_Input.activate();
 		typeKeys("20:59:59");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B2"));
+		assertEquals("",CalcUtil.getCellText("B2"));
 
-		CalcUtil.selectRange("Sheet1.B3");
+		CalcUtil.selectRange("B3");
 		SC_InputBar_Input.activate();
 		typeKeys("1.126");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B3"));
+		assertEquals("",CalcUtil.getCellText("B3"));
 
-		CalcUtil.selectRange("Sheet1.B4");
+		CalcUtil.selectRange("B4");
 		SC_InputBar_Input.activate();
 		typeKeys("0.874");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B4"));
+		assertEquals("",CalcUtil.getCellText("B4"));
 
-		CalcUtil.selectRange("Sheet1.C1");
+		CalcUtil.selectRange("C1");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.C1"));
+		assertEquals("",CalcUtil.getCellText("C1"));
 
-		CalcUtil.selectRange("Sheet1.C2");
+		CalcUtil.selectRange("C2");
 		SC_InputBar_Input.activate();
 		typeKeys("24:00");
 		typeKeys("<enter>");
-		assertEquals("24:00:00",CalcUtil.getCellText("Sheet1.C2"));
+		assertEquals("24:00:00",CalcUtil.getCellText("C2"));
 
-		CalcUtil.selectRange("Sheet1.C3");
+		CalcUtil.selectRange("C3");
 		SC_InputBar_Input.activate();
 		typeKeys("12:00");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.C3"));
+		assertEquals("",CalcUtil.getCellText("C3"));
 	}
 
 	/**
@@ -426,39 +427,39 @@ public class ValidityDialogSetting {
 	public void testAllowTimeGreaterThan() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Time");
-		SC_ValidityDecimalCompareOperator.select("greater than or equal to");
+		SC_ValidityCriteriaAllowList.select(4);	// "Time"
+		SC_ValidityDecimalCompareOperator.select(4);	// "greater than or equal to"
 		SC_ValiditySourceInput.setText("8:00");
 
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
-		SC_ValidityErrorAlertActionList.select("Warning");
+		SC_ValidityErrorAlertActionList.select(1);	// "Warning"
 
 		SC_ValidityErrorMessageTitle.setText("warning to enter");
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("7:30");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("07:30:00 AM",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("07:30:00 AM",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("6:00");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.cancel();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.A3");
+		CalcUtil.selectRange("A3");
 		SC_InputBar_Input.activate();
 		typeKeys("8:00");
 		typeKeys("<enter>");
-		assertEquals("08:00:00 AM",CalcUtil.getCellText("Sheet1.A3"));
+		assertEquals("08:00:00 AM",CalcUtil.getCellText("A3"));
 	}
 
 	/**
@@ -468,8 +469,8 @@ public class ValidityDialogSetting {
 	public void testAllowWholeNumLessThan() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Whole Numbers");
-		SC_ValidityDecimalCompareOperator.select("less than or equal");
+		SC_ValidityCriteriaAllowList.select(1);	// "Whole Numbers"
+		SC_ValidityDecimalCompareOperator.select(3);	// "less than or equal"
 		SC_ValiditySourceInput.setText("100");
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
@@ -477,41 +478,41 @@ public class ValidityDialogSetting {
 		SC_ValidityErrorMessage.setText("Invalid value");
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("99");
 		typeKeys("<enter>");
-		assertEquals("99",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("99",CalcUtil.getCellText("A1"));
 
-		CalcUtil.selectRange("Sheet1.A2");
+		CalcUtil.selectRange("A2");
 		SC_InputBar_Input.activate();
 		typeKeys("100");
 		typeKeys("<enter>");
-		assertEquals("100",CalcUtil.getCellText("Sheet1.A2"));
+		assertEquals("100",CalcUtil.getCellText("A2"));
 
-		CalcUtil.selectRange("Sheet1.B1");
+		CalcUtil.selectRange("B1");
 		SC_InputBar_Input.activate();
 		typeKeys("101");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B1"));
+		assertEquals("",CalcUtil.getCellText("B1"));
 
-		CalcUtil.selectRange("Sheet1.B2");
+		CalcUtil.selectRange("B2");
 		SC_InputBar_Input.activate();
 		typeKeys("45.5");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.B2"));
+		assertEquals("",CalcUtil.getCellText("B2"));
 
-		CalcUtil.selectRange("Sheet1.C1");
+		CalcUtil.selectRange("C1");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.C1"));
+		assertEquals("",CalcUtil.getCellText("C1"));
 	}
 
 	/**
@@ -521,23 +522,23 @@ public class ValidityDialogSetting {
 	public void testDefaultErrorAlertMessage() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Decimal");
-		SC_ValidityDecimalCompareOperator.select("equal");
+		SC_ValidityCriteriaAllowList.select(2);	// "Decimal"
+		SC_ValidityDecimalCompareOperator.select(0);	// "equal"
 		SC_ValiditySourceInput.setText("1");
 
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
-		SC_ValidityErrorAlertActionList.select("Stop");
+		SC_ValidityErrorAlertActionList.select(0);	// "Stop"
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("13");
 		typeKeys("<enter>");
 		assertEquals("OpenOffice.org Calc",ActiveMsgBox.getCaption());
-		assertEquals("Invalid value.",ActiveMsgBox.getMessage());
+//		assertEquals("Invalid value.",ActiveMsgBox.getMessage()); // Can not verify in multi-language
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("",CalcUtil.getCellText("A1"));
 	}
 
 	/**
@@ -547,20 +548,19 @@ public class ValidityDialogSetting {
 	public void testUncheckErrorAlert() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Decimal");
-		SC_ValidityDecimalCompareOperator.select("equal");
+		SC_ValidityCriteriaAllowList.select(2);	// "Decimal"
+		SC_ValidityDecimalCompareOperator.select(0);	// "equal"
 		SC_ValiditySourceInput.setText("1");
 
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.uncheck();
-		SC_ValidityErrorAlertActionList.select("Stop");
+		SC_ValidityErrorAlertActionList.select(0);	// "Stop"
 		SC_ValidityErrorAlertTabPage.ok();
 
-		CalcUtil.selectRange("Sheet1.A1");
-		SC_InputBar_Input.activate();
+		CalcUtil.selectRange("A1");
 		typeKeys("13");
 		typeKeys("<enter>");
-		assertEquals("13",CalcUtil.getCellText("Sheet1.A1"));
+		assertEquals("13",CalcUtil.getCellText("A1"));
 	}
 
 	/**
@@ -570,37 +570,39 @@ public class ValidityDialogSetting {
 	public void testValidityCellRangeSourcePicker() {
 
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Cell range");
+		SC_ValidityCriteriaAllowList.select(5);	// "Cell range"
 		SC_ValiditySourcePicker.click();
 		assertEquals(false,SC_ValidityCriteriaAllowList.exists());
-		SC_ValiditySourceInput.setText("$Sheet1.$E$2:$G$5");
+		SC_ValiditySourceInput.setText("$E$2:$G$5");
 		SC_ValiditySourcePicker.click();
 		assertEquals(true,SC_ValidityCriteriaAllowList.exists());
 
 		SC_ValidityErrorAlertTabPage.select();
 		SC_ValidityShowErrorMessage.check();
-		SC_ValidityErrorAlertActionList.select("Stop");
+		SC_ValidityErrorAlertActionList.select(0);	// "Stop"
+		SC_ValidityErrorMessageTitle.setText("Stop to enter");
+		SC_ValidityErrorMessage.setText("Invalid value.");
 		SC_ValidityErrorAlertTabPage.ok();
 
 		// calc.focus();
-		CalcUtil.selectRange("Sheet1.E2");
+		CalcUtil.selectRange("E2");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		SC_InputBar_Input.activate();
 		typeKeys("test32");
 		typeKeys("<enter>");
 		assertEquals("Invalid value.",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
-		assertEquals("",CalcUtil.getCellText("Sheet1.A1"));		
+		assertEquals("",CalcUtil.getCellText("A1"));		
 
-		CalcUtil.selectRange("Sheet1.B1");
+		CalcUtil.selectRange("B1");
 		SC_InputBar_Input.activate();
 		typeKeys("test");
 		typeKeys("<enter>");
-		assertEquals("test",CalcUtil.getCellText("Sheet1.B1"));
+		assertEquals("test",CalcUtil.getCellText("B1"));
 	}
 
 	/**
@@ -609,28 +611,28 @@ public class ValidityDialogSetting {
 	@Test
 	public void testAllowBlankCells() {
 		SC_ValidityCriteriaTabpage.select();
-		SC_ValidityCriteriaAllowList.select("Cell range");
+		SC_ValidityCriteriaAllowList.select(5);	// "Cell range"
 		SC_ValiditySourceInput.setText("$E$1:$E$5");
 		SC_ValidityAllowBlankCells.check();
 		SC_ValidityCriteriaTabpage.ok();
 
-		CalcUtil.selectRange("Sheet1.E1");
+		CalcUtil.selectRange("E1");
 		typeKeys("A<enter>A<enter>A<enter>A<enter>A<enter>");
 
-		CalcUtil.selectRange("Sheet1.A1");
+		CalcUtil.selectRange("A1");
 		typeKeys("A<enter>");
-		CalcUtil.selectRange("Sheet1.D1");
+		CalcUtil.selectRange("D1");
 		SC_InputBar_Input.activate();
 		typeKeys("<backspace><enter>");
-		assertEquals("",CalcUtil.getCellText("Sheet1.D1"));
+		assertEquals("",CalcUtil.getCellText("D1"));
 
-		CalcUtil.selectRange("Sheet1.B1");
-		calc.menuItem("Data->Validity...").select();
+		CalcUtil.selectRange("B1");
+		app.dispatch(".uno:Validation");
 		SC_ValidityCriteriaTabpage.select();
 		SC_ValidityAllowBlankCells.uncheck();
 		typeKeys("<enter>");
 
-		CalcUtil.selectRange("Sheet1.B1");
+		CalcUtil.selectRange("B1");
 		SC_InputBar_Input.activate();
 		typeKeys("<backspace><enter>");
 		typeKeys("<enter>");

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -90,7 +90,6 @@ public class ValiditySampleFile {
 		SC_InputBar_Input.activate();
 		typeKeys("<backspace><enter>");
 
-		assertEquals("Invalid value.",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
 		assertEquals("8",CalcUtil.getCellText("F5"));
 	}
@@ -106,9 +105,9 @@ public class ValiditySampleFile {
 		submitOpenDlg(file);
 		calc.waitForExistence(10, 2);
 
-		CalcUtil.selectRange("Sheet1.F19");
+		CalcUtil.selectRange("F19");
 		typeKeys("d<enter>");
-		CalcUtil.selectRange("Sheet1.F17");
+		CalcUtil.selectRange("F17");
 		typeKeys("Test<enter>");
 
 		assertEquals("Test",CalcUtil.getCellText("F17"));

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -51,16 +51,13 @@ public class HeaderAndFooterSetting{
 		// New a impress, insert some slides
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
-		sleep(1);
 
 		for(int i=0; i<5;i++){
 			SD_InsertPageButtonOnToolbar.click();
-			sleep(1);
 		}
 		// Pop up navigator panel
-		impress.menuItem("View").select();
-		if(!impress.menuItem("View->Navigator").isSelected()){
-			impress.menuItem("View->Navigator").select();
+		if (!SD_NavigatorDlg.exists()) {
+			app.dispatch(".uno:Navigator");
 		}
 	}
 
@@ -73,12 +70,11 @@ public class HeaderAndFooterSetting{
 	 * 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
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(2);
+		app.dispatch(".uno:HeaderAndFooter");
 
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
@@ -87,14 +83,12 @@ public class HeaderAndFooterSetting{
 		SD_FooterTextOnSlideInput.setText("Footer Test");
 		SD_SlideNumAsFooterOnSlide.check();
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
+		// Click slide 3
 		ImpressSlideSorter.focus();
-		for(int j=0; j<=2;j++){
-			typeKeys("<up>");
-		}
-		impress.menuItem("View->Header and Footer...").select();
+		typeKeys("<up><up><up>");
 		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_SlideNumAsFooterOnSlide.uncheck();
 		SD_ApplyButtonOnSlideFooter.click();
 
@@ -103,29 +97,22 @@ public class HeaderAndFooterSetting{
 		app.dispatch(".uno:Copy");
 		app.dispatch(".uno:Paste");
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120323", SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test", SD_FooterTextOnSlideInput.getText());
 		assertEquals(false, SD_SlideNumAsFooterOnSlide.isChecked());
-
-		//close header and footer dialog.
-		SD_ApplyButtonOnSlideFooter.focus();
-		typeKeys("<tab>");
-		typeKeys("<enter>");
+		SD_HeaderAndFooterDlgSlideTab.cancel();
 
 		//paste to different file
 		impress.focus();
 		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
-		sleep(1);
 		app.dispatch(".uno:Paste");
 		ImpressSlideSorter.focus();
 		typeKeys("<down>");
 		sleep(1);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120323", SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test", SD_FooterTextOnSlideInput.getText());
 		assertEquals(false, SD_SlideNumAsFooterOnSlide.isChecked());
@@ -139,30 +126,21 @@ public class HeaderAndFooterSetting{
 	public void testCopySlideWithApplyToAllFooter() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(2);
+		app.dispatch(".uno:HeaderAndFooter");
 
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
 		ImpressSlideSorter.focus();
 		for(int j=0; j<=2;j++){
 			typeKeys("<up>");
-			sleep(1);
 		}
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_SlideNumAsFooterOnSlide.uncheck();
 		SD_ApplyButtonOnSlideFooter.click();
 
@@ -171,31 +149,23 @@ public class HeaderAndFooterSetting{
 		typeKeys("<up>");
 		app.dispatch(".uno:Copy");
 		typeKeys("<down>");
-		sleep(1);
 		app.dispatch(".uno:Paste");
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
-
-		//close header and footer dialog.
-		SD_ApplyButtonOnSlideFooter.focus();
-		typeKeys("<tab>");
-		typeKeys("<enter>");
+		SD_HeaderAndFooterDlgSlideTab.cancel();
 
 		//paste to different file
-		impress.focus();
-		impress.menuItem("File->New->Presentation").select();
-		sleep(1);
+		app.dispatch("private:factory/simpress?slot=6686");
+		PresentationWizard.ok();
 		app.dispatch(".uno:Paste");
 		ImpressSlideSorter.focus();
 		typeKeys("<down>");
-		sleep(1);
+		sleep(1); // If no sleep, error occur
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
@@ -209,59 +179,42 @@ public class HeaderAndFooterSetting{
 	public void testCopySlideWithNotesHeaderFooter() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		SD_HeaderTextOnNotes.check();
 		SD_HeaderTextOnNotesInput.setText("Header Test");
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120329");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
 		//paste to the same file
 		ImpressSlideSorter.focus();
 		typeKeys("<up>");
 		app.dispatch(".uno:Copy");
 		typeKeys("<down>");
-		sleep(1);
 		app.dispatch(".uno:Paste");
 
-		ImpressUtil.getCurView().activate();
-
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
 		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
-
-		//close header and footer dialog.
-		SD_ApplyToAllButtonOnSlideFooter.focus();
-		typeKeys("<tab>");
-		typeKeys("<enter>");
+		SD_HeaderAndFooterOnNotesTabPage.cancel();
 
 		//paste to different file
 		impress.focus();
-		impress.menuItem("File->New->Presentation").select();
-		sleep(1);
+		app.dispatch("private:factory/simpress?slot=6686");
+		PresentationWizard.ok();
 		app.dispatch(".uno:Paste");
 		ImpressSlideSorter.focus();
 		typeKeys("<down>");
-		sleep(1);
 		ImpressUtil.getCurView().activate();
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
 		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
@@ -277,32 +230,23 @@ public class HeaderAndFooterSetting{
 	public void testDuplicateSlideWithApplyToAllFooter() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(2);
+		app.dispatch(".uno:HeaderAndFooter");
 
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
 
 		ImpressSlideSorter.focus();
 		for(int j=0; j<=2;j++){
 			typeKeys("<up>");
-			sleep(1);
 		}
-		impress.menuItem("Insert->Duplicate Slide").select();
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:DuplicatePage");
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
@@ -312,27 +256,22 @@ public class HeaderAndFooterSetting{
 	 * Test footer not show on the first slide. 
 	 * @throws Exception
 	 */
-	@Test
+	@Test//??
 	public void testFooterNotShowOn1stSlide() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(2);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_FooterNotShowOn1stSlide.check();
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
+		// Check slide 1
 		ImpressSlideSorter.focus();
-		for(int j=0; j<5; j++){
-			typeKeys("<up>");
-		}
+		typeKeys("<up><up><up><up><up>");
+		sleep(1);	// If no sleep, error occur
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_FooterNotShowOn1stSlide.isChecked());
 		assertEquals(false,SD_FooterTextOnSlide.isChecked());
 	}
@@ -345,25 +284,17 @@ public class HeaderAndFooterSetting{
 	public void testInsertApplyFooterOnSlide() throws Exception{
 
 		//add header and footer to focus slide.
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(2);
+		app.dispatch(".uno:HeaderAndFooter");
 
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyButtonOnSlideFooter.click();
-		sleep(1);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
 		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
@@ -378,9 +309,9 @@ public class HeaderAndFooterSetting{
 
 		ImpressSlideSorter.focus();
 		typeKeys("<up>");
+		sleep(1);	// If no sleep, error occur
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("",SD_FooterTextOnSlideInput.getText());
 		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
@@ -391,8 +322,7 @@ public class HeaderAndFooterSetting{
 		//end close
 
 		SD_InsertPageButtonOnToolbar.click();
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("",SD_FooterTextOnSlideInput.getText());
 		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
@@ -406,27 +336,19 @@ public class HeaderAndFooterSetting{
 	public void testInsertApplyToAllFooterOnNotes() throws Exception{
 
 		//add header and footer to focus slide.
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		SD_HeaderTextOnNotes.check();
 		SD_HeaderTextOnNotesInput.setText("Header Test");
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals(true,SD_HeaderTextOnNotes.isChecked());
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
@@ -445,8 +367,7 @@ public class HeaderAndFooterSetting{
 		ImpressSlideSorter.focus();
 		typeKeys("<up>");
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals(true,SD_HeaderTextOnNotes.isChecked());
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
@@ -463,8 +384,7 @@ public class HeaderAndFooterSetting{
 		//end close
 
 		SD_InsertPageButtonOnToolbar.click();
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals(true,SD_HeaderTextOnNotes.isChecked());
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
@@ -484,25 +404,17 @@ public class HeaderAndFooterSetting{
 	public void testInsertApplyToAllFooterOnSlide() throws Exception{
 
 		//add header and footer to focus slide.
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(2);
+		app.dispatch(".uno:HeaderAndFooter");
 
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
 		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
@@ -518,8 +430,7 @@ public class HeaderAndFooterSetting{
 		ImpressSlideSorter.focus();
 		typeKeys("<up>");
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
 		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
@@ -533,8 +444,7 @@ public class HeaderAndFooterSetting{
 		//end close
 
 		SD_InsertPageButtonOnToolbar.click();
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
 		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
 		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
@@ -551,19 +461,16 @@ public class HeaderAndFooterSetting{
 	public void testInsertAutoUpdateTimeFooter() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_AutoUpdateTimeFooter.check();
 		SD_AutoUpdateTimeFooterType.select(7);
 		String currentTime=SD_AutoUpdateTimeFooterType.getItemText(7);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(2);
-
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		sleep(1); // Wait some time to check the time update
 
-		String currentTime2=SD_AutoUpdateTimeFooterType.getItemText(7);
-		assertFalse(currentTime.equals(currentTime2));
+		app.dispatch(".uno:HeaderAndFooter");
+		String updatedTime=SD_AutoUpdateTimeFooterType.getItemText(7);
+		assertNotSame("Time can not update", currentTime, updatedTime);
 	}
 
 	/**
@@ -574,21 +481,18 @@ public class HeaderAndFooterSetting{
 	public void testInsertAutoUpdateTimeFooterOnNotes() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		SD_AutoUpdateTimeFooter.check();
-		SD_AutoUpdateTimeFooterType.select(7);
 		String currentTime=SD_AutoUpdateTimeFooterType.getItemText(7);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(2);
+		sleep(1); // Wait some time to check the time update
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
-		String currentTime2=SD_AutoUpdateTimeFooterType.getItemText(7);
+		String updatedTime=SD_AutoUpdateTimeFooterType.getItemText(7);
 
-		assertFalse(currentTime.equals(currentTime2));
+		assertNotSame("Time can not update", currentTime, updatedTime);
 	}
 
 	/**
@@ -600,48 +504,35 @@ public class HeaderAndFooterSetting{
 	public void testInsertHeaderFooterOnNotes() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		SD_HeaderTextOnNotes.check();
 		SD_HeaderTextOnNotesInput.setText("Header Test");
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120329");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
 		ImpressSlideSorter.focus();
 		typeKeys("<up>");
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
 		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
-
-		//close header and footer dialog.
-		SD_ApplyToAllButtonOnSlideFooter.focus();
-		typeKeys("<tab>");
-		typeKeys("<enter>");
+		SD_HeaderAndFooterOnNotesTabPage.cancel();
 
 		//save this file
-		impress.menuItem("File->Save").select();
+		app.dispatch(".uno:SaveAs");
 		String saveTo = getPath("temp/" + "hello.odp");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		impress.menuItem("File->Close").select();
-		sleep(2);
+		app.dispatch(".uno:CloseDoc");
 
 		//Reopen this file
 		openStartcenter();
@@ -650,8 +541,7 @@ public class HeaderAndFooterSetting{
 		submitOpenDlg(openFrom);
 
 		//check after reopen		
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_HeaderAndFooterOnNotesTabPage.select();
 		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
 		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
@@ -668,27 +558,19 @@ public class HeaderAndFooterSetting{
 	public void testInsertHeaderFooterOnSlide() throws Exception{
 
 		//add header and footer
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		SD_DateAndTimeFooterOnSlide.check();
 		SD_FixedDateAndTimeFooterOnSlide.check();
-		sleep(1);
 		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120329");
-		sleep(1);
 		SD_FooterTextOnSlide.check();
-		sleep(1);
 		SD_FooterTextOnSlideInput.setText("Footer Test");
-		sleep(1);
 		SD_SlideNumAsFooterOnSlide.check();
-		sleep(1);
 		SD_ApplyToAllButtonOnSlideFooter.click();
-		sleep(1);
 
 		ImpressSlideSorter.focus();
 		typeKeys("<up>");
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
@@ -699,12 +581,11 @@ public class HeaderAndFooterSetting{
 		typeKeys("<enter>");
 
 		//save this file
-		impress.menuItem("File->Save").select();
+		app.dispatch(".uno:SaveAs");
 		String saveTo = getPath("temp/" + "hello.odp");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
-		impress.menuItem("File->Close").select();
-		sleep(2);
+		app.dispatch(".uno:CloseDoc");
 
 		//Reopen this file
 		openStartcenter();
@@ -713,8 +594,7 @@ public class HeaderAndFooterSetting{
 		submitOpenDlg(openFrom);
 
 		//check after reopen		
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
 		assertEquals(true,SD_SlideNumAsFooterOnSlide.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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -66,8 +66,7 @@ public class OpenDocumentWithHeaderFoote
 		submitOpenDlg(file);
 
 		//check after reopen		
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
 		assertEquals("fixed date",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals(true,SD_FooterTextOnSlide.isChecked());
@@ -78,20 +77,18 @@ public class OpenDocumentWithHeaderFoote
 		SD_ApplyToAllButtonOnSlideFooter.click();
 
 		//save to odp and reopen
-		impress.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		String saveTo2 = getPath("temp/" + "AOO3.4HeaderFooter.odp");
 		FileUtil.deleteFile(saveTo2);
 		submitSaveDlg(saveTo2);	
-		impress.menuItem("File->Close").select();
-		sleep(1);
+		app.dispatch(".uno:CloseDoc");
 
 		openStartcenter();
 		app.dispatch(".uno:Open");
 		String openFrom2=getPath("temp/" + "AOO3.4HeaderFooter.odp");
 		submitOpenDlg(openFrom2);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
 		//end-save to odp and reopen
 	}
@@ -109,8 +106,7 @@ public class OpenDocumentWithHeaderFoote
 		submitOpenDlg(file);
 
 		//check after reopen		
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
 		assertEquals("testdte",SD_FixedDateAndTimeOnSlideInput.getText());
 		assertEquals(true,SD_FooterTextOnSlide.isChecked());
@@ -121,23 +117,20 @@ public class OpenDocumentWithHeaderFoote
 		SD_ApplyToAllButtonOnSlideFooter.click();
 
 		//save to ppt and reopen
-		impress.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		String saveTo = getPath("temp/" + "gfdd.ppt");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
 		if (AlienFormatDlg.exists(3))
 			AlienFormatDlg.ok();
-		sleep(1);
-		impress.menuItem("File->Close").select();
-		sleep(1);
+		app.dispatch(".uno:CloseDoc");
 
 		openStartcenter();
 		app.dispatch(".uno:Open");
 		String openFrom=getPath("temp/" + "gfdd.ppt");
 		submitOpenDlg(openFrom);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
 		//end-save to ppt and reopen
 
@@ -148,20 +141,18 @@ public class OpenDocumentWithHeaderFoote
 		//end
 
 		//save to odp and reopen
-		impress.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		String saveTo2 = getPath("temp/" + "gfdd.odp");
 		FileUtil.deleteFile(saveTo2);
 		submitSaveDlg(saveTo2);	
-		impress.menuItem("File->Close").select();
-		sleep(1);
+		app.dispatch(".uno:CloseDoc");
 
 		openStartcenter();
 		app.dispatch(".uno:Open");
 		String openFrom2=getPath("temp/" + "gfdd.odp");
 		submitOpenDlg(openFrom2);
 
-		impress.menuItem("View->Header and Footer...").select();
-		sleep(1);
+		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
 		//end-save to odp and reopen
 	}

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=1365867&r1=1365866&r2=1365867&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 Thu Jul 26 01:57:18 2012
@@ -63,27 +63,25 @@ public class Table {
 	public void testConvertTableToText() throws Exception{
 
 		//Create a new text document
-		startcenter.menuItem("File->New->Text Document").select();
-		sleep(3);
+		app.dispatch("private:factory/swriter");
 
 		// Insert a table and input some data
-		writer.menuItem("Insert->Table...").select();
+		app.dispatch(".uno:InsertTable");
 		writer_InsertTable.ok();
 		writer.focus();
 		typeKeys("1<right>2<right>3<right>4");
 		sleep(1);
 
 		// Convert table to text
-		writer.menuItem("Table->Convert->Table to Text...").select();
+		app.dispatch(".uno:ConvertTableToText");
 		assertTrue("Convert Table to Text dialog pop up", writer_ConvertTableToTextDlg.exists());
 		typeKeys("<enter>");
-		sleep(1);
 
 		// Verify if text is converted successfully
-		writer.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:SelectAll");
 		app.dispatch(".uno:Copy");
 		if (SystemUtil.isWindows())
-			assertEquals("Converted text", "1\t2\r\n3\t4\r\n", app.getClipboard());	// windows�лس�������\r\n
+			assertEquals("Converted text", "1\t2\r\n3\t4\r\n", app.getClipboard());	// in windows, \n is \r\n
 		else
 			assertEquals("Converted text", "1\t2\n3\t4\n", app.getClipboard());
 	}

Modified: incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java?rev=1365867&r1=1365866&r2=1365867&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java (original)
+++ incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java Thu Jul 26 01:57:18 2012
@@ -348,6 +348,8 @@ public class UIMap {
 	// Spreadsheet: "Select Sheets" dialog
 	public static final VclDialog SCSelectSheetsDlg = dialog(".uno:SelectTables");
 	public static final VclListBox SCSheetsList = listbox("SC_HID_SELECTTABLES");
+	public static final VclWindow SD_NavigatorDlg = window("SD_HID_SD_NAVIGATOR");
+	public static final VclTabPage SD_HeaderAndFooterDlgSlideTab = tabpage("SD_HID_SD_TABPAGE_HEADERFOOTER_SLIDE");
 	
 	
 	



Mime
View raw message