incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1381843 [1/6] - in /incubator/ooo/trunk/test: ./ testcommon/source/org/openoffice/test/ testcommon/source/org/openoffice/test/common/ testcommon/source/org/openoffice/test/vcl/ testcommon/source/org/openoffice/test/vcl/widgets/ testgui/dat...
Date Fri, 07 Sep 2012 02:29:55 GMT
Author: liuzhe
Date: Fri Sep  7 02:29:53 2012
New Revision: 1381843

URL: http://svn.apache.org/viewvc?rev=1381843&view=rev
Log:
Refactor the control names

Added:
    incubator/ooo/trunk/test/testgui/data/bvt/
    incubator/ooo/trunk/test/testgui/data/bvt/find.odt
      - copied unchanged from r1380113, incubator/ooo/trunk/test/testgui/data/find.odt
    incubator/ooo/trunk/test/testgui/data/bvt/macro.ods   (with props)
    incubator/ooo/trunk/test/testgui/data/bvt/pdf.odt
      - copied, changed from r1380113, incubator/ooo/trunk/test/testgui/data/export_pdf.odt
    incubator/ooo/trunk/test/testgui/data/bvt/slideshow.odp
      - copied unchanged from r1380113, incubator/ooo/trunk/test/testgui/data/slideshow.odp
    incubator/ooo/trunk/test/testgui/data/bvt/sort.ods
      - copied unchanged from r1380113, incubator/ooo/trunk/test/testgui/data/sort.ods
    incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/
      - copied from r1380113, incubator/ooo/trunk/test/testgui/source/testcase/gui/performance/benchmark/
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/TestSample.java
      - copied, changed from r1380113, incubator/ooo/trunk/test/testgui/source/testcase/gui/TestSample.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/AppTool.java
      - copied, changed from r1380113, incubator/ooo/trunk/test/testgui/source/testlib/gui/AppUtil.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/SCTool.java
      - copied, changed from r1380113, incubator/ooo/trunk/test/testgui/source/testlib/gui/CalcUtil.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/SDTool.java
      - copied, changed from r1380113, incubator/ooo/trunk/test/testgui/source/testlib/gui/ImpressUtil.java
Removed:
    incubator/ooo/trunk/test/testgui/data/export_pdf.odt
    incubator/ooo/trunk/test/testgui/data/find.odt
    incubator/ooo/trunk/test/testgui/data/slideshow.odp
    incubator/ooo/trunk/test/testgui/data/sort.ods
    incubator/ooo/trunk/test/testgui/source/testcase/gui/TestSample.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/performance/
    incubator/ooo/trunk/test/testgui/source/testlib/gui/AppUtil.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/CalcUtil.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/ImpressUtil.java
Modified:
    incubator/ooo/trunk/test/build.xml
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/Testspace.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/Tester.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
    incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/AOOTest.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/FileTypeTest.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/SmokeTest.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/Filter.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/GenerateReports.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/cell/InserCells.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/datapilot/DataPivotTable.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/filter/Fitler.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/rowcolumn/InsertRowAndColumn.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/sheet/InsertSheet.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/sort/SortDialogSetting.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/subtotals/SubtotalsFunctions.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/validity/ValidityDateSupport1024Columns.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/validity/ValidityDialogDefaultValue.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/validity/ValidityDialogSetting.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/validity/ValiditySampleFile.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sd/headerandfooter/HeaderAndFooterSetting.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sd/shape/ShapeTypes.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sd/table/ChangeTableFontEffectsProperty.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/LongRun.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sc/OperationOnNewSC.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sc/OperationOnSampleFile.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sc/SwitchFilesContainingChart.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sd/DragOLEObject.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sd/OperationOnNewSD.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sd/SwitchDiffViewsOnOdpFile.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sw/OperationOnNewSW.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sw/OperationOnSample1.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/svt/sw/OperationOnSample2.java
    incubator/ooo/trunk/test/testgui/source/testcase/gui/sw/table/TableGeneral.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/UIMap.java
    incubator/ooo/trunk/test/testgui/source/testsuite/gui/TestSampleAsMS2003.java
    incubator/ooo/trunk/test/testgui/source/testsuite/gui/TestSampleAsOriginal.java

Modified: incubator/ooo/trunk/test/build.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/build.xml?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/build.xml (original)
+++ incubator/ooo/trunk/test/build.xml Fri Sep  7 02:29:53 2012
@@ -26,13 +26,12 @@
     <property environment="env" />
     <property file="build.properties" />
     <property name="env.DISPLAY" value=":0.0"/>
-	<property name="env.INPATH" value="testspace"/>
-	<property name="env.TESTSPACE" value="${env.INPATH}" />
+	<property name="env.TESTSPACE" value="testspace" />
 	<property name="env.JUNIT_HOME" value="external/junit" />
 	<property name="junit.home" value="${env.JUNIT_HOME}" />
 	<property name="testspace" value="${env.TESTSPACE}" />
     <property name="classes" value="${testspace}/class" />
-	<property name="dist" value="." />
+	<property name="dist" value="${testspace}" />
 	<property name="test.name" value="BVT" />
 	<property name="test.classes" value="testcase/gui/bvt/*.class" />
 	<property name="test.output" value="${testspace}/output" />
@@ -45,8 +44,33 @@
 			<include name="*.jar" />
 		</fileset>
 	</path>
+    
+    <target name="upgrade">
+		<property name="upgrade.script" location="${java.io.tmpdir}/aoo_test_upgrade.xml"/>
+		<property name="upgrade.to" location="."/>
+		<copy file="build.xml" tofile="${upgrade.script}"/>
+        <condition property="ant.executable" value="ant.bat">
+			<os family="windows" />
+		</condition>
+        <property name="ant.executable" value="ant"/>
+        <exec executable="${ant.executable}" spawn="true">
+			<arg value="-Dupgrade.to=${upgrade.to}"/>
+			<arg value="-f"/>
+			<arg value="${upgrade.script}"/>
+			<arg value="upgrade.run"/>
+		</exec>
+	</target>
 
-	<target name="testcommon.init">
+	<target name="upgrade.run">
+		<property name="testpack.url" value="http://9.123.117.85/testpack/trunk/aoo_test.zip"/>
+		<property name="testack.temp" location="${java.io.tmpdir}/aoo_test.zip"/>
+ 		<get src="${testpack.url}" dest="${testack.temp}"/>
+		<delete dir="${upgrade.to}" failonerror="false"/>
+		<mkdir dir="${upgrade.to}"/>
+		<unzip src="${testack.temp}" dest="${upgrade.to}"/>
+	</target>
+    
+    <target name="testcommon.init">
 		<mkdir dir="${classes}" />
 		<copy includeemptydirs="false" todir="${classes}">
 			<fileset dir="testcommon/source">
@@ -132,9 +156,14 @@
 
 	<target name="dist">
 		<tstamp />
-		<property name="dist.archive" value="aoo_test_${DSTAMP}.zip" />
-        <zip destfile="${dist}/${dist.archive}" basedir="." update="true" includes="testcommon/**,testgui/**,testuno/**,build.xml,build.example.properties,external/**,reportstyle/**" excludes="**/bin/**">
+        <tstamp>
+            <format property="testpack.version" pattern="yyyyMMddhhmmss"/>
+        </tstamp>
+        <property name="dist.archive" value="aoo_test_${DSTAMP}.zip" />
+        <echo file="${testpack.version}">${testpack.version}</echo>
+        <zip destfile="${dist}/${dist.archive}" basedir="." update="false" excludes="testspace/**,testassistant/**,testassistant.feature/**,**/bin/**">
         </zip>
+        <delete file="${testpack.version}"/>
 	</target>
 
 	<target name="check.build" description="Check the build context">
@@ -305,7 +334,7 @@
 
 
 	<target name="report.test" unless="report.test.skip" description="Upload the testing result to report repository." depends="detect.testenv">
-		<property name="report.to" value="${openoffice.build.name}/${test.name}/${test.os.name}-${test.os.version}-${test.os.arch}" />
+		<property name="report.to" value="${openoffice.build.name}-${test.name}/${test.os.name}-${test.os.version}-${test.os.arch}" />
 		<echo>Uploading report to ${report.repos}/${report.to}</echo>
 		<property name="report.to.temp" location="${testspace}/.temp.ouput"/>
         <delete dir="${report.to.temp}" deleteonexit="true"/>

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/OpenOffice.java Fri Sep  7 02:29:53 2012
@@ -248,23 +248,28 @@ public class OpenOffice {
 		SystemUtil.sleep(1);
 	}
 	
-	
+	public boolean isRunning() {
+		if (process == null)
+			return false;
+		
+		try {
+			process.exitValue();
+		} catch (Exception e1) {
+			return true;
+		}
+		
+		return false;
+	}
 																																																														
 	/**
 	 * Start OpenOffice
 	 * 
-	 * @return
+	 * @return return true when the process is created.
 	 */
 	@SuppressWarnings("all")
-	public void start() {
-		try {
-			if (process != null) {
-				process.exitValue();
-				process = null;
-			}
-		} catch (Exception e1) {
-			return;
-		}
+	public boolean start() {
+		if (isRunning())
+			return false;
 		
 		ArrayList<String> cmds = new ArrayList<String>();
 		cmds.add(bin.getAbsolutePath());
@@ -312,5 +317,6 @@ public class OpenOffice {
 		LOG.info(cmdLine);
 		if (process == null)
 			throw new RuntimeException("OpenOffice can't be started!");
+		return true;
 	}
 }

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/Testspace.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/Testspace.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/Testspace.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/common/Testspace.java Fri Sep  7 02:29:53 2012
@@ -96,4 +96,8 @@ public class Testspace {
 		
 		return workingFile.getAbsolutePath();
 	}
+	
+	public static boolean deleteFile(String path) {
+		return FileUtil.deleteFile(getPath(path));
+	}
 }

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/Tester.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/Tester.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/Tester.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/Tester.java Fri Sep  7 02:29:53 2012
@@ -42,7 +42,7 @@ public class Tester {
 	static {
 		try {
 			robot = new Robot();
-		    robot.setAutoDelay(10);
+		    robot.setAutoDelay(15);
 		    robot.setAutoWaitForIdle(true);
 		} catch (AWTException e) {
 			e.printStackTrace();

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclApp.java Fri Sep  7 02:29:53 2012
@@ -21,10 +21,12 @@
 
 package org.openoffice.test.vcl.widgets;
 
+import static org.openoffice.test.common.SystemUtil.*;
+
 import java.io.IOException;
 
 import org.openoffice.test.OpenOffice;
-import org.openoffice.test.common.SystemUtil;
+import org.openoffice.test.common.Condition;
 import org.openoffice.test.vcl.Tester;
 import org.openoffice.test.vcl.client.CommandCaller;
 import org.openoffice.test.vcl.client.CommunicationManager;
@@ -74,27 +76,27 @@ public class VclApp {
 		caller.setWinInfoReceiver(receiver);
 	}
 	
+	public void clean() {
+		OpenOffice.killAll();
+		if (openOffice != null) 
+			openOffice.cleanUserInstallation();
+	}
+	
 	public void start() {
 		if (openOffice != null) {
-			openOffice.start();
+			// workaround for crash when connect to automation server too early
+			double sleep = openOffice.getUserInstallation().exists() ? 3 : 6;
+			if (openOffice.start()) 
+				sleep(sleep);
 		}
 		
 		communicationManager.start();
 	}
 	
-	public void start(boolean isCleanUserInstallation) {	// Default to clean user installation
-		if (openOffice != null) {
-			if (isCleanUserInstallation) {
-				OpenOffice.killAll();
-				openOffice.cleanUserInstallation();
-				openOffice.start();
-				SystemUtil.sleep(10);
-			} else {
-				openOffice.start();
-			}
-		}
-		
-		communicationManager.start();
+	public void start(boolean isCleanUserInstallation) { 
+		if (isCleanUserInstallation) 
+			clean();
+		start();
 	}
 	
 	public void loadDocument(String file) {
@@ -116,17 +118,30 @@ public class VclApp {
 	}
 	
 	public void close() {
+		if (openOffice != null) {
+			if (!openOffice.isRunning()) 
+				return;
+		}
+		
 		try {
 			dispatch(".uno:Quit");
-			SystemUtil.sleep(3);
 		} catch(Exception e) {
 			
-		} finally {
-			communicationManager.stop();
-			if (openOffice != null) {
+		}
+
+		if (openOffice != null) {
+			if (!new Condition() {
+				@Override
+				public boolean value() {
+					return !openOffice.isRunning();
+				}
+
+			}.test(5, 1)) {
 				openOffice.kill();
 			}
 		}
+		
+		communicationManager.stop();
 	}
 	
 	
@@ -261,6 +276,10 @@ public class VclApp {
 	 */
 	public void dispatch(String url, double time) {
 		caller.callUNOSlot(url);
+		waitSlot(time);
+	}
+	
+	public void waitSlot(double time) {
 		int result = (Integer) caller.callCommand(Constant.RC_WaitSlot, (int) time * 1000);
 		if (result == CONST_WSTimeout)
 			throw new RuntimeException("Timeout to execute the dispatch!");

Modified: incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java (original)
+++ incubator/ooo/trunk/test/testcommon/source/org/openoffice/test/vcl/widgets/VclTreeListBox.java Fri Sep  7 02:29:53 2012
@@ -149,6 +149,18 @@ public class VclTreeListBox extends VclC
 		invoke(Constant.M_Collapse, new Object[]{index + 1, false});
 	}
 	
+	public void collapse() {
+		collapse(getSelIndex());
+	}
+	
+	public void collapse(String text) {
+		String[] items = getAllItemsText();
+		for (int i = 0; i < items.length; i++) {
+			if (text.equals(items[i]))
+				collapse(i);
+		}
+	}
+	
 	/**
 	 * Expand the specified entry
 	 * Notice: index starting from 0
@@ -160,6 +172,18 @@ public class VclTreeListBox extends VclC
 		invoke(Constant.M_Expand, new Object[]{index + 1, false});
 	}
 	
+	public void expand() {
+		expand(getSelIndex());
+	}
+	
+	public void expand(String text) {
+		String[] items = getAllItemsText();
+		for (int i = 0; i < items.length; i++) {
+			if (text.equals(items[i]))
+				expand(i);
+		}
+	}
+	
     /** 
      * Select the node via its text
      * @param str

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

Propchange: incubator/ooo/trunk/test/testgui/data/bvt/macro.ods
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Copied: incubator/ooo/trunk/test/testgui/data/bvt/pdf.odt (from r1380113, incubator/ooo/trunk/test/testgui/data/export_pdf.odt)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/data/bvt/pdf.odt?p2=incubator/ooo/trunk/test/testgui/data/bvt/pdf.odt&p1=incubator/ooo/trunk/test/testgui/data/export_pdf.odt&r1=1380113&r2=1381843&rev=1381843&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/AOOTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/AOOTest.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/AOOTest.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/AOOTest.java Fri Sep  7 02:29:53 2012
@@ -22,7 +22,7 @@
 package testcase.gui;
 
 import static org.junit.Assert.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import org.junit.After;
@@ -31,7 +31,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
 
-import testlib.gui.CalcUtil;
+import testlib.gui.SCTool;
 
 /**
  * If AOO is not installed in the default directory, please specify the system
@@ -78,7 +78,7 @@ public class AOOTest {
 		startcenter.menuItem("File->New->Spreadsheet").select();
 		calc.waitForExistence(10, 3);
 		typeKeys("Hello");
-		assertEquals("Assert", "Hello", CalcUtil.getCellInput("A1"));
+		assertEquals("Assert", "Hello", SCTool.getCellInput("A1"));
 	}
 
 }

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/BasicFunctionTest.java Fri Sep  7 02:29:53 2012
@@ -27,21 +27,20 @@ package testcase.gui.bvt;
 import static org.junit.Assert.*;
 import static org.openoffice.test.common.Testspace.*;
 import static org.openoffice.test.vcl.Tester.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import java.awt.Rectangle;
-import java.io.File;
 
-import org.junit.AfterClass;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.FileUtil;
 import org.openoffice.test.common.GraphicsUtil;
 import org.openoffice.test.common.Logger;
 
-import testlib.gui.CalcUtil;
+import testlib.gui.SCTool;
 
 /**
  * 
@@ -51,33 +50,38 @@ public class BasicFunctionTest {
 	@Rule
 	public Logger log = Logger.getLogger(this);
 
-	@Before
-	public void setUp() throws Exception {
-		app.start(true);
+	@BeforeClass
+	public static void beforeClass() throws Exception {
+		app.clean();
 	}
 
-	@AfterClass
-	public static void afterClass() throws Exception {
+	@Before
+	public void before() {
 		app.close();
+		app.start();
 	}
 
 	@Test
 	public void testExportAsPDF() throws Exception {
-		String file = prepareData("export_pdf.odt");
-		String exportTo = getPath("temp/odt.pdf");
-
-		app.dispatch(".uno:Open");
-		submitOpenDlg(file);
-		writer.waitForExistence(10, 2);
+		String file = prepareData("bvt/pdf.odt");
+		String exportTo1 = getPath("temp/1.pdf");
+		String exportTo2 = getPath("temp/2.pdf");
+		deleteFile(exportTo1);
+		deleteFile(exportTo2);
+		open(file);
+		writer.waitForExistence(10, 1);
 		app.dispatch(".uno:ExportToPDF");
-		PDFGeneralPage.ok();
-		FileUtil.deleteFile(exportTo);
-		submitSaveDlg(exportTo);
-		assertTrue("PDF is exported?", new File(exportTo).exists());
-		assertTrue(toolbox(".HelpId:standardbar").exists(5));
-		button(".uno:ExportDirectToPDF").click();
-		assertEquals("PDF - Portable Document Format (.pdf)", FileSave_FileType.getSelText());
-		FileSave.cancel();
+		pdfGeneralPage.ok();
+		submitSaveDlg(exportTo1);
+		sleep(1);
+		String magic = FileUtil.readFileAsString(exportTo1).substring(0, 4);
+		assertEquals("PDF is exported?", "%PDF", magic);
+		
+		button(".uno:ExportDirectToPDF").click();//Click via toolbar
+		submitSaveDlg(exportTo2);
+		sleep(1);
+		magic = FileUtil.readFileAsString(exportTo2).substring(0, 4);
+		assertEquals("PDF is exported directly?", "%PDF", magic);
 	}
 
 	/**
@@ -85,51 +89,67 @@ public class BasicFunctionTest {
 	 * 
 	 */
 	@Test
-	public void testPrintDialog() {
+	public void testPrinter() {
 		// Create a new text document
-		app.dispatch("private:factory/swriter");
-		writer.waitForExistence(10, 2);
-		app.dispatch(".uno:Print");
-		assertTrue(File_PrintDlg.exists(5));
-		File_PrintDlg.cancel();
+		newTextDocument();
+		app.dispatch(".uno:PrinterSetup");
+		if (activeMsgBox.exists(2))
+			activeMsgBox.ok();
+		
+//		PrintService[] ps = PrintServiceLookup.lookupPrintServices(null, null);
+//		String[] names = new String[ps.length];
+//		for (int i = 0; i < ps.length; i++) {
+//			names[i] = ps[i].getName();
+//		}
+//		
+//		assertArrayEquals("Printers Names", names, printerSetUpDlgPrinterNames.getItemsText());
+		assertTrue("Printer Setup dialog appears", printerSetUpDlg.exists(3));
+		printerSetUpDlg.cancel();
 	}
 
 	/**
 	 * Test the File -- Java Dialog show
 	 * 
 	 */
-	@Test
-	public void testJavaDialog() {
-
-		// Create a new text document and launch a Wizards dialog which need JVM
-		// work correctly.
-		app.dispatch("private:factory/swriter");
-		File tempfile = new File(oo.getUserInstallation(), "user/template/myAgendaTemplate.ott");
-		FileUtil.deleteFile(tempfile);
-		sleep(3);
-		app.dispatch("service:com.sun.star.wizards.agenda.CallWizard?start");
-		sleep(5);
-		assertTrue(Wizards_AgendaDialog.exists(10));
-		Wizards_AgendaDialog_FinishButton.click();
-		sleep(10);
-		writer.focus();
-		sleep(1);
-		app.dispatch(".uno:SelectAll");
-		typeKeys("<$copy>");
-		// System.out.println("now txt:"+app.getClipboard());
-		// assertTrue(app.getClipboard().startsWith("<Name>"));
-		assertNotNull(app.getClipboard());
-	}
+//	@Test
+//	public void testJavaDialog() {
+//
+//		// Create a new text document and launch a Wizards dialog which need JVM
+//		// work correctly.
+//		app.dispatch("private:factory/swriter");
+//		File tempfile = new File(oo.getUserInstallation(), "user/template/myAgendaTemplate.ott");
+//		FileUtil.deleteFile(tempfile);
+//		sleep(3);
+//		app.dispatch("service:com.sun.star.wizards.agenda.CallWizard?start");
+//		sleep(5);
+//		assertTrue(Wizards_AgendaDialog.exists(10));
+//		Wizards_AgendaDialog_FinishButton.click();
+//		sleep(10);
+//		writer.focus();
+//		sleep(1);
+//		app.dispatch(".uno:SelectAll");
+//		typeKeys("<$copy>");
+//		// System.out.println("now txt:"+app.getClipboard());
+//		// assertTrue(app.getClipboard().startsWith("<Name>"));
+//		assertNotNull(app.getClipboard());
+//	}
 
 	/**
 	 * Test the Tools / Macros / Organize Dialogs" show
 	 * 
 	 */
 	@Test
-	public void testMacroToolsOrgDialog() {
-		app.dispatch(".uno:MacroOrganizer?TabId:short=1");
-		assertTrue(MacroDialogsPage.exists(5));
-		MacroDialogsPage.cancel();
+	public void testRunMacro() {
+		open(prepareData("bvt/macro.ods"));
+		calc.waitForExistence(10, 2);
+		app.dispatch(".uno:RunMacro");
+		runMacroDlgCategories.expand("macro.ods");
+		runMacroDlgCategories.expand("Standard");
+		runMacroDlgCategories.select("Module1");
+		runMacroDlgCommands.select(0);
+		runMacroDlg.ok();
+		assertEquals("A3 should be =1+3", "4", SCTool.getCellText("A3"));
+		discard();
 	}
 
 	/**
@@ -137,10 +157,14 @@ public class BasicFunctionTest {
 	 * 
 	 */
 	@Test
-	public void testAboutDialog() {
+	public void testHelp() {
 		app.dispatch(".uno:About");
-		assertTrue(AboutDialog.exists(5));
-		AboutDialog.ok();
+		assertTrue(aboutDialog.exists(5));
+		aboutDialog.ok();
+		sleep(1);
+		typeKeys("<F1>");
+		assertTrue(helpWindow.exists(5));
+		helpWindow.close();
 	}
 
 	/**
@@ -155,207 +179,173 @@ public class BasicFunctionTest {
 		String bmp_red = prepareData("image/red_256x256.bmp");
 
 		// Create a new text document
-		app.dispatch("private:factory/swriter");
-		writer.waitForExistence(10, 2);
-
+		newTextDocument();
 		// Insert a picture fully filled with green
-		writer.click(400, 400);
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_green);
-		sleep(2);
-		writer.click(10,200);
+		writer.click(5,200);
 		sleep(1);
 
 		// Verify if the picture is inserted successfully
 		Rectangle rectangle = GraphicsUtil.findRectangle(writer.getScreenRectangle(), 0xFF00FF00);
-
-		assertNotNull("Green rectangle: " + rectangle, rectangle);
-
+		assertTrue("Green Picture is inserted?" + rectangle, rectangle != null && rectangle.getWidth() > 10);
 		// insert another picture
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_red);
-		sleep(2);
-		writer.click(10, 200);
+		writer.click(5, 200);
 		sleep(1);
 		// Verify if the picture is inserted successfully
 		rectangle = GraphicsUtil.findRectangle(writer.getScreenRectangle(), 0xFFFF0000);
-		assertNotNull("Red rectangle: " + rectangle, rectangle);
+		assertTrue("Green Picture is inserted? " + rectangle, rectangle != null && rectangle.getWidth() > 10);
+		discard();
 	}
 
 	@Test
 	public void testInsertPictureInSpreadsheet() throws Exception {
-		String bmp_green = prepareData("image/green_256x256.bmp");
-		String bmp_red = prepareData("image/red_256x256.bmp");
-
-		// Create a new text document
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-
+		String bmp_green = prepareData("image/green_64x64.png");
+		String bmp_red = prepareData("image/red_64x64.png");
+		newSpreadsheet();
 		// Insert a picture fully filled with green
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_green);
-		sleep(3);
-		calc.click(0.5, 0.5);
+		calc.click(5, 150);
 		sleep(1);
 
 		// Verify if the picture is inserted successfully
 		Rectangle rectangle = GraphicsUtil.findRectangle(calc.getScreenRectangle(), 0xFF00FF00);
-
-		assertNotNull("Green rectangle: " + rectangle, rectangle);
-		// assertEquals(new Rectangle(0,0,64,64), rectangle);
-		CalcUtil.selectRange("C1");
+		assertTrue("Green Picture is inserted?" + rectangle, rectangle != null && rectangle.getWidth() > 10);
+		
+		SCTool.selectRange("C1");
 		// insert another picture
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_red);
-		sleep(3);
-		calc.click(0.5, 0.5);
+		calc.click(5, 150);
 		sleep(1);
 		// Verify if the picture is inserted successfully
 		rectangle = GraphicsUtil.findRectangle(calc.getScreenRectangle(), 0xFFFF0000);
-		assertNotNull("Red rectangle: " + rectangle, rectangle);
+		assertTrue("Red Picture is inserted? " + rectangle, rectangle != null && rectangle.getWidth() > 10);
+		discard();
 	}
 
 	@Test
 	public void testInsertPictureInPresentation() throws Exception {
 		String bmp_green = prepareData("image/green_256x256.bmp");
 		String bmp_red = prepareData("image/red_256x256.bmp");
-
-		// Create a new text document
-		app.dispatch("private:factory/simpress?slot=6686");
-		PresentationWizard.ok();
-		impress.waitForExistence(10, 2);
-
+		newPresentation();
 		// Insert a picture fully filled with green
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_green);
-		sleep(3);
 		impress.click(5, 5);
 		sleep(1);
 
 		// Verify if the picture is inserted successfully
 		Rectangle rectangle = GraphicsUtil.findRectangle(impress.getScreenRectangle(), 0xFF00FF00);
-
-		assertNotNull("Green rectangle: " + rectangle, rectangle);
-		// assertEquals(new Rectangle(0,0,64,64), rectangle);
-
+		assertTrue("Green Picture is inserted?" + rectangle, rectangle != null && rectangle.getWidth() > 10);
 		// insert another picture
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_red);
-		sleep(3);
 		impress.click(1, 1);
 		sleep(1);
 		// Verify if the picture is inserted successfully
 		rectangle = GraphicsUtil.findRectangle(impress.getScreenRectangle(), 0xFFFF0000);
-		assertNotNull("Red rectangle: " + rectangle, rectangle);
+		assertTrue("Red Picture is inserted? " + rectangle, rectangle != null && rectangle.getWidth() > 10);
+		discard();
 	}
 
 	@Test
 	public void testSlideShow() throws Exception {
-		String file = prepareData("slideshow.odp");
-		app.dispatch(".uno:Open");
-		submitOpenDlg(file);
+		open(prepareData("bvt/slideshow.odp"));
 		impress.waitForExistence(10, 2);
-		app.dispatch(".uno:Presentation");
+		sleep(1);
+		impress.typeKeys("<F5>");
 		sleep(3);
-		Rectangle rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFFFF0000);
+		Rectangle rectangle = GraphicsUtil.findRectangle(slideShow.getScreenRectangle(), 0xFFFF0000);
 		assertNotNull("1st slide appears", rectangle);
-		SlideShow.click(0.5, 0.5);
+		slideShow.click(0.5, 0.5);
 		sleep(2);
-		rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFF00FF00);
+		rectangle = GraphicsUtil.findRectangle(slideShow.getScreenRectangle(), 0xFF00FF00);
 		assertNotNull("2nd slide appears", rectangle);
 		typeKeys("<enter>");
 		sleep(2);
-		rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFF0000FF);
+		rectangle = GraphicsUtil.findRectangle(slideShow.getScreenRectangle(), 0xFF0000FF);
 		assertNotNull("3rd slide appears", rectangle);
-		SlideShow.click(0.5, 0.5);
+		slideShow.click(0.5, 0.5);
 		sleep(2);
-		rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFF0000FF);
+		rectangle = GraphicsUtil.findRectangle(slideShow.getScreenRectangle(), 0xFF0000FF);
 		assertNull("The end", rectangle);
-		SlideShow.click(0.5, 0.5);
+		slideShow.click(0.5, 0.5);
 		sleep(3);
-		assertFalse("Quit", SlideShow.exists());
+		assertFalse("Quit", slideShow.exists());
 	}
 
 	@Test
 	public void testFind() {
-		String file = prepareData("find.odt");
-		app.dispatch(".uno:Open");
-		submitOpenDlg(file);
+		open(prepareData("bvt/find.odt"));
 		writer.waitForExistence(10, 2);
 		app.dispatch(".uno:SearchDialog");
-		FindDlg_For.setText("OpenOffice");
-		FindDlg_Find.click();
+		findDlgFor.setText("OpenOffice");
+		findDlgFind.click();
 		sleep(1);
-		writer.focus();
-		typeKeys("<$copy>");
+		writer.typeKeys("<$copy>");
 		assertEquals("OpenOffice", app.getClipboard());
-		FindDlg_FindAll.click();
+		findDlgFindAll.click();
 		sleep(1);
-		writer.focus();
-		typeKeys("<$copy>");
+		writer.typeKeys("<$copy>");
 		assertEquals("OpenOfficeOpenOfficeOpenOffice", app.getClipboard());
-		FindDlg_ReplaceWith.setText("Awesome OpenOffice");
-		FindDlg_ReplaceAll.click();
+		findDlgReplaceWith.setText("Awesome OpenOffice");
+		findDlgReplaceAll.click();
 		sleep(1);
 		msgbox("Search key replaced 3 times.").ok();
-		FindDlg.close();
+		findDlg.close();
 		sleep(1);
-		app.dispatch(".uno:SelectAll");
-		typeKeys("<$copy>");
 		assertEquals(
 				"Apache Awesome OpenOffice is comprised of six personal productivity applications: a word processor (and its web-authoring component), spreadsheet, presentation graphics, drawing, equation editor, and database. Awesome OpenOffice is released on Windows, Solaris, Linux and Macintosh operation systems, with more communities joining, including a mature FreeBSD port. Awesome OpenOffice is localized, supporting over 110 languages worldwide. ",
-				app.getClipboard());
+				copyAll());
 	}
 
 	@Test
 	public void testFillInSpreadsheet() {
 		String[][] expected1 = new String[][] { { "1" }, { "1" }, { "1" }, { "1" }, { "1" }, { "1" }, };
 		String[][] expected2 = new String[][] { { "2" }, { "2" }, { "2" }, { "2" }, { "2" }, { "2" }, };
-
 		String[][] expected3 = new String[][] { { "Hi friends", "Hi friends", "Hi friends", "Hi friends" } };
-
 		String[][] expected4 = new String[][] { { "99999.999", "99999.999", "99999.999", "99999.999" } };
 		String[][] expected5 = new String[][] {
-
 		{ "99999.999", "-10" }, { "100000.999", "-9" }, { "100001.999", "-8" }, { "100002.999", "-7" }, { "100003.999", "-6" }
-
 		};
-		// Create a new text document
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-
-		CalcUtil.selectRange("C5");
+		newSpreadsheet();
+		SCTool.selectRange("C5");
 		typeKeys("1<enter>");
-		CalcUtil.selectRange("C5:C10");
+		SCTool.selectRange("C5:C10");
 		app.dispatch(".uno:FillDown");
-		assertArrayEquals("Fill Down:", expected1, CalcUtil.getCellTexts("C5:C10"));
+		assertArrayEquals("Fill Down:", expected1, SCTool.getCellTexts("C5:C10"));
 
-		CalcUtil.selectRange("D10");
+		SCTool.selectRange("D10");
 		typeKeys("2<enter>");
-		CalcUtil.selectRange("D5:D10");
+		SCTool.selectRange("D5:D10");
 		app.dispatch(".uno:FillUp");
-		assertArrayEquals("Fill Up:", expected2, CalcUtil.getCellTexts("D5:D10"));
+		assertArrayEquals("Fill Up:", expected2, SCTool.getCellTexts("D5:D10"));
 
-		CalcUtil.selectRange("A1");
+		SCTool.selectRange("A1");
 		typeKeys("Hi friends<enter>");
-		CalcUtil.selectRange("A1:D1");
+		SCTool.selectRange("A1:D1");
 		app.dispatch(".uno:FillRight");
-		assertArrayEquals("Fill Right:", expected3, CalcUtil.getCellTexts("A1:D1"));
+		assertArrayEquals("Fill Right:", expected3, SCTool.getCellTexts("A1:D1"));
 
-		CalcUtil.selectRange("D2");
+		SCTool.selectRange("D2");
 		typeKeys("99999.999<enter>");
-		CalcUtil.selectRange("A2:D2");
+		SCTool.selectRange("A2:D2");
 		app.dispatch(".uno:FillLeft");
-		assertArrayEquals("Fill left:", expected4, CalcUtil.getCellTexts("A2:D2"));
+		assertArrayEquals("Fill left:", expected4, SCTool.getCellTexts("A2:D2"));
 
-		CalcUtil.selectRange("E1");
+		SCTool.selectRange("E1");
 		typeKeys("99999.999<tab>-10<enter>");
 
-		CalcUtil.selectRange("E1:F5");
+		SCTool.selectRange("E1:F5");
 		app.dispatch(".uno:FillSeries");
-		FillSeriesDlg.ok();
+		fillSeriesDlg.ok();
 		sleep(1);
-		assertArrayEquals("Fill series..", expected5, CalcUtil.getCellTexts("E1:F5"));
+		assertArrayEquals("Fill series..", expected5, SCTool.getCellTexts("E1:F5"));
+		discard();
 	}
 
 	@Test
@@ -376,56 +366,55 @@ public class BasicFunctionTest {
 				{ "$10,000.00" },
 
 		};
-		String file = prepareData("sort.ods");
-		app.dispatch(".uno:Open");
-		submitOpenDlg(file);
+		open(prepareData("bvt/sort.ods"));
 		calc.waitForExistence(10, 2);
-		CalcUtil.selectRange("A1:A10");
+		SCTool.selectRange("A1:A10");
 		app.dispatch(".uno:DataSort");
-		SortWarningDlg_Current.click();
-		assertEquals(1, SortPage_By1.getSelIndex());
-		SortPage.ok();
+		sortWarningDlgCurrent.click();
+		assertEquals(1, sortPageBy1.getSelIndex());
+		sortPage.ok();
 		sleep(1);
-		assertArrayEquals("Sorted Data", expected1, CalcUtil.getCellTexts("A1:A10"));
-		CalcUtil.selectRange("B1:C10");
+		assertArrayEquals("Sorted Data", expected1, SCTool.getCellTexts("A1:A10"));
+		SCTool.selectRange("B1:C10");
 		app.dispatch(".uno:DataSort");
 
-		SortPage_By1.select(2);
-		SortPage_Descending1.check();
-		assertFalse(SortPage_By3.isEnabled());
-		assertFalse(SortPage_Ascending3.isEnabled());
-		assertFalse(SortPage_Descending3.isEnabled());
-		SortPage_By2.select(1);
-		assertTrue(SortPage_By3.isEnabled());
-		assertTrue(SortPage_Ascending3.isEnabled());
-		assertTrue(SortPage_Descending3.isEnabled());
-		SortPage_Descending2.check();
-		SortPage_By2.select(0);
-		assertFalse(SortPage_By3.isEnabled());
-		assertFalse(SortPage_Ascending3.isEnabled());
-		assertFalse(SortPage_Descending3.isEnabled());
-		SortPage_By2.select(1);
-		SortPage.ok();
+		sortPageBy1.select(2);
+		sortPageDescending1.check();
+		assertFalse(sortPageBy3.isEnabled());
+		assertFalse(sortPageAscending3.isEnabled());
+		assertFalse(sortPageDescending3.isEnabled());
+		sortPageBy2.select(1);
+		assertTrue(sortPageBy3.isEnabled());
+		assertTrue(sortPageAscending3.isEnabled());
+		assertTrue(sortPageDescending3.isEnabled());
+		sortPageDescending2.check();
+		sortPageBy2.select(0);
+		assertFalse(sortPageBy3.isEnabled());
+		assertFalse(sortPageAscending3.isEnabled());
+		assertFalse(sortPageDescending3.isEnabled());
+		sortPageBy2.select(1);
+		sortPage.ok();
 		sleep(1);
 
-		assertArrayEquals("Sorted Data", expected2, CalcUtil.getCellTexts("B1:C10"));
-		CalcUtil.selectRange("D1:D7");
+		assertArrayEquals("Sorted Data", expected2, SCTool.getCellTexts("B1:C10"));
+		SCTool.selectRange("D1:D7");
 		app.dispatch(".uno:DataSort");
-		SortWarningDlg_Current.click();
-		SortOptionsPage.select();
-		SortOptionsPage_RangeContainsColumnLabels.uncheck();
-		SortOptionsPage_CustomSortOrder.check();
-		SortOptionsPage_CustomSortOrderList.select("Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday");
-		SortOptionsPage.ok();
+		sortWarningDlgCurrent.click();
+		sortOptionsPage.select();
+		sortOptionsPageRangeContainsColumnLabels.uncheck();
+		sortOptionsPageCustomSortOrder.check();
+		sortOptionsPageCustomSortOrderList.select("Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday");
+		sortOptionsPage.ok();
 		sleep(1);
-		assertArrayEquals("Sorted Data", expected3, CalcUtil.getCellTexts("D1:D7"));
+		assertArrayEquals("Sorted Data", expected3, SCTool.getCellTexts("D1:D7"));
 
-		CalcUtil.selectRange("E1:E10");
+		SCTool.selectRange("E1:E10");
 		app.dispatch(".uno:DataSort");
-		SortWarningDlg_Current.click();
-		SortPage.ok();
+		sortWarningDlgCurrent.click();
+		sortPage.ok();
 		sleep(1);
-		assertArrayEquals("Sorted Data", expected4, CalcUtil.getCellTexts("E1:E10"));
+		assertArrayEquals("Sorted Data", expected4, SCTool.getCellTexts("E1:E10"));
+		discard();
 	}
 
 	/**
@@ -436,20 +425,19 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertChartInDraw() throws Exception {
-
 		// Create a new drawing document
-		app.dispatch("private:factory/sdraw");
-		draw.waitForExistence(10, 2);
-
+		newDrawing();
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
 		sleep(3);
 
 		// Verify if the chart is inserted successfully
-		assertTrue(chart.exists(3));
+		assertTrue("Chart Editor appears", chart.exists(3));
 		// Focus on edit pane
 		draw.click(5, 5);
 		sleep(1);
+		assertFalse("Chart Editor appears", chart.exists());
+		discard();
 	}
 
 	/**
@@ -460,20 +448,19 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertChartInDocument() throws Exception {
-
 		// Create a new text document
-		app.dispatch("private:factory/swriter");
-		writer.waitForExistence(10, 2);
-
+		newTextDocument();
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
 		sleep(3);
 
 		// Verify if the chart is inserted successfully
-		assertTrue(chart.exists(3));
+		assertTrue("Chart Editor appears", chart.exists(3));
 		// Focus on edit pane
 		writer.click(5, 5);
 		sleep(1);
+		assertFalse("Chart Editor appears", chart.exists());
+		discard();
 	}
 
 	/**
@@ -484,21 +471,20 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertChartInSpreadsheet() throws Exception {
-
 		// Create a new spreadsheet document
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-
+		newSpreadsheet();
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
 		sleep(3);
-		Chart_Wizard.ok();
+		chartWizard.ok();
 
 		// Verify if the chart is inserted successfully
-		assertTrue(chart.exists(3));
+		assertTrue("Chart Editor appears", chart.exists(3));
 		// Focus on edit pane
 		calc.click(5, 5);
 		sleep(1);
+		assertFalse("Chart Editor appears", chart.exists());
+		discard();
 	}
 
 	/**
@@ -509,21 +495,18 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertChartInPresentation() throws Exception {
-
 		// Create a new presentation document
-		app.dispatch("private:factory/simpress?slot=6686");
-		PresentationWizard.ok();
-		impress.waitForExistence(10, 2);
-
+		newPresentation();
 		// Insert a chart
 		app.dispatch(".uno:InsertObjectChart");
 		sleep(3);
-
 		// Verify if the chart is inserted successfully
-		assertTrue(chart.exists(3));
+		assertTrue("Chart Editor appears", chart.exists(3));
 		// Focus on edit pane
 		impress.click(5, 5);
 		sleep(1);
+		assertFalse("Chart Editor appears", chart.exists());
+		discard();
 	}
 
 	/**
@@ -534,24 +517,16 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertTableInDraw() throws Exception {
-
 		// Create a new drawing document
-		app.dispatch("private:factory/sdraw");
-		draw.waitForExistence(10, 2);
-
+		newDrawing();
 		// Insert a table
 		app.dispatch(".uno:InsertTable");
-		InsertTable.ok();
-		sleep(3);
-
-		// Verify if the table toolbar is active
-		typeKeys("123"); // Insert text to focus on table, to avoid Bug 120171
-							// on linux
-		assertTrue(Table_Toolbar.exists(3));
-
-		// Focus on edit pane
-		draw.click(5, 5);
+		insertTable.ok();
 		sleep(1);
+		draw.typeKeys("3");
+		assertTrue("Table Toolbar appears", tableToolbar.exists(3));
+//		assertEquals("The cell content", "3", copyAll());
+		discard();
 	}
 
 	/**
@@ -562,25 +537,17 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertTableInDocument() throws Exception {
-
 		// Create a new text document
-		app.dispatch("private:factory/swriter");
-		writer.waitForExistence(10, 2);
-
+		newTextDocument();
 		// Insert a table
 		app.dispatch(".uno:InsertTable");
-		writer_InsertTable.ok();
-		sleep(3);
-
-		// Verify if the table toolbar is active
-		assertTrue(Table_Toolbar.exists(3));
-
-		// // Check the statusbar to verify if the table is inserted
-		// successfully
-		// assertEquals("Table1:A1", StatusBar.getItemText(7));
-		// Focus on edit pane
-		writer.click(5, 5);
+		writerInsertTable.ok();
 		sleep(1);
+		writer.typeKeys("3");
+		// Verify if the table toolbar is active
+		assertTrue("Table Toolbar appears", tableToolbar.exists(3));
+//		assertEquals("The cell content", "3", copyAll());
+		discard();
 	}
 
 	/**
@@ -592,28 +559,17 @@ public class BasicFunctionTest {
 	 */
 	@Test
 	public void testInsertTableInPresentation() throws Exception {
-
 		// Create a new presentation document
-		app.dispatch("private:factory/simpress?slot=6686");
-		PresentationWizard.ok();
-		impress.waitForExistence(10, 2);
+		newPresentation();
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable");
-		InsertTable.ok();
-		sleep(3);
-
-		// Verify if the table toolbar is active
-		typeKeys("123"); // Insert text to focus on table, to avoid Bug 120171
-							// on linux
-		assertTrue(Table_Toolbar.exists(3));
-
-		// // Check the statusbar to verify if the table is inserted
-		// successfully
-		// assertEquals("Table selected", StatusBar.getItemText(0));
-		// Focus on edit pane
-		impress.click(5, 5);
+		insertTable.ok();
 		sleep(1);
+		impress.typeKeys("3");
+		assertTrue("Table Toolbar appears", tableToolbar.exists(3));
+//		assertEquals("The cell content", "3", copyAll());
+		discard();
 	}
 
 	/**
@@ -624,28 +580,24 @@ public class BasicFunctionTest {
 	 * @throws Exception
 	 */
 	@Test
-	public void testInsertFunctionInSCViaSumButton() throws Exception {
-
+	public void testSumInFormulaBar() throws Exception {
 		// Create a new spreadsheet document
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-
+		newSpreadsheet();
 		// Insert source numbers
 		String sourceNumber1 = "5";
 		String sourceNumber2 = "3";
 		String expectedResult = "8";
-		CalcUtil.selectRange("A1");
+		SCTool.selectRange("A1");
 		typeKeys(sourceNumber1);
-		CalcUtil.selectRange("B1");
+		SCTool.selectRange("B1");
 		typeKeys(sourceNumber2);
-
 		// Insert a function via Sum button
-		CalcUtil.selectRange("C1");
-		SC_InputBar_Sum.click();
+		SCTool.selectRange("C1");
+		scInputBarSum.click();
 		typeKeys("<enter>");
-
 		// Verify if the calculated result is equal to the expected result
-		assertEquals("The calculated result", expectedResult, CalcUtil.getCellText("C1"));
+		assertEquals("The calculated result", expectedResult, SCTool.getCellText("C1"));
+		discard();
 	}
 
 	/**
@@ -656,25 +608,23 @@ public class BasicFunctionTest {
 	 * @throws Exception
 	 */
 	@Test
-	public void testInsertFunctionInSCViaInputbar() throws Exception {
-
+	public void testInsertFunctionViaFormulaBar() throws Exception {
 		// Create a new spreadsheet document
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-
+		newSpreadsheet();
 		// Insert source numbers and expected result
 		String sourceData = "0";
 		String expectedResult = "1";
-		CalcUtil.selectRange("A1");
+		SCTool.selectRange("A1");
 		typeKeys(sourceData);
 
 		// Insert a function via inputbar: COS
-		CalcUtil.selectRange("D1");
-		SC_InputBar_Input.inputKeys("=COS(A1)");
+		SCTool.selectRange("D1");
+		scInputBarInput.inputKeys("=COS(A1)");
 		typeKeys("<enter>");
 
 		// Verify if the calculated result is equal to the expected result
-		assertEquals("The calculated result", expectedResult, CalcUtil.getCellText("D1"));
+		assertEquals("The calculated result", expectedResult, SCTool.getCellText("D1"));
+		discard();
 	}
 
 	/**
@@ -685,30 +635,25 @@ public class BasicFunctionTest {
 	 * @throws Exception
 	 */
 	@Test
-	public void testInsertFunctionInSCViaFunctionWizard() throws Exception {
-
+	public void testFunctionWizardInFormulaBar() throws Exception {
 		// Create a new spreadsheet document
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-
+		newSpreadsheet();
 		// Insert source number
 		String sourceNumber = "-5";
 		String expectedResult = "5";
-		CalcUtil.selectRange("A1");
+		SCTool.selectRange("A1");
 		typeKeys(sourceNumber);
 		typeKeys("<enter>");
-
 		// Insert a function via Function Wizard Dialog: ABS
-		CalcUtil.selectRange("B1");
+		SCTool.selectRange("B1");
 		app.dispatch(".uno:FunctionDialog");
 		// SC_FunctionWizardDlg_FunctionList.doubleClick(5, 5);
-		SC_FunctionWizardDlg_FunctionList.select("ABS");
-		SC_FunctionWizardDlg_Next.click(); // Use "Next" button
-
-		SC_FunctionWizardDlg_Edit1.inputKeys("A1");
-		SC_FunctionWizardDlg.ok();
-
+		scFunctionWizardDlgFunctionList.select("ABS");
+		scFunctionWizardDlgNext.click(); // Use "Next" button
+		scFunctionWizardDlgEdit1.inputKeys("A1");
+		scFunctionWizardDlg.ok();
 		// Verify if the calculated result is equal to the expected result
-		assertEquals("The calculated result", expectedResult, CalcUtil.getCellText("B1"));
+		assertEquals("The calculated result", expectedResult, SCTool.getCellText("B1"));
+		discard();
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/FileTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/FileTypeTest.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/FileTypeTest.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/FileTypeTest.java Fri Sep  7 02:29:53 2012
@@ -27,7 +27,7 @@ package testcase.gui.bvt;
 import static org.junit.Assert.*;
 import static org.openoffice.test.common.Testspace.*;
 import static org.openoffice.test.vcl.Tester.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import java.awt.Rectangle;
@@ -35,13 +35,13 @@ import java.awt.Rectangle;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
-import org.openoffice.test.common.FileUtil;
 import org.openoffice.test.common.GraphicsUtil;
 import org.openoffice.test.common.Logger;
 
-import testlib.gui.CalcUtil;
+import testlib.gui.SCTool;
 
 /**
  * 
@@ -51,16 +51,18 @@ public class FileTypeTest {
 	@Rule
 	public Logger log = Logger.getLogger(this);
 
-	@Before
-	public void setUp() throws Exception {
-		app.start(true);
+	@BeforeClass
+	public static void beforeClass() throws Exception {
+		app.clean();
 	}
 
-	@AfterClass
-	public static void afterClass() throws Exception {
+	@Before
+	public void before() {
 		app.close();
+		app.start();
 	}
-
+	
+	
 	/**
 	 * Test New/Save a text document
 	 * 
@@ -97,55 +99,30 @@ public class FileTypeTest {
 	}
 
 	private void saveNewDocument(String file) {
-		String saveTo = getPath("temp/" + file);
-		// Create a new text document
-		app.dispatch("private:factory/swriter");
-		writer.waitForExistence(10, 2);
-
-		// Input some text by keyboard
-		writer.focus();
-
-		String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? ";
-		typeText(text);
-		app.dispatch(".uno:SelectAll");
-		app.setClipboard(".wrong");
-		sleep(1);
-		typeKeys("<$copy>");
-		sleep(1);
-
+		String saveTo = "temp/" + file;
+		String text = "@AOO";
+		newTextDocument();
+		writer.typeKeys(text);
 		// Verify the text via system clip board
-		Assert.assertEquals("The typed text into writer", text, app.getClipboard());
+		Assert.assertEquals("The typed text into writer", text, copyAll());
 
-		// Set the text style
-		writer.openContextMenu();
 		// menuItem("Text Properties...").select();
 		app.dispatch(".uno:FontDialog");
-		EffectsPage.select();
-		EffectsPage_Color.select(6);
-		EffectsPage.ok();
-		sleep(2);
+		effectsPage.select();
+		effectsPageColor.select(6);
+		effectsPage.ok();
+		sleep(1);
 
 		// Save the text document
-		app.dispatch(".uno:SaveAs");
-		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		if (AlienFormatDlg.exists(3))
-			AlienFormatDlg.ok();
-
-		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc");
-		openStartcenter();
+		deleteFile(saveTo);
+		saveAs(saveTo);
+		close();
+		open(saveTo);
 		// Reopen the saved file
-		app.dispatch(".uno:Open");
-		submitOpenDlg(saveTo);
 		writer.waitForExistence(10, 2);
-
-		app.dispatch(".uno:SelectAll");
-		app.setClipboard(".wrong");
-		typeKeys("<$copy>");
 		sleep(1);
 		// Verify if the text still exists in the file
-		Assert.assertEquals("The typed text into writer is saved!", text, app.getClipboard());
+		Assert.assertEquals("The typed text into writer is saved!", text, copyAll());
 	}
 
 	@Test
@@ -179,25 +156,18 @@ public class FileTypeTest {
 	}
 
 	private void saveNewSpreadsheet(String file) {
-		String saveTo = getPath("temp/" + file);
-		String text = "Hello Openoffice";
-		app.dispatch("private:factory/scalc");
-		calc.waitForExistence(10, 2);
-		CalcUtil.selectRange("A65536");
-		typeKeys(text);
-		app.dispatch(".uno:SaveAs");
-		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		if (AlienFormatDlg.exists(3))
-			AlienFormatDlg.ok();
-		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc");
-		openStartcenter();
-		// Reopen the saved file
-		app.dispatch(".uno:Open");
-		submitOpenDlg(saveTo);
+		String saveTo = "temp/" + file;
+		String text = "@AOO";
+		newSpreadsheet();
+		SCTool.selectRange("A65536");
+		calc.typeKeys(text);
+		deleteFile(saveTo);
+		saveAs(saveTo);
+		close();
+		open(saveTo);
 		calc.waitForExistence(10, 2);
-		Assert.assertEquals("The typed text is saved!", text, CalcUtil.getCellText("A65536"));
+		sleep(1);
+		Assert.assertEquals("The typed text is saved!", text, SCTool.getCellText("A65536"));
 	}
 
 	@Test
@@ -231,34 +201,19 @@ public class FileTypeTest {
 	}
 
 	private void saveNewPresentation(String file) {
-		String saveTo = getPath("temp/" + file);
-		String text = "Hello Openoffice";
-		app.dispatch("private:factory/simpress?slot=6686");
-		PresentationWizard.ok();
-		impress.waitForExistence(10, 2);
-		sleep(2);
-		impress.click(0.01, 0.01);
-		typeKeys(text);
+		String saveTo = "temp/" + file;
+		String text = "@AOO";
+		newPresentation();
+		impress.typeKeys(text);
 		impress.doubleClick(0.1, 0.5);
-		app.dispatch(".uno:SaveAs");
-		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		if (AlienFormatDlg.exists(3))
-			AlienFormatDlg.ok();
-		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc");
-		openStartcenter();
-		// Reopen the saved file
-		app.dispatch(".uno:Open");
-		submitOpenDlg(saveTo);
+		deleteFile(saveTo);
+		saveAs(saveTo);
+		close();
+		open(saveTo);
 		impress.waitForExistence(10, 2);
-		impress.click(3, 3);
-		typeKeys("<tab><enter>");
-		app.dispatch(".uno:SelectAll");
-		// app.setClipboard(".wrong");
-		typeKeys("<$copy>");
 		sleep(1);
-		Assert.assertEquals("The typed text is saved!", text, app.getClipboard().trim());
+		impress.typeKeys("<tab><enter>");
+		Assert.assertEquals("The typed text is saved!", text, copyAll().trim());
 	}
 
 	// drawing
@@ -305,43 +260,25 @@ public class FileTypeTest {
 	 * @throws Exception
 	 */
 	public void saveNewDrawing(String filename) {
-		String saveTo = getPath("temp/" + filename);
+		String saveTo = "temp/" + filename;
 		String bmp_green = prepareData("image/green_256x256.bmp");
-
 		// Create a new drawing document
-		app.dispatch("private:factory/sdraw");
-		draw.waitForExistence(10, 2);
-
+		newDrawing();
 		// Insert a picture fully filled with green
 		app.dispatch(".uno:InsertGraphic");
 		submitOpenDlg(bmp_green);
-		sleep(3);
 		// Focus on edit pane
 		draw.click(5, 5);
 		sleep(1);
-
 		// Verify if the picture is inserted successfully
 		Rectangle rectangle = GraphicsUtil.findRectangle(draw.getScreenRectangle(), 0xFF00FF00);
 		assertNotNull("Green rectangle: " + rectangle, rectangle);
-
-		// Save the drawing
-		app.dispatch(".uno:SaveAs");
-		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		// If the format is supported by OO1.0, ask whether to change to the
-		// latest format
-		if (AlienFormatDlg.exists(3))
-			AlienFormatDlg.ok(); // Keep the current format
-
-		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc");
-		openStartcenter();
-
-		// Reopen the saved file
-		app.dispatch(".uno:Open");
-		submitOpenDlg(saveTo);
+		deleteFile(saveTo);
+		saveAs(saveTo);
+		close();
+		open(saveTo);
 		draw.waitForExistence(10, 2);
-
+		sleep(1);
 		// Verify if the picture still exists in the file
 		Rectangle rectangle1 = GraphicsUtil.findRectangle(draw.getScreenRectangle(), 0xFF00FF00);
 		assertNotNull("Green rectangle: " + rectangle1, rectangle1);
@@ -381,47 +318,23 @@ public class FileTypeTest {
 	 * @throws Exception
 	 */
 	public void saveNewMath(String filename) {
-		String saveTo = getPath("temp/" + filename);
+		String saveTo = "temp/" + filename;
+		String text = "5 times 3 = 15";
 		// Create a new math
-		app.dispatch("private:factory/smath");
-		math_EditWindow.waitForExistence(10, 2);
-		sleep(2);
+		newFormula();
 		// Insert a formula
-		String text = "5 times 3 = 15";
-		typeText(text);
-		app.dispatch(".uno:Select");
-		typeKeys("<$copy>");
-		sleep(1);
-
+		mathEditWindow.typeKeys(text);
 		// Verify the text via system clip board
-		assertEquals("The typed formula into math", text, app.getClipboard());
+		assertEquals("The typed formula into math", text, copyAll());
 
 		// Save the formula
-		app.dispatch(".uno:SaveAs");
-		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		// If the format is supported by OO1.0, ask whether to change to the
-		// latest format
-		if (AlienFormatDlg.exists(3))
-			AlienFormatDlg.ok(); // Keep the current format
-
-		// Close it by clicking main menu
-		app.dispatch(".uno:CloseDoc");
-		openStartcenter();
-
-		// Reopen the saved file
-		app.dispatch(".uno:Open");
-		submitOpenDlg(saveTo);
-		math_EditWindow.waitForExistence(10, 2);
-
-		// Verify if the formula still exists in the file
-		app.dispatch(".uno:Select");
-		typeKeys("<$copy>");
+		deleteFile(saveTo);
+		saveAs(saveTo);
+		close();
+		open(saveTo);
+		mathEditWindow.waitForExistence(10, 2);
 		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");
+		mathEditWindow.focus();
+		assertEquals("The typed formula into math is saved", text, copyAll());
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/SmokeTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/SmokeTest.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/SmokeTest.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/bvt/SmokeTest.java Fri Sep  7 02:29:53 2012
@@ -24,7 +24,7 @@ package testcase.gui.bvt;
 import static org.junit.Assert.*;
 import static org.openoffice.test.common.FileUtil.*;
 import static org.openoffice.test.common.Testspace.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import java.io.File;
@@ -44,10 +44,8 @@ public class SmokeTest {
 
 	@Before
 	public void setUp() throws Exception {
-		// app.getOpenOffice().cleanUserInstallation();
-		// app.start();
 		app.start(true); // Default to clean user installation
-		smoketestOutput = new File(oo.getUserInstallation(), "user/temp");
+		smoketestOutput = new File(aoo.getUserInstallation(), "user/temp");
 	}
 
 	@AfterClass
@@ -60,8 +58,7 @@ public class SmokeTest {
 		prepareData("TestExtension.oxt");
 		String file = prepareData("smoketestdoc.sxw");
 		// Open sample file smoketestdoc.sxw
-		app.dispatch(".uno:Open", 3);
-		submitOpenDlg(file);
+		open(file);
 		writer.waitForEnabled(10, 2);
 		// Run test cases
 		app.dispatch("vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?language=Basic&location=document", 120);

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/AddDeleteSymbolsFromCatalog.java Fri Sep  7 02:29:53 2012
@@ -47,14 +47,14 @@ public class AddDeleteSymbolsFromCatalog
 
 		// New a formula document
 		app.dispatch("private:factory/smath");
-		math_EditWindow.waitForExistence(10, 2);
+		mathEditWindow.waitForExistence(10, 2);
 
 		// Click catalog button
-		math_CatalogButton.click();
+		mathCatalogButton.click();
 
 		// Select "Special", click "Edit" button
-		math_SymbolsDlgListbox.select(2);
-		math_SymbolsDlgEditButton.click();
+		mathSymbolsDlgListbox.select(2);
+		mathSymbolsDlgEditButton.click();
 	}
 
 	@After
@@ -76,7 +76,7 @@ public class AddDeleteSymbolsFromCatalog
 		int nListCount;
 		int nIndex = 1;
 		do {
-			math_EditSymbolsDlgViewControl.click(100 * nIndex, 10); // risk:
+			mathEditSymbolsDlgViewControl.click(100 * nIndex, 10); // risk:
 																	// after 6
 																	// or 7
 																	// circles,
@@ -84,27 +84,27 @@ public class AddDeleteSymbolsFromCatalog
 																	// click out
 																	// of
 																	// ViewControl
-			selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+			selectedSymbol = mathEditSymbolsDlgSymbol.getText();
 			nIndex++;
 			// Find if the selected symbol is already in the list
 			bSelectSymbolNotInList = false;
-			nListCount = math_EditSymbolsDlgSymbol.getItemCount();
+			nListCount = mathEditSymbolsDlgSymbol.getItemCount();
 			for (int i = 0; i < nListCount; i++) {
-				if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) {
+				if (selectedSymbol.equals(mathEditSymbolsDlgSymbol.getItemText(i))) {
 					bSelectSymbolNotInList = true;
 					break;
 				}
 			}
 		} while (bSelectSymbolNotInList);
-		math_EditSymbolsDlgAdd.click();
-		math_EditSymbolsDlg.ok();
+		mathEditSymbolsDlgAdd.click();
+		mathEditSymbolsDlg.ok();
 
 		// Verify if the symbol is added to Symbol set
-		math_SymbolsDlgEditButton.click();
+		mathSymbolsDlgEditButton.click();
 		bSelectSymbolNotInList = false;
-		nListCount = math_EditSymbolsDlgSymbol.getItemCount();
+		nListCount = mathEditSymbolsDlgSymbol.getItemCount();
 		for (int i = 0; i < nListCount; i++) {
-			if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) {
+			if (selectedSymbol.equals(mathEditSymbolsDlgSymbol.getItemText(i))) {
 				bSelectSymbolNotInList = true;
 				break;
 			}
@@ -112,8 +112,8 @@ public class AddDeleteSymbolsFromCatalog
 		assertTrue("Symbol is not added to Symbol set", bSelectSymbolNotInList);
 
 		// Close all dialogs
-		math_EditSymbolsDlg.cancel();
-		math_SymbolsDlg.close();
+		mathEditSymbolsDlg.cancel();
+		mathSymbolsDlg.close();
 		app.dispatch(".uno:CloseDoc");
 	}
 
@@ -127,25 +127,25 @@ public class AddDeleteSymbolsFromCatalog
 
 		// Modify the font of selected symbol
 		// String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		int oldSymbolFontIndex = math_EditSymbolsDlgFont.getSelIndex();
-		int modifiedSymbolFondIndex = (oldSymbolFontIndex + 1 == math_EditSymbolsDlgFont.getItemCount()) ? 0 : (oldSymbolFontIndex + 1);
-		math_EditSymbolsDlgFont.select(modifiedSymbolFondIndex); // select the
+		int oldSymbolFontIndex = mathEditSymbolsDlgFont.getSelIndex();
+		int modifiedSymbolFondIndex = (oldSymbolFontIndex + 1 == mathEditSymbolsDlgFont.getItemCount()) ? 0 : (oldSymbolFontIndex + 1);
+		mathEditSymbolsDlgFont.select(modifiedSymbolFondIndex); // select the
 																	// next font
 																	// of old
 																	// font
-		String modifiedSymbolFont = math_EditSymbolsDlgFont.getSelText();
-		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		math_EditSymbolsDlgModify.click();
-		math_EditSymbolsDlg.ok();
+		String modifiedSymbolFont = mathEditSymbolsDlgFont.getSelText();
+		String selectedSymbol = mathEditSymbolsDlgSymbol.getText();
+		mathEditSymbolsDlgModify.click();
+		mathEditSymbolsDlg.ok();
 
 		// Verify if the font of symbol is modified successfully
-		math_SymbolsDlgEditButton.click();
-		math_EditSymbolsDlgSymbol.select(selectedSymbol);
-		assertEquals("Font of symbol is not modified successfully", modifiedSymbolFont, math_EditSymbolsDlgFont.getSelText());
+		mathSymbolsDlgEditButton.click();
+		mathEditSymbolsDlgSymbol.select(selectedSymbol);
+		assertEquals("Font of symbol is not modified successfully", modifiedSymbolFont, mathEditSymbolsDlgFont.getSelText());
 
 		// Close all dialogs
-		math_EditSymbolsDlg.cancel();
-		math_SymbolsDlg.close();
+		mathEditSymbolsDlg.cancel();
+		mathSymbolsDlg.close();
 		app.dispatch(".uno:CloseDoc");
 	}
 
@@ -159,28 +159,28 @@ public class AddDeleteSymbolsFromCatalog
 
 		// Modify the typeface of selected symbol
 		// String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		int oldSymbolTypefaceIndex = math_EditSymbolsDlgTypeface.getSelIndex();
-		int modifiedSymbolTypefaceIndex = (oldSymbolTypefaceIndex + 1 == math_EditSymbolsDlgTypeface.getItemCount()) ? 0 : (oldSymbolTypefaceIndex + 1);
-		math_EditSymbolsDlgTypeface.select(modifiedSymbolTypefaceIndex); // select
+		int oldSymbolTypefaceIndex = mathEditSymbolsDlgTypeface.getSelIndex();
+		int modifiedSymbolTypefaceIndex = (oldSymbolTypefaceIndex + 1 == mathEditSymbolsDlgTypeface.getItemCount()) ? 0 : (oldSymbolTypefaceIndex + 1);
+		mathEditSymbolsDlgTypeface.select(modifiedSymbolTypefaceIndex); // select
 																			// the
 																			// next
 																			// typeface
 																			// of
 																			// old
 																			// typeface
-		String modifiedSymbolTypeface = math_EditSymbolsDlgTypeface.getSelText();
-		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		math_EditSymbolsDlgModify.click();
-		math_EditSymbolsDlg.ok();
+		String modifiedSymbolTypeface = mathEditSymbolsDlgTypeface.getSelText();
+		String selectedSymbol = mathEditSymbolsDlgSymbol.getText();
+		mathEditSymbolsDlgModify.click();
+		mathEditSymbolsDlg.ok();
 
 		// Verify if the typeface of symbol is modified successfully
-		math_SymbolsDlgEditButton.click();
-		math_EditSymbolsDlgSymbol.select(selectedSymbol);
-		assertEquals("Typeface of symbol is not modified successfully", modifiedSymbolTypeface, math_EditSymbolsDlgTypeface.getSelText());
+		mathSymbolsDlgEditButton.click();
+		mathEditSymbolsDlgSymbol.select(selectedSymbol);
+		assertEquals("Typeface of symbol is not modified successfully", modifiedSymbolTypeface, mathEditSymbolsDlgTypeface.getSelText());
 
 		// Close all dialogs
-		math_EditSymbolsDlg.cancel();
-		math_SymbolsDlg.close();
+		mathEditSymbolsDlg.cancel();
+		mathSymbolsDlg.close();
 		app.dispatch(".uno:CloseDoc");
 	}
 
@@ -193,15 +193,15 @@ public class AddDeleteSymbolsFromCatalog
 	public void testDeleteSymbolFromCatalog() throws Exception {
 
 		// Delete the selected symbol
-		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		math_EditSymbolsDlgDelete.click();
-		math_EditSymbolsDlg.ok();
+		String selectedSymbol = mathEditSymbolsDlgSymbol.getText();
+		mathEditSymbolsDlgDelete.click();
+		mathEditSymbolsDlg.ok();
 
 		// Verify if the selected symbol is deleted successfully
-		math_SymbolsDlgEditButton.click();
+		mathSymbolsDlgEditButton.click();
 		boolean isDeleted = true;
-		for (int i = 0; i < math_EditSymbolsDlgSymbol.getItemCount(); i++) {
-			if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) {
+		for (int i = 0; i < mathEditSymbolsDlgSymbol.getItemCount(); i++) {
+			if (selectedSymbol.equals(mathEditSymbolsDlgSymbol.getItemText(i))) {
 				isDeleted = false;
 				break;
 			}
@@ -209,8 +209,8 @@ public class AddDeleteSymbolsFromCatalog
 		assertTrue("Symbol is not deleted successfully", isDeleted);
 
 		// Close all dialogs
-		math_EditSymbolsDlg.cancel();
-		math_SymbolsDlg.close();
+		mathEditSymbolsDlg.cancel();
+		mathSymbolsDlg.close();
 		app.dispatch(".uno:CloseDoc");
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/catalog/InputCharacterFromCatalogDlg.java Fri Sep  7 02:29:53 2012
@@ -47,10 +47,10 @@ public class InputCharacterFromCatalogDl
 
 		// New a formula document
 		app.dispatch("private:factory/smath");
-		math_EditWindow.waitForExistence(10, 2);
+		mathEditWindow.waitForExistence(10, 2);
 
 		// Click catalog button
-		math_CatalogButton.click();
+		mathCatalogButton.click();
 	}
 
 	@After
@@ -67,17 +67,17 @@ public class InputCharacterFromCatalogDl
 	public void testInputGreekFromCatalog() throws Exception {
 
 		// Select "Greek", click "Edit" button to get the selected Symbol
-		math_SymbolsDlgListbox.select(0);
-		math_SymbolsDlgEditButton.click();
-		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		math_EditSymbolsDlg.ok();
+		mathSymbolsDlgListbox.select(0);
+		mathSymbolsDlgEditButton.click();
+		String selectedSymbol = mathEditSymbolsDlgSymbol.getText();
+		mathEditSymbolsDlg.ok();
 
 		// Insert the selected symbol
-		math_SymbolsDlgInsertButton.click();
-		math_SymbolsDlgCloseButton.click();
+		mathSymbolsDlgInsertButton.click();
+		mathSymbolsDlgCloseButton.click();
 
 		// Verify if the symbol is inserted successfully
-		math_EditWindow.click(5, 5);
+		mathEditWindow.click(5, 5);
 		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
 		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard()); // add
@@ -104,17 +104,17 @@ public class InputCharacterFromCatalogDl
 	public void testInputIGreekFromCatalog() throws Exception {
 
 		// Select "iGreek", click "Edit" button to get the selected Symbol
-		math_SymbolsDlgListbox.select(1);
-		math_SymbolsDlgEditButton.click();
-		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		math_EditSymbolsDlg.ok();
+		mathSymbolsDlgListbox.select(1);
+		mathSymbolsDlgEditButton.click();
+		String selectedSymbol = mathEditSymbolsDlgSymbol.getText();
+		mathEditSymbolsDlg.ok();
 
 		// Insert the selected symbol
-		math_SymbolsDlgInsertButton.click();
-		math_SymbolsDlgCloseButton.click();
+		mathSymbolsDlgInsertButton.click();
+		mathSymbolsDlgCloseButton.click();
 
 		// Verify if the symbol is inserted successfully
-		math_EditWindow.click(5, 5);
+		mathEditWindow.click(5, 5);
 		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
 		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard()); // add
@@ -141,17 +141,17 @@ public class InputCharacterFromCatalogDl
 	public void testInputSpecialFromCatalog() throws Exception {
 
 		// Select "Special", "Insert" the default first symbol
-		math_SymbolsDlgListbox.select(2);
-		math_SymbolsDlgInsertButton.click();
+		mathSymbolsDlgListbox.select(2);
+		mathSymbolsDlgInsertButton.click();
 
 		// Click "Edit" button to get the selected Symbol
-		math_SymbolsDlgEditButton.click();
-		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
-		math_EditSymbolsDlg.ok();
-		math_SymbolsDlgCloseButton.click();
+		mathSymbolsDlgEditButton.click();
+		String selectedSymbol = mathEditSymbolsDlgSymbol.getText();
+		mathEditSymbolsDlg.ok();
+		mathSymbolsDlgCloseButton.click();
 
 		// Verify if the symbol is inserted successfully
-		math_EditWindow.click(5, 5);
+		mathEditWindow.click(5, 5);
 		app.dispatch(".uno:Select");
 		app.dispatch(".uno:Copy");
 		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard()); // add

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/formula/importexport/CreateFormulaInDifferentWays.java Fri Sep  7 02:29:53 2012
@@ -27,7 +27,7 @@ package testcase.gui.formula.importexpor
 import static org.junit.Assert.*;
 import static org.openoffice.test.common.Testspace.*;
 import static org.openoffice.test.vcl.Tester.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import org.junit.After;
@@ -68,12 +68,12 @@ public class CreateFormulaInDifferentWay
 	public void testElementsWindowActive() throws Exception {
 
 		// Check if the "View->Elements" menu is selected
-		boolean viewElements = math_ElementsWindow.exists();
+		boolean viewElements = mathElementsWindow.exists();
 
 		// Active or inactive the Elements window
 		app.dispatch(".uno:ToolBox");
 
-		assertNotSame("Elements window active/inactive failed", viewElements, math_ElementsWindow.exists());
+		assertNotSame("Elements window active/inactive failed", viewElements, mathElementsWindow.exists());
 	}
 
 	/**
@@ -86,14 +86,14 @@ public class CreateFormulaInDifferentWay
 		String saveTo = getPath("temp/" + "FormulaFromElements.odf");
 
 		// Make Elements window pop up
-		if (!math_ElementsWindow.exists()) {
+		if (!mathElementsWindow.exists()) {
 			app.dispatch(".uno:ToolBox");
 		}
 
 		// Click a formula in Elements window and edit the formula in the
 		// commands window
-		math_ElementsRelations.click();
-		math_ElementsRelationsNotEqual.click();
+		mathElementsRelations.click();
+		mathElementsRelationsNotEqual.click();
 		typeKeys("a");
 		app.dispatch(".uno:NextMark");
 		typeKeys("b");
@@ -115,7 +115,7 @@ public class CreateFormulaInDifferentWay
 		openStartcenter();
 		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
-		math_EditWindow.waitForExistence(10, 2);
+		mathEditWindow.waitForExistence(10, 2);
 
 		// Verify if the formula still exists in the file, and correct
 		app.dispatch(".uno:Select");
@@ -138,7 +138,7 @@ public class CreateFormulaInDifferentWay
 
 		// Right click in equation editor, choose "Functions->More->arcsin(x)",
 		// input a
-		math_EditWindow.rightClick(5, 5);
+		mathEditWindow.rightClick(5, 5);
 		typeKeys("<down>");
 		typeKeys("<down>");
 		typeKeys("<down>");
@@ -168,7 +168,7 @@ public class CreateFormulaInDifferentWay
 		openStartcenter();
 		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
-		math_EditWindow.waitForExistence(10, 2);
+		mathEditWindow.waitForExistence(10, 2);
 
 		// Verify if the formula still exists in the file, and correct
 		app.dispatch(".uno:Select");
@@ -189,14 +189,14 @@ public class CreateFormulaInDifferentWay
 	public void testUndoRedoInMath() throws Exception {
 
 		// Make Elements window pop up
-		if (!math_ElementsWindow.exists()) {
+		if (!mathElementsWindow.exists()) {
 			app.dispatch(".uno:ToolBox");
 		}
 
 		// Click a formula in Elements window and edit the formula in the
 		// commands window
-		math_ElementsUnaryBinary.click();
-		math_ElementsUnaryBinaryPlus.click();
+		mathElementsUnaryBinary.click();
+		mathElementsUnaryBinaryPlus.click();
 		typeKeys("a"); // "+a";
 
 		// Undo and verify if it works fine

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/Filter.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/Filter.java?rev=1381843&r1=1380113&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/Filter.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/Filter.java Fri Sep  7 02:29:53 2012
@@ -23,10 +23,10 @@
  * 
  */
 
-package testcase.gui.performance.benchmark;
+package testcase.gui.pvt;
 
 import static org.openoffice.test.vcl.Tester.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import java.io.FileNotFoundException;
@@ -275,8 +275,8 @@ public class Filter {
 		long tr = 0;
 		String file = Testspace.prepareData(fileName);
 		startcenter.menuItem("File->Open...").select();
-		FilePicker_Path.setText(file);
-		FilePicker_Open.click();
+		filePickerPath.setText(file);
+		filePickerOpen.click();
 		// submitOpenDlg(file);
 		tr = System.currentTimeMillis();
 		while (true) {
@@ -325,8 +325,8 @@ public class Filter {
 		String file = Testspace.prepareData(fileName);
 		startcenter.menuItem("File->Open...").select();
 		// submitOpenDlg(file);
-		FilePicker_Path.setText(file);
-		FilePicker_Open.click();
+		filePickerPath.setText(file);
+		filePickerOpen.click();
 		tr = System.currentTimeMillis();
 		while (true) {
 			while (!statusbar("FWK_HID_STATUSBAR").exists()) {

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/GenerateReports.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/GenerateReports.java?rev=1381843&r1=1380113&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/GenerateReports.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/pvt/GenerateReports.java Fri Sep  7 02:29:53 2012
@@ -23,10 +23,10 @@
  * 
  */
 
-package testcase.gui.performance.benchmark;
+package testcase.gui.pvt;
 
 import static org.openoffice.test.vcl.Tester.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import java.io.BufferedReader;
@@ -41,7 +41,7 @@ import java.util.Map;
 
 import org.openoffice.test.common.FileUtil;
 
-import testlib.gui.CalcUtil;
+import testlib.gui.SCTool;
 
 public class GenerateReports {
 	static public void computeResults(String resultDir) {
@@ -158,7 +158,7 @@ public class GenerateReports {
 		submitOpenDlg(report_dir);
 		sleep(10);
 
-		CalcUtil.selectRange("Spread.F1");
+		SCTool.selectRange("Spread.F1");
 		calc.menuItem("Insert->Columns").select();
 		// SC_InsertColumnsRowsdialog.ok();
 		sleep(1);
@@ -237,7 +237,7 @@ public class GenerateReports {
 			// result = raw_data.get(raw_data.size() - 2) + "/ " +
 			// raw_data.get(raw_data.size() - 1);
 		}
-		CalcUtil.selectRange(cell);
+		SCTool.selectRange(cell);
 		typeKeys(result + "<enter>");
 	}
 

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/cell/InserCells.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/cell/InserCells.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/cell/InserCells.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/cell/InserCells.java Fri Sep  7 02:29:53 2012
@@ -1,7 +1,7 @@
 package testcase.gui.sc.cell;
 
 import static org.junit.Assert.*;
-import static testlib.gui.AppUtil.*;
+import static testlib.gui.AppTool.*;
 import static testlib.gui.UIMap.*;
 
 import org.junit.After;
@@ -10,7 +10,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
 
-import testlib.gui.CalcUtil;
+import testlib.gui.SCTool;
 
 /**
  * Before running the testing class, you need specify the AOO location firstly
@@ -46,14 +46,14 @@ public class InserCells {
 	public void testShiftRowandColumn() {
 
 		// Input data to cell range A1:B2
-		CalcUtil.selectRange("A1");
+		SCTool.selectRange("A1");
 		typeKeys("1<right>2<down><left>3<right>4");
 
 		// Set expected result after executing shift cell down
 		String[][] expectedShiftCellDownResult = new String[][] { { "", "2" }, { "1", "4" }, { "3", "" }, };
 
 		// Select Cell A1
-		CalcUtil.selectRange("Sheet1.A1");
+		SCTool.selectRange("Sheet1.A1");
 
 		// Launch insert cells dialog via menu
 		calc.menuItem("Insert->Cells...").select();
@@ -62,7 +62,7 @@ public class InserCells {
 		typeKeys("<enter>");
 
 		// Verify results after shift one cell down
-		assertArrayEquals("Verify results after shift one cell down", expectedShiftCellDownResult, CalcUtil.getCellTexts("A1:B3"));
+		assertArrayEquals("Verify results after shift one cell down", expectedShiftCellDownResult, SCTool.getCellTexts("A1:B3"));
 
 		// Set expected result after executing shift cell right
 		String[][] expectedShiftCellRightResult = new String[][] { { "", "1", "2" }, { "3", "4", "" }, };
@@ -71,7 +71,7 @@ public class InserCells {
 		calc.menuItem("Edit->Undo: Insert").select();
 
 		// Select cell B2
-		CalcUtil.selectRange("Sheet1.A1");
+		SCTool.selectRange("Sheet1.A1");
 
 		// Launch insert cells dialog via menu
 		calc.menuItem("Insert->Cells...").select();
@@ -81,7 +81,7 @@ public class InserCells {
 		typeKeys("<enter>");
 
 		// Verify results after shift one cell right
-		assertArrayEquals("Verify results after shift one cell right", expectedShiftCellRightResult, CalcUtil.getCellTexts("A1:C2"));
+		assertArrayEquals("Verify results after shift one cell right", expectedShiftCellRightResult, SCTool.getCellTexts("A1:C2"));
 
 		// Set expected result after executing insert entire row
 		String[][] expectedEntireRowResult = new String[][] { { "", "" }, { "1", "2" }, { "3", "4" }, };
@@ -90,7 +90,7 @@ public class InserCells {
 		calc.menuItem("Edit->Undo: Insert").select();
 
 		// Select Cell B2
-		CalcUtil.selectRange("Sheet1.A1");
+		SCTool.selectRange("Sheet1.A1");
 
 		// Launch insert cells dialog via menu
 		calc.menuItem("Insert->Cells...").select();
@@ -100,7 +100,7 @@ public class InserCells {
 		typeKeys("<enter>");
 
 		// Verify results after insert entire row
-		assertArrayEquals("Verify results after insert entire row", expectedEntireRowResult, CalcUtil.getCellTexts("A1:B3"));
+		assertArrayEquals("Verify results after insert entire row", expectedEntireRowResult, SCTool.getCellTexts("A1:B3"));
 
 		// Set expected result after executing insert entire column
 		String[][] expectedEntireColumnResult = new String[][] {
@@ -111,7 +111,7 @@ public class InserCells {
 		calc.menuItem("Edit->Undo: Insert").select();
 
 		// Select Cell A1
-		CalcUtil.selectRange("Sheet1.A1");
+		SCTool.selectRange("Sheet1.A1");
 
 		// Launch insert cells dialog via menu
 		calc.menuItem("Insert->Cells...").select();
@@ -121,7 +121,7 @@ public class InserCells {
 		typeKeys("<enter>");
 
 		// Verify the results after inserting entire column
-		assertArrayEquals("Verify the results after inserting entire column", expectedEntireColumnResult, CalcUtil.getCellTexts("A1:C2"));
+		assertArrayEquals("Verify the results after inserting entire column", expectedEntireColumnResult, SCTool.getCellTexts("A1:C2"));
 
 	}
 

Modified: incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java?rev=1381843&r1=1381842&r2=1381843&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testcase/gui/sc/chart/ChartDialogSetting.java Fri Sep  7 02:29:53 2012
@@ -63,11 +63,11 @@ public class ChartDialogSetting {
 	 */
 	@Test
 	public void testChartDialogCancelBack() {
-		WizardNextButton.click();
-		assertTrue(ChartRangeChooseTabPage.isEnabled());
-		WizardBackButton.click();
-		assertTrue(ChartTypeChooseTabPage.isEnabled());
-		Chart_Wizard.cancel();
-		assertFalse(Chart_Wizard.exists());
+		wizardNextButton.click();
+		assertTrue(chartRangeChooseTabPage.isEnabled());
+		wizardBackButton.click();
+		assertTrue(chartTypeChooseTabPage.isEnabled());
+		chartWizard.cancel();
+		assertFalse(chartWizard.exists());
 	}
 }



Mime
View raw message