merged in DEV300_m54

This commit is contained in:
sb
2009-08-05 09:18:12 +02:00
43 changed files with 7203 additions and 5894 deletions

View File

@@ -60,12 +60,13 @@ import stats.Summarizer;
import util.DynamicClassLoader;
/**
* The testbase for executing basic tests.
* @see lib.TestBase
*/
public class basic_fat implements TestBase {
public class basic_fat implements TestBase
{
public static boolean debug = false;
/**
@@ -73,7 +74,8 @@ public class basic_fat implements TestBase {
* @param param The test parameters.
* @param return True, if the test was executed.
*/
public boolean executeTest(TestParameters param) {
public boolean executeTest(TestParameters param)
{
DescGetter dg = new APIDescGetter();
String job = (String) param.get("TestJob");
OfficeProvider office = null;
@@ -88,7 +90,8 @@ public class basic_fat implements TestBase {
"DescriptionPath"),
debug);
if (entries == null) {
if (entries == null)
{
System.out.println("Couldn't get Description for Job");
return false;
@@ -97,7 +100,8 @@ public class basic_fat implements TestBase {
String ExclusionFile = (String) param.get("ExclusionList");
Vector exclusions = null;
if (ExclusionFile != null) {
if (ExclusionFile != null)
{
exclusions = getExclusionList(ExclusionFile, debug);
}
@@ -106,8 +110,10 @@ public class basic_fat implements TestBase {
System.out.print("> Connecting the Office ");
System.out.println("With " + conStr);
for (int l = 0; l < entries.length; l++) {
if (entries[l].hasErrorMsg) {
for (int l = 0; l < entries.length; l++)
{
if (entries[l].hasErrorMsg)
{
System.out.println(entries[l].ErrorMsg);
continue;
@@ -118,7 +124,8 @@ public class basic_fat implements TestBase {
XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
param);
if (msf == null) {
if (msf == null)
{
return false;
}
@@ -134,7 +141,8 @@ public class basic_fat implements TestBase {
tCase = (TestCase) new BasicTestCase(entry);
if (tCase == null) {
if (tCase == null)
{
sumIt.summarizeDown(entry, entry.ErrorMsg);
LogWriter sumObj = OutProducerFactory.createOutProducer(param);
@@ -152,16 +160,21 @@ public class basic_fat implements TestBase {
entry.UserDefinedParams = param;
tCase.setLogWriter((PrintWriter) log);
try {
try
{
tCase.initializeTestCase(param);
} catch (RuntimeException e) {
}
catch (RuntimeException e)
{
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
"AppProvider");
if (ph != null) {
if (ph != null)
{
OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");
if ((ow != null) && ow.isAlive()) {
if ((ow != null) && ow.isAlive())
{
ow.finish = true;
}
@@ -174,7 +187,8 @@ public class basic_fat implements TestBase {
TestEnvironment tEnv = tCase.getTestEnvironment(param);
if (tEnv == null) {
if (tEnv == null)
{
sumIt.summarizeDown(entry, "Unable to create testcase");
LogWriter sumObj = OutProducerFactory.createOutProducer(param);
@@ -184,10 +198,12 @@ public class basic_fat implements TestBase {
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
"AppProvider");
if (ph != null) {
if (ph != null)
{
OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");
if ((ow != null) && ow.isAlive()) {
if ((ow != null) && ow.isAlive())
{
ow.finish = true;
}
@@ -200,8 +216,10 @@ public class basic_fat implements TestBase {
System.out.println("created " + tCase.getObjectName());
for (int j = 0; j < entry.SubEntryCount; j++) {
if (!entry.SubEntries[j].isToTest) {
for (int j = 0; j < entry.SubEntryCount; j++)
{
if (!entry.SubEntries[j].isToTest)
{
Summarizer.summarizeDown(entry.SubEntries[j],
"not part of the job");
@@ -209,7 +227,8 @@ public class basic_fat implements TestBase {
}
if ((exclusions != null) &&
(exclusions.contains(entry.SubEntries[j].longName))) {
(exclusions.contains(entry.SubEntries[j].longName)))
{
Summarizer.summarizeDown(entry.SubEntries[j],
"known issue");
@@ -225,11 +244,13 @@ public class basic_fat implements TestBase {
entry.SubEntries[j].UserDefinedParams = param;
entry.SubEntries[j].Logger = ifclog;
if ((tEnv == null) || tEnv.isDisposed()) {
if ((tEnv == null) || tEnv.isDisposed())
{
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
"AppProvider");
if (ph != null) {
if (ph != null)
{
office.closeExistingOffice(param, true);
shortWait(5000);
}
@@ -250,15 +271,19 @@ public class basic_fat implements TestBase {
sumIfc.summary(entry.SubEntries[j]);
}
try {
try
{
tCase.cleanupTestCase(param);
} catch (Exception e) {
}
catch (Exception e)
{
log.println("TestCase already gone");
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
"AppProvider");
if (ph != null) {
if (ph != null)
{
office.closeExistingOffice(param, true);
shortWait(5000);
}
@@ -271,15 +296,18 @@ public class basic_fat implements TestBase {
sumObj.summary(entry);
}
if (entries.length > 1) {
if (entries.length > 1)
{
System.out.println();
int counter = 0;
System.out.println(
"Failures that appeared during scenario execution:");
for (int i = 0; i < entries.length; i++) {
if (!entries[i].State.endsWith("OK")) {
for (int i = 0; i < entries.length; i++)
{
if (!entries[i].State.endsWith("OK"))
{
System.out.println("\t " + entries[i].longName);
counter++;
}
@@ -292,19 +320,22 @@ public class basic_fat implements TestBase {
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
"AppProvider");
if (ph != null) {
if (ph != null)
{
office.closeExistingOffice(param, true);
}
return true;
}
protected TestEnvironment getEnv(DescEntry entry, TestParameters param) {
protected TestEnvironment getEnv(DescEntry entry, TestParameters param)
{
DynamicClassLoader dcl = new DynamicClassLoader();
String officeProviderName = (String) param.get("OfficeProvider");
AppProvider office = (AppProvider) dcl.getInstance(officeProviderName);
if (office == null) {
if (office == null)
{
System.out.println("ERROR: Wrong parameter 'OfficeProvider', " +
" it cannot be instantiated.");
System.exit(-1);
@@ -313,7 +344,8 @@ public class basic_fat implements TestBase {
XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
param);
if (msf == null) {
if (msf == null)
{
return null;
}
@@ -331,16 +363,20 @@ public class basic_fat implements TestBase {
TestEnvironment tEnv = null;
try {
try
{
tCase.initializeTestCase(param);
tEnv = tCase.getTestEnvironment(param);
} catch (java.lang.RuntimeException e) {
}
catch (java.lang.RuntimeException e)
{
System.out.println(e.getMessage());
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
"AppProvider");
if (ph != null) {
if (ph != null)
{
office.closeExistingOffice(param, true);
shortWait(5000);
}
@@ -352,37 +388,52 @@ public class basic_fat implements TestBase {
return tEnv;
}
protected void shortWait(int millis) {
try {
protected void shortWait(int millis)
{
try
{
Thread.sleep(millis);
} catch (java.lang.InterruptedException ie) {
}
catch (java.lang.InterruptedException ie)
{
}
}
protected Vector getExclusionList(String url, boolean debug) {
protected Vector getExclusionList(String url, boolean debug)
{
Vector entryList = new Vector();
String line = "#";
BufferedReader exclusion = null;
try {
try
{
exclusion = new BufferedReader(new FileReader(url));
} catch (java.io.FileNotFoundException fnfe) {
if (debug) {
}
catch (java.io.FileNotFoundException fnfe)
{
if (debug)
{
System.out.println("Couldn't find file " + url);
}
return entryList;
}
while (line != null) {
try {
if (!line.startsWith("#")) {
while (line != null)
{
try
{
if (!line.startsWith("#"))
{
entryList.add(line);
}
line = exclusion.readLine();
} catch (java.io.IOException ioe) {
if (debug) {
}
catch (java.io.IOException ioe)
{
if (debug)
{
System.out.println(
"Exception while reading exclusion list");
}
@@ -391,10 +442,14 @@ public class basic_fat implements TestBase {
}
}
try {
try
{
exclusion.close();
} catch (java.io.IOException ioe) {
if (debug) {
}
catch (java.io.IOException ioe)
{
if (debug)
{
System.out.println("Couldn't close file " + url);
}

View File

@@ -44,6 +44,8 @@ import java.lang.reflect.Method;
*/
public class Assurance
{
public static final boolean CONTINUE = true;
/** State of the current test method **/
protected boolean state = true;

View File

@@ -58,7 +58,8 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
**/
protected int mThreadTimeOut = 0;
/** Continue a test even if it did fail **/
public static final boolean CONTINUE = true;
// public static final boolean CONTINUE = true;
/** End a test if it did fail **/
public static final boolean BREAK = true;

View File

@@ -27,9 +27,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
package graphical;
import java.io.BufferedReader;
import java.io.File;
import java.io.RandomAccessFile;
import java.util.ArrayList;
@@ -37,10 +37,11 @@ import java.util.Enumeration;
/**
Helper class to give a simple API to read/write windows like ini files
*/
*/
/* public */ // is only need, if we need this class outside package convwatch
public class IniFile implements Enumeration
{
/**
* internal representation of the ini file content.
* Problem, if ini file changed why other write something difference, we don't realise this.
@@ -48,8 +49,8 @@ public class IniFile implements Enumeration
private String m_sFilename;
private ArrayList m_aList;
boolean m_bListContainUnsavedChanges = false;
private int m_aEnumerationPos = 0;
/**
open a ini file by it's name
@param _sFilename string a filename, if the file doesn't exist, a new empty ini file will create.
@@ -66,12 +67,12 @@ public class IniFile implements Enumeration
// }
}
public void insertFirstComment(String [] _aList)
public void insertFirstComment(String[] _aList)
{
if (m_aList.size() == 0)
{
// can only insert if there is nothing else already in the ini file
for (int i=0; i<_aList.length;i++)
for (int i = 0; i < _aList.length; i++)
{
m_aList.add(_aList[i]);
}
@@ -82,7 +83,7 @@ public class IniFile implements Enumeration
{
File aFile = new File(m_sFilename);
ArrayList aLines = new ArrayList();
if (! aFile.exists())
if (!aFile.exists())
{
GlobalLogWriter.get().println("couldn't find file '" + m_sFilename + "', will be created.");
// DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
@@ -90,9 +91,10 @@ public class IniFile implements Enumeration
return aLines;
}
RandomAccessFile aReader = null;
// BufferedReader aReader;
try
{
aReader = new RandomAccessFile(aFile,"r");
aReader = new RandomAccessFile(aFile, "r");
String aLine = "";
while (aLine != null)
{
@@ -135,7 +137,8 @@ public class IniFile implements Enumeration
{
return m_aList.size() > 1 ? true : false;
}
/**
/**
* Check if a given Section and Key exists in the ini file
* @param _sSectionName
* @param _sKey
@@ -154,9 +157,9 @@ public class IniFile implements Enumeration
private boolean isRemark(String _sLine)
{
if ( ((_sLine.length() < 2) ) ||
( _sLine.startsWith("#")) ||
( _sLine.startsWith(";")) )
if (((_sLine.length() < 2)) ||
(_sLine.startsWith("#")) ||
(_sLine.startsWith(";")))
{
return true;
}
@@ -165,7 +168,7 @@ public class IniFile implements Enumeration
private String getItem(int i)
{
return (String)m_aList.get(i);
return (String) m_aList.get(i);
}
private String buildSectionName(String _sSectionName)
@@ -173,6 +176,7 @@ public class IniFile implements Enumeration
String sFindSection = "[" + _sSectionName + "]";
return sFindSection;
}
private String sectionToString(String _sSectionName)
{
String sKeyName = _sSectionName;
@@ -183,6 +187,7 @@ public class IniFile implements Enumeration
}
return sKeyName;
}
private String toLowerIfNeed(String _sName)
{
return _sName.toLowerCase();
@@ -194,7 +199,7 @@ public class IniFile implements Enumeration
String sFindSection = toLowerIfNeed(buildSectionName(_sSection));
// ----------- find _sSection ---------------
int i;
for (i=0; i<m_aList.size();i++)
for (i = 0; i < m_aList.size(); i++)
{
String sLine = toLowerIfNeed(getItem(i).trim());
if (isRemark(sLine))
@@ -245,7 +250,7 @@ public class IniFile implements Enumeration
private int findKeyFromKnownSection(int _nSectionIndex, String _sKey)
{
_sKey = toLowerIfNeed(_sKey);
for (int j=_nSectionIndex + 1; j<m_aList.size();j++)
for (int j = _nSectionIndex + 1; j < m_aList.size(); j++)
{
String sLine = getItem(j).trim();
@@ -280,7 +285,7 @@ public class IniFile implements Enumeration
{
_sKey = toLowerIfNeed(_sKey);
int i = _nSectionIndex + 1;
for (int j=i; j<m_aList.size();j++)
for (int j = i; j < m_aList.size(); j++)
{
String sLine = getItem(j).trim();
@@ -332,7 +337,6 @@ public class IniFile implements Enumeration
*/
// private int m_nCurrentPosition;
// private String m_sOldKey;
public String getValue(String _sSection, String _sKey)
{
String sValue = "";
@@ -359,7 +363,6 @@ public class IniFile implements Enumeration
// }
// return "";
// }
/**
* Returns the value at Section, Key converted to an integer
* Check with hasValue(Section, Key) to check before you get into trouble.
@@ -378,7 +381,7 @@ public class IniFile implements Enumeration
{
nValue = Integer.valueOf(sValue).intValue();
}
catch(java.lang.NumberFormatException e)
catch (java.lang.NumberFormatException e)
{
GlobalLogWriter.get().println("IniFile.getIntValue(): Caught a number format exception, return the default value.");
}
@@ -390,6 +393,7 @@ public class IniFile implements Enumeration
{
store();
}
/**
write back the ini file to the disk, only if there exist changes
* @deprecated use close() instead!
@@ -423,22 +427,26 @@ public class IniFile implements Enumeration
try
{
RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw");
for (int i=0; i<m_aList.size();i++)
for (int i = 0; i < m_aList.size(); i++)
{
String sLine = getItem(i);
if (sLine.startsWith("["))
{
// write an extra empty line before next section.
aWriter.writeByte((int) '\n');
}
aWriter.writeBytes(sLine);
aWriter.writeByte((int)'\n');
aWriter.writeByte((int) '\n');
}
aWriter.close();
}
catch (java.io.FileNotFoundException fne)
{
GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename);
GlobalLogWriter.get().println("Message: " + fne.getMessage());
// DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
}
catch(java.io.IOException ie)
catch (java.io.IOException ie)
{
GlobalLogWriter.get().println("Exception occurs while writing to file " + m_sFilename);
GlobalLogWriter.get().println("Message: " + ie.getMessage());
@@ -446,12 +454,16 @@ public class IniFile implements Enumeration
}
}
public void insertValue(String _sSection, String _sKey, int _nValue)
{
insertValue(_sSection, _sKey, String.valueOf(_nValue));
}
public void insertValue(String _sSection, String _sKey, long _nValue)
{
insertValue(_sSection, _sKey, String.valueOf(_nValue));
}
/**
insert a value
there are 3 cases
@@ -551,12 +563,12 @@ public class IniFile implements Enumeration
//
// return sLocalValue;
// }
public void removeSection(String _sSectionToRemove)
{
public void removeSection(String _sSectionToRemove)
{
// first, search for the name
int i = findSection(_sSectionToRemove);
if (i == -1) {
if (i == -1)
{
// Section to remove not found, do nothing.
return;
}
@@ -568,7 +580,7 @@ public void removeSection(String _sSectionToRemove)
j = m_aList.size();
}
// remove all between first and second section
for(int k=i; k<j; k++)
for (int k = i; k < j; k++)
{
m_aList.remove(i);
}
@@ -579,7 +591,8 @@ public void removeSection(String _sSectionToRemove)
/**
* some tests for this class
*/
public static void main(String[] args) {
public static void main(String[] args)
{
String sTempFile = System.getProperty("java.io.tmpdir");
sTempFile += "inifile";
@@ -602,14 +615,13 @@ public void removeSection(String _sSectionToRemove)
aIniFile.close();
}
/**
* Enumeration Interface
* @return true, if there are more Key values
*/
public boolean hasMoreElements()
{
if (m_aEnumerationPos >=0 &&
if (m_aEnumerationPos >= 0 &&
m_aEnumerationPos < m_aList.size())
{
return true;
@@ -628,7 +640,7 @@ public void removeSection(String _sSectionToRemove)
{
while (i < m_aList.size())
{
String sLine = (String)m_aList.get(i);
String sLine = (String) m_aList.get(i);
if (sLine.startsWith("["))
{
return i;
@@ -648,7 +660,7 @@ public void removeSection(String _sSectionToRemove)
int nLineWithSection = findNextSection(m_aEnumerationPos);
if (nLineWithSection != -1)
{
String sSection = (String)m_aList.get(nLineWithSection);
String sSection = (String) m_aList.get(nLineWithSection);
m_aEnumerationPos = findNextSection(nLineWithSection + 1);
sSection = sectionToString(sSection);
return sSection;
@@ -670,8 +682,8 @@ public void removeSection(String _sSectionToRemove)
int nPosition = 0;
while ((nPosition = findNextSection(nPosition)) != -1)
{
nCount ++;
nPosition ++;
nCount++;
nPosition++;
}
return nCount;
}

View File

@@ -430,8 +430,8 @@ public class APIDescGetter extends DescGetter
return getDescArray(makeArray(ifc_names));
}
private static String entryType;
private static DescEntry createDescEntry(String meth_name, String ifc_name, DescEntry parent)
{
entryType = "service";
@@ -472,8 +472,8 @@ public class APIDescGetter extends DescGetter
private static void createIfcName(String ifc_name, ArrayList meth_names, DescEntry ifcDesc)
{
}
/**
* This method ensures that XComponent will be the last in the list of interfaces
*/

View File

@@ -36,6 +36,9 @@ import java.io.PrintStream;
import java.io.LineNumberReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import lib.TestParameters;
import util.PropertyName;
import util.utils;
@@ -492,6 +495,29 @@ public class ProcessHandler
isStarted = false;
}
/**
* Returns the time in seconds since 1st January 1970
* @return
*/
public static long getSystemTime()
{
// Calendar cal = new GregorianCalendar();
// final long nTime = cal.getTimeInMillis();
final long nTime = System.currentTimeMillis();
return nTime;
}
private long m_nExactStartTimeInMillisec;
private void initialExactStartTime()
{
m_nExactStartTimeInMillisec = getSystemTime();
}
public long getProcessStartTime()
{
return m_nExactStartTimeInMillisec;
}
protected void execute()
{
if (isStarted())
@@ -511,7 +537,7 @@ public class ProcessHandler
log.print(" ");
}
log.println("");
initialExactStartTime();
m_aProcess = runtime.exec(cmdLineArray, envVars);
}
else
@@ -547,6 +573,9 @@ public class ProcessHandler
stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ");
stdIn = new PrintStream(m_aProcess.getOutputStream());
// int nExitValue = m_aProcess.exitValue();
// int dummy = 0;
dbg("execute: flush io-streams");
flushInput();

View File

@@ -48,7 +48,7 @@ public class Runner
private static long m_nStartTime;
private static long getStartTime()
public static long getRunnerStartTime()
{
return m_nStartTime;
}
@@ -69,7 +69,7 @@ public class Runner
/*
return the time, which is done until last startTime()
*/
private static long meanTime(long _nCurrentTimer)
public static long meanTime(long _nCurrentTimer)
{
if (_nCurrentTimer == 0)
{
@@ -109,6 +109,7 @@ public class Runner
}
return false;
}
private static boolean checkPathVariable(String _sPath, String delim)
{
String sPath = System.getProperty(_sPath);
@@ -117,7 +118,7 @@ public class Runner
StringTokenizer aTokenEnum = new StringTokenizer(sPath, delim);
while (aTokenEnum.hasMoreElements())
{
String sToken = (String)aTokenEnum.nextElement();
String sToken = (String) aTokenEnum.nextElement();
if (checkVariableForCygwin(sToken))
{
System.err.println("ERROR: OOoRunner detect cygwin path in '" + _sPath + "'");
@@ -132,7 +133,7 @@ public class Runner
{
// ----- check all System.getProperty(key) variables -----
String sOsName = System.getProperty("os.name");
if (! sOsName.toLowerCase().startsWith("windows"))
if (!sOsName.toLowerCase().startsWith("windows"))
{
// we need to check only on windows
return;
@@ -145,7 +146,7 @@ public class Runner
while (aEnum.hasMoreElements())
{
String sKey = (String)aEnum.nextElement();
String sKey = (String) aEnum.nextElement();
String sValue = System.getProperty(sKey);
if (checkVariableForCygwin(sValue))
@@ -165,10 +166,10 @@ public class Runner
aEnum = _aParams.keys();
while (aEnum.hasMoreElements())
{
String sKey = (String)aEnum.nextElement();
String sKey = (String) aEnum.nextElement();
if (_aParams.get(sKey) instanceof String)
{
String sValue = (String)_aParams.get(sKey);
String sValue = (String) _aParams.get(sKey);
if (checkVariableForCygwin(sValue))
{
@@ -240,7 +241,7 @@ public class Runner
checkAllVariablesForCygwinPath(param);
boolean worked = toExecute.executeTest(param);
long nTime = meanTime(getStartTime());
long nTime = meanTime(getRunnerStartTime());
String sBeautifyTime = beautifyTime(nTime);
System.out.println("Job run took: " + nTime + "ms " + " [" + sBeautifyTime + "]");

View File

@@ -56,18 +56,20 @@ import helper.ConfigHelper;
import java.util.Vector;
import lib.StatusException;
/**
* contains helper methods for the Desktop
*/
public class DesktopTools {
public class DesktopTools
{
/**
* Queries the XComponentLoader
*
* @param xMSF the MultiServiceFactory
* @return the gained XComponentLoader
*/
public static XComponentLoader getCLoader(XMultiServiceFactory xMSF) {
public static XComponentLoader getCLoader(XMultiServiceFactory xMSF)
{
XDesktop oDesktop = (XDesktop) UnoRuntime.queryInterface(
XDesktop.class, createDesktop(xMSF));
@@ -83,12 +85,16 @@ public class DesktopTools {
* @param xMSF the MultiServiceFactory
* @return the gained Object
*/
public static Object createDesktop(XMultiServiceFactory xMSF) {
public static Object createDesktop(XMultiServiceFactory xMSF)
{
Object oInterface;
try {
try
{
oInterface = xMSF.createInstance("com.sun.star.comp.framework.Desktop");
} catch (com.sun.star.uno.Exception e) {
}
catch (com.sun.star.uno.Exception e)
{
throw new IllegalArgumentException("Desktop Service not available");
}
@@ -100,7 +106,8 @@ public class DesktopTools {
* @param xMSF the XMultiServiceFactory
* @return XEnumeration of all components on the desktop
*/
public static XEnumeration getAllComponents(XMultiServiceFactory xMSF) {
public static XEnumeration getAllComponents(XMultiServiceFactory xMSF)
{
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
XDesktop.class, createDesktop(xMSF));
return xDesktop.getComponents().createEnumeration();
@@ -111,7 +118,8 @@ public class DesktopTools {
* @param xMSF the XMultiServiceFactory
* @return XComponent of the current component on the desktop
*/
public static XComponent getCurrentComponent(XMultiServiceFactory xMSF) {
public static XComponent getCurrentComponent(XMultiServiceFactory xMSF)
{
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
XDesktop.class, createDesktop(xMSF));
return xDesktop.getCurrentComponent();
@@ -122,7 +130,8 @@ public class DesktopTools {
* @param xMSF the XMultiServiceFactory
* @return XComponent of the current component on the desktop
*/
public static XFrame getCurrentFrame(XMultiServiceFactory xMSF) {
public static XFrame getCurrentFrame(XMultiServiceFactory xMSF)
{
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
XDesktop.class, createDesktop(xMSF));
return xDesktop.getCurrentFrame();
@@ -138,22 +147,33 @@ public class DesktopTools {
* @param xMSF the XMultiSerivceFactory
* @return returns an array of all open documents
*/
public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF) {
public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF)
{
Vector components = new Vector();
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
XDesktop.class, createDesktop(xMSF));
XEnumeration allComp = getAllComponents(xMSF);
while (allComp.hasMoreElements()){
try{
while (allComp.hasMoreElements())
{
try
{
XComponent xComponent = (XComponent) UnoRuntime.queryInterface(
XComponent.class, allComp.nextElement());
if (getDocumentType(xComponent) != null) components.add(xComponent);
if (getDocumentType(xComponent) != null)
{
components.add(xComponent);
}
} catch (com.sun.star.container.NoSuchElementException e) {
} catch ( com.sun.star.lang.WrappedTargetException e) {}
}
catch (com.sun.star.container.NoSuchElementException e)
{
}
catch (com.sun.star.lang.WrappedTargetException e)
{
}
}
return components.toArray();
}
@@ -170,28 +190,41 @@ public class DesktopTools {
* </ul>
* or <CODE>null</CODE>
*/
public static String getDocumentType(XComponent xComponent) {
XServiceInfo sInfo = (XServiceInfo)UnoRuntime.queryInterface(
public static String getDocumentType(XComponent xComponent)
{
XServiceInfo sInfo = (XServiceInfo) UnoRuntime.queryInterface(
XServiceInfo.class, xComponent);
if (sInfo == null) {
if (sInfo == null)
{
return "";
} else if (sInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")) {
}
else if (sInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument"))
{
return "scalc";
} else if (sInfo.supportsService("com.sun.star.text.TextDocument")) {
}
else if (sInfo.supportsService("com.sun.star.text.TextDocument"))
{
return "swriter";
} else if (sInfo.supportsService("com.sun.star.drawing.DrawingDocument")) {
}
else if (sInfo.supportsService("com.sun.star.drawing.DrawingDocument"))
{
return "sdraw";
} else if (sInfo.supportsService("com.sun.star.presentation.PresentationDocument")) {
}
else if (sInfo.supportsService("com.sun.star.presentation.PresentationDocument"))
{
return "simpress";
} else if (sInfo.supportsService("com.sun.star.formula.FormulaProperties")) {
}
else if (sInfo.supportsService("com.sun.star.formula.FormulaProperties"))
{
return "smath";
} else {
}
else
{
return null;
}
}
/**
* Opens a new document of a given kind
* with arguments
@@ -208,14 +241,17 @@ public class DesktopTools {
* @param xMSF the MultiServiceFactory
*/
public static XComponent openNewDoc(XMultiServiceFactory xMSF, String kind,
PropertyValue[] Args) {
PropertyValue[] Args)
{
XComponent oDoc = null;
try {
oDoc = getCLoader(xMSF)
.loadComponentFromURL("private:factory/" + kind,
try
{
oDoc = getCLoader(xMSF).loadComponentFromURL("private:factory/" + kind,
"_blank", 0, Args);
} catch (com.sun.star.uno.Exception e) {
}
catch (com.sun.star.uno.Exception e)
{
throw new IllegalArgumentException("Document could not be opened");
}
@@ -231,7 +267,8 @@ public class DesktopTools {
* @param xMSF the MultiServiceFactory
*/
public static XComponent loadDoc(XMultiServiceFactory xMSF, String url,
PropertyValue[] Args) {
PropertyValue[] Args)
{
XComponent oDoc = null;
if (Args == null)
{
@@ -254,34 +291,48 @@ public class DesktopTools {
* closes a given document
* @param DocumentToClose the document to close
*/
public static void closeDoc(XInterface DocumentToClose) {
public static void closeDoc(XInterface DocumentToClose)
{
if (DocumentToClose == null)
{
return;
}
String kd = System.getProperty("KeepDocument");
if (kd != null ) {
if (kd != null)
{
System.out.println("The property 'KeepDocument' is set and so the document won't be disposed");
return;
}
XModifiable modified = (XModifiable) UnoRuntime.queryInterface(
XModifiable.class, DocumentToClose);
XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
XCloseable.class, DocumentToClose);
XModifiable modified = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, DocumentToClose);
XCloseable closer = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, DocumentToClose);
try {
if (modified != null){
try
{
if (modified != null)
{
modified.setModified(false);
}
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
}
catch (com.sun.star.util.CloseVetoException e)
{
e.printStackTrace();
System.out.println("Couldn't close document");
} catch (com.sun.star.lang.DisposedException e) {
}
catch (com.sun.star.lang.DisposedException e)
{
e.printStackTrace();
System.out.println("Couldn't close document");
} catch (java.lang.NullPointerException e) {
}
catch (java.lang.NullPointerException e)
{
e.printStackTrace();
System.out.println("Couldn't close document");
} catch (com.sun.star.beans.PropertyVetoException e) {
}
catch (com.sun.star.beans.PropertyVetoException e)
{
e.printStackTrace();
System.out.println("Couldn't close document");
}
}
@@ -293,9 +344,11 @@ public class DesktopTools {
* @return a floating XWindow
*/
public static XWindowPeer createFloatingWindow(XMultiServiceFactory xMSF)
throws StatusException{
throws StatusException
{
return createFloatingWindow(xMSF, 500, 100, 400, 600);
}
/**
* Creates a floating XWindow on the given position and size.
* @return a floating XWindow
@@ -307,13 +360,17 @@ public class DesktopTools {
* @throws lib.StatusException if it is not possible to create a floating window a lib.StatusException was thrown
*/
public static XWindowPeer createFloatingWindow(XMultiServiceFactory xMSF, int X, int Y, int width, int height)
throws StatusException{
throws StatusException
{
XInterface oObj = null;
try {
try
{
oObj = (XInterface) xMSF.createInstance("com.sun.star.awt.Toolkit");
} catch (com.sun.star.uno.Exception e) {
}
catch (com.sun.star.uno.Exception e)
{
throw new StatusException("Couldn't get toolkit", e);
}
@@ -341,9 +398,12 @@ public class DesktopTools {
XWindowPeer xWindow = null;
try{
xWindow = tk.createWindow( descriptor );
}catch ( com.sun.star.lang.IllegalArgumentException e){
try
{
xWindow = tk.createWindow(descriptor);
}
catch (com.sun.star.lang.IllegalArgumentException e)
{
throw new StatusException("Could not create window", e);
}
@@ -355,27 +415,28 @@ public class DesktopTools {
* zoom to have a view over the hole page
* @param xDoc the document to zoom
*/
public static void zoomToEntirePage( XInterface xDoc){
try {
public static void zoomToEntirePage(XInterface xDoc)
{
try
{
XModel xMod = (XModel) UnoRuntime.queryInterface(XModel.class, xDoc);
XInterface oCont = xMod.getCurrentController();
XViewSettingsSupplier oVSSupp = (XViewSettingsSupplier)
UnoRuntime.queryInterface(XViewSettingsSupplier.class, oCont);
XViewSettingsSupplier oVSSupp = (XViewSettingsSupplier) UnoRuntime.queryInterface(XViewSettingsSupplier.class, oCont);
XInterface oViewSettings = oVSSupp.getViewSettings();
XPropertySet oViewProp = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, oViewSettings);
XPropertySet oViewProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oViewSettings);
oViewProp.setPropertyValue("ZoomType",
new Short(com.sun.star.view.DocumentZoomType.ENTIRE_PAGE));
utils.shortWait(5000);
} catch (Exception e){
}
catch (Exception e)
{
System.out.println("Could not zoom to entire page: " + e.toString());
}
}
/**
* This function docks the Stylist onto the right side of the window.</p>
* Note:<P>
@@ -383,9 +444,11 @@ public class DesktopTools {
* the chage of the docking will be effective at a restart.
* @param xMSF the XMultiServiceFactory
*/
public static void dockStylist(XMultiServiceFactory xMSF){
public static void dockStylist(XMultiServiceFactory xMSF)
{
// prepare Window-Settings
try {
try
{
ConfigHelper aConfig = new ConfigHelper(xMSF,
"org.openoffice.Office.Views", false);
@@ -396,18 +459,20 @@ public class DesktopTools {
"Windows", "5539", "WindowState", "952,180,244,349;1;0,0,0,0;");
aConfig.insertOrUpdateExtensibleGroupProperty(
"Windows", "5539", "UserData", "Data","V2,V,0,AL:(5,16,0/0/244/349,244;610)");
"Windows", "5539", "UserData", "Data", "V2,V,0,AL:(5,16,0/0/244/349,244;610)");
// Is node "SplitWindow2" available? If not, instert it.
aConfig.getOrInsertGroup("Windows", "SplitWindow2");
aConfig.insertOrUpdateExtensibleGroupProperty(
"Windows", "SplitWindow2","UserData", "UserItem","V1,2,1,0,5539");
"Windows", "SplitWindow2", "UserData", "UserItem", "V1,2,1,0,5539");
aConfig.flush();
aConfig = null;
} catch (com.sun.star.uno.Exception e) {
}
catch (com.sun.star.uno.Exception e)
{
e.printStackTrace();
}
}
@@ -418,7 +483,8 @@ public class DesktopTools {
* @deprecated
*/
@Deprecated
public static void bringWindowToFromt(XModel xModel){
public static void bringWindowToFromt(XModel xModel)
{
bringWindowToFront(xModel);
}
@@ -428,7 +494,8 @@ public class DesktopTools {
* Only the order of Office documents are changeable.
* @param xModel the XModel of the document to bring to top
*/
public static void bringWindowToFront(XModel xModel){
public static void bringWindowToFront(XModel xModel)
{
// System.out.println("DEBUG: bring to front xModel");
XTopWindow xTopWindow =
@@ -439,10 +506,12 @@ public class DesktopTools {
xTopWindow.toFront();
}
public static void bringWindowToFront(XComponent xComponent){
public static void bringWindowToFront(XComponent xComponent)
{
// System.out.println("DEBUG: bring to front xComponent");
XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent);
if (xModel != null){
if (xModel != null)
{
bringWindowToFront(xModel);
}
}

View File

@@ -186,7 +186,13 @@ public class utils {
} else {
if (fullDocPath.startsWith("/")) {
prefix = "file://";
} else {
// if (helper.OSHelper.isLinuxIntel())
// {
// prefix = "file:/";
// }
}
else
{
prefix = "file:///";
}
}

View File

@@ -36,6 +36,8 @@ eval 'exec perl -wS $0 ${1+"$@"}'
# smoketest - do the smoketest
#
use lib ("$ENV{SOLARENV}/bin/modules");
use File::Basename;
use File::Path;
use File::Copy;
@@ -47,12 +49,12 @@ use Getopt::Long;
# #
#########################
$is_debug = 0; # run without executing commands
$is_command_infos = 1; # print command details before exec
$is_command_infos = 0; # print command details before exec
$is_protocol_test = 0;
$is_remove_on_error = 0;
$is_remove_at_end = 1;
$is_do_deinstall = 0;
$is_admin_installation = 1;
$is_without_msiexec = 1;
$is_oo = 1;
$gui = $ENV{GUI};
@@ -165,7 +167,6 @@ elsif ($gui eq $cygwin) {
$bootstrapiniTemp = $bootstrapini . "_";
$CygwinLineends = $/;
$WinLineends = "\r\n";
&SetWinLineends();
$packpackage = "msi";
$installpath_without =~ s/\\/\//g;
}
@@ -173,6 +174,12 @@ else {
print_error ("not supported system\n",1);
}
if ($is_without_msiexec) {
require installer::windows::admin; import installer::windows::admin;
$installer::globals::logfilename = $ENV{DMAKE_WORK_DIR} . $PathSeparator . $ENV{OUTPATH} . $ENV{PROEXT} . $PathSeparator . "misc" . $PathSeparator . "installer.log";
$installer::globals::exithandler = \&install_error;
}
if ($is_oo) {
@install_list = ( 'instsetoo_native'
);
@@ -195,7 +202,8 @@ else {
'can not patch bottstrapini',
'msiexec failed. Maybe you have got an installed version',
'deinstallation is incomplete',
'this packformat is not supported for this environment'
'this packformat is not supported for this environment',
'can not set execute permission'
);
my $show_NoMessage = 0;
@@ -214,6 +222,7 @@ my $error_patchBootstrap = 10;
my $error_msiexec = 11;
my $error_deinst = 12;
my $error_packformat = 13;
my $error_permission = 14;
my $command_normal = 0;
my $command_withoutErrorcheck = 1;
@@ -528,6 +537,10 @@ sub doTest {
# execute_Command ($Command, $error_deinstall, $show_NoMessage, $command_normal);
}
sub install_error {
print_error ($error_messages[$error_setup], $error_setup);
}
sub doInstall {
my ($installsetpath, $dest_installdir) = @_;
my ($DirArray, $mask, $file, $Command, $optdir, $rpmdir, $system, $mach, $basedir, $output_ref, $olddir, $newdir);
@@ -557,6 +570,21 @@ sub doInstall {
print_error ("Installationset in $installsetpath is incomplete", 2);
}
foreach $file (@DirArray) {
if ($is_without_msiexec) {
if ($is_debug) {
print "Debugmode: no installation from $installsetpath\n";
}
else {
createPath ($dest_installdir, $error_setup);
installer::windows::admin::make_admin_install ($installsetpath . $file, $dest_installdir);
if ($gui eq $cygwin) {
$Command = "find $dest_installdir \\( -name \"installhelper\" -prune -o -name \"*.exe\" -o -name \"*.dll\" -o -name \"*.manifest\" -o -name \"*.bin\" -o -name \"*.jar\" \\) -exec chmod a+x {} \\;";
execute_Command ($Command, $error_permission, $show_Message, $command_normal);
}
}
}
else
{
if ($gui eq $cygwin) {
my $convertinstallset = ConvertCygwinToWin_Shell("$installsetpath$file");
my $convertdestdir = ConvertCygwinToWin_Shell($dest_installdir);
@@ -565,13 +593,8 @@ sub doInstall {
$Command = $_inst_cmd . " $convertinstallset -qn TARGETDIR=$convertdestdir";
}
else {
if ($is_admin_installation) {
$Command = "msiexec.exe /a $convertinstallset -qn TARGETDIR=$convertdestdir ALLUSERS=2";
}
else {
$Command = "msiexec.exe -i $convertinstallset -qn INSTALLLOCATION=$convertdestdir";
}
}
}
else {
$_inst_cmd=$ENV{SMOKETEST_SOINSTCMD};
@@ -579,29 +602,11 @@ sub doInstall {
$Command = $_inst_cmd . " $installsetpath$file -qn TARGETDIR=$dest_installdir";
}
else {
if ($is_admin_installation)
{
$Command = "msiexec.exe /a $installsetpath$file -qn TARGETDIR=$dest_installdir ALLUSERS=2";
}
else {
$Command = "msiexec.exe -i $installsetpath$file -qn INSTALLLOCATION=$dest_installdir";
}
}
}
if (!$is_oo and !$is_admin_installation) {
if ($gui eq $cygwin) {
my $convertdata = ConvertCygwinToWin_Shell($DATA);
$Command .= " TRANSFORMS=$convertdata" . "staroffice.mst";
}
else {
$Command .= " TRANSFORMS=$DATA" . "staroffice.mst";
}
}
execute_Command ($Command, $error_msiexec, $show_Message, $command_normal);
}
if (!$is_admin_installation) {
$Command = "$COPY_FILE \"$installsetpath" . "setup.ini" . "\" \"$dest_installdir\"";
execute_Command ($Command, $error_setup, $show_Message, $command_withoutOutput);
}
$basedir = $dest_installdir;
}
@@ -844,12 +849,7 @@ sub getInstset {
return ($NEWINSTSET, $INSTSET);
}
if (!isLocalEnv() and !defined($ENV{CWS_WORK_STAMP}) and (-e $SHIP)) {
my $last_lineend = $/;
if ($gui eq $cygwin) {
&SetCygwinLineends();
}
($NEWINSTSET, $INSTSET) = getSetFromServer();
$/ = $last_lineend;
}
else {
$InstDir="";
@@ -899,44 +899,6 @@ sub isLocalEnv {
return $returnvalue;
}
sub get_milestoneAndBuildID {
my ( $ws, $pf ) = @_;
my ($milestone, $buildid, $upd, $path, $updext);
if ( $ws =~ /^\D+(\d+)$/) {
$upd = $1;
}
if (defined ($ENV{UPDMINOREXT})) {
$updext = $ENV{UPDMINOREXT};
}
else {
$updext = "";
}
$path = "$ENV{SOLARVER}$PathSeparator$pf$PathSeparator" . "inc$updext$PathSeparator$upd" . "minor.mk";
print "$path\n" if $is_debug;
if ( !open(MINORMK,$path) ) {
print "FATAL: can't open $path\n";
return (0,0);
}
if (!eof(MINORMK)) {
while (<MINORMK>) {
chomp;
if ( /LAST_MINOR=(\w+)/ ) {
$milestone = $1;
}
elsif ( /BUILD=(\d+)/ ) {
$buildid = $1;
}
}
close(MINORMK);
}
return ($milestone, $buildid);
}
sub get_productcode {
my ( $installpath ) = @_;
my ($path, $productcode);
@@ -977,13 +939,11 @@ sub getSetFromServer {
my $workspace = $ENV{WORK_STAMP};
my $platform = $ENV{INPATH};
my $latestset;
my (@DirArray, $mask, $buildid);
my (@DirArray, $mask);
$SetupFullPath = $PORDUCT;
if ( ! ( $workspace && $platform ) ) {
print_error ( "Error: environment not set correctly.", 1);
}
# get latest broadcastet milestone and pack number
($milestone, $buildid) = get_milestoneAndBuildID( $workspace, $platform );
if (!defined($milestone)) {
print_error ("Milestone ist not defined!", 2);
}

View File

@@ -721,9 +721,9 @@ testcase tCreateNewBubbleChart
dim sInputFile as STRING
dim sOutputFile as STRING
dim sControlString as STRING
sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/ods/BubbleChartData.ods" )
sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/BubbleChartData.ods" )
sOutputFile = convertpath ( gOfficepath & "user/work/tCreateNewBubbleChart.ods" )
printlog "File / Load TesttoolPath/chart2/optional/input/ods/BubbleChartData.ods"
printlog "File / Load TesttoolPath/chart2/optional/input/BubbleChartData.ods"
call hFileOpen(sInputFile)
sleep(2)
printlog "Save document as Officepath/user/work/tCreateNewBubbleChart.ods"

View File

@@ -196,7 +196,7 @@ testcase tTextBox
endif
if fGetControlProperty("TextBox","AdditionalInfo") <> "my only friend the end." then
warnlog "the value: background is not saved"
warnlog "the AdditionalInfo value is not saved"
endif
call fSetControlProperty("TextBox","TextType","2") 'needed for activate scrollbar
sleep(1)

View File

@@ -119,6 +119,7 @@ function fSetControlProperty(sControlType, sPropertyName, sPropertyValue as stri
Align.select(Cint(sPropertyValue))
elseif sPropertyName = "AdditionalInfo" then
Information.setText(sPropertyValue)
Information.TypeKeys("<RETURN>",true)
elseif sPropertyName = "AutoComplete" then
AutoComplete.select(Cint(sPropertyValue))
elseif sPropertyName = "Background" then

View File

@@ -75,10 +75,7 @@ testcase tExtensionFileOpen
Add.click()
Kontext "OeffnenDlg"
if ( OeffnenDlg.exists( 2 ) ) then
if ( Dateiauswahl.getItemCount() <> 1 ) then
warnlog( "There should be exactly one item visible in the File Picker" )
else
DateiAuswahl.select( 1 )
DateiAuswahl.select( DateiAuswahl.getItemCount() )
cString = DateiAuswahl.getSelText()
if ( cString <> EXTENSION_NAME ) then
warnlog( "Incorrect extension listed. Please check path and filename" )
@@ -88,7 +85,6 @@ testcase tExtensionFileOpen
else
printlog( "Found correct extension, the dialog remembers the path" )
endif
endif
kontext "OeffnenDlg"
OeffnenDlg.cancel()
else

View File

@@ -51,7 +51,7 @@ testcase tLowerCaseMetaInf
dim irc as integer
printlog( "Install extension: " & cExtensionPath )
irc = hExtensionAddGUI( cExtensionPath, "AcceptLicense" )
irc = hExtensionAddGUI( cExtensionPath, "AcceptLicense,InstallForUser" )
if ( irc > 0 ) then

View File

@@ -154,7 +154,7 @@ testcase tExtensionOptions1
else
irc = hSelectOptionsItem( OPTIONS_ITEM , ITEM_POS_2 )
endif
if ( irc > 0 ) then
if ( irc > 1 ) then
warnlog( "Node <" & OPTIONS_ITEM & "> was not found in Tools/Options" )
else
printlog( "Node is present. Good." )

View File

@@ -74,8 +74,8 @@ testcase tPNG
endif
call hCloseDocument
endcase 'tPNG
endcase
'-------------------------------------------------------------------------------
testcase tSVM
@@ -244,7 +244,7 @@ testcase tSVM
call hCloseDocument
endcase
endcase 'tSVM
'-------------------------------------------------------------------------------
testcase tPDF
@@ -253,13 +253,18 @@ testcase tPDF
dim iFileSize(12) as long
dim i as integer
hFileOpen ( gTesttoolPath & "graphics\required\input\graphicexport_pdf." & ExtensionString )
'/// Export the file 12 times: ///'
'///+ every compression level (3) and every range (3), check if button in toolbar uses last settings (6) (-> 12) ///'
hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport_pdf."+ExtensionString ))
sleep (10)
'---------------------------------------------------------------------------------------------------------------------------------------------------------
'###### all / Screen optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document"
'///+ range = All
printlog " range = All"
'///+ compression = Screen optimized
printlog " compression = Screen optimized"
kontext "Standardbar"
@@ -268,7 +273,9 @@ testcase tPDF
'--------------------------------------------------------- Output the first file ---------------------------------------------------------------
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 1, TRUE, FALSE, 1, 1)
'/// Export using Button in toolbar
printlog "Export using Button in toolbar"
'///+ use the settings from the export before
printlog " use the settings from the export before"
kontext "Standardbar"
@@ -279,8 +286,11 @@ testcase tPDF
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 2, TRUE, FALSE, 1, 1) ' button in toolbar -> last settings have to be used
'###### range / Screen optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document"
'///+ range = Range
printlog " range = Range"
'///+ compression = Screen optimized
printlog " compression = Screen optimized"
kontext "Standardbar"
@@ -290,7 +300,9 @@ testcase tPDF
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 3, TRUE, FALSE, 2, 1, "2")
'/// Export using Button in toolbar
printlog "Export using Button in toolbar"
'///+ use the settings from the export before
printlog " use the settings from the export before"
kontext "Standardbar"
@@ -301,8 +313,11 @@ testcase tPDF
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 4, TRUE, FALSE, 2, 1) ' button in toolbar -> last settings have to be used
'###### all / Print optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document"
'///+ range = all
printlog " range = all"
'///+ compression = Print optimized
printlog " compression = Print optimized"
kontext "Standardbar"
@@ -312,7 +327,9 @@ testcase tPDF
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 5, TRUE, FALSE, 1, 2)
'/// Export using Button in toolbar
printlog "Export using Button in toolbar"
'///+ use the settings from the export before
printlog " use the settings from the export before"
kontext "Standardbar"
@@ -323,8 +340,11 @@ testcase tPDF
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 6, TRUE, FALSE, 1, 2) ' button in toolbar -> last settings have to be used
'###### range / Print optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document"
'///+ range = Range
printlog " range = Range"
'///+ compression = Screen optimized
printlog " compression = Screen optimized"
kontext "Standardbar"
@@ -334,7 +354,9 @@ testcase tPDF
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 7, TRUE, FALSE, 2, 2, "2")
'/// Export using Button in toolbar
printlog "Export using Button in toolbar"
' '///+ use the settings from the export before
printlog " use the settings from the export before"
kontext "Standardbar"
@@ -345,8 +367,11 @@ testcase tPDF
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 8, TRUE, FALSE, 2, 2) ' button in toolbar -> last settings have to be used
'###### all / Press optimized ######
'/// File->Export as PDF document ///'
printlog "File->Export as PDF document ///'"
'///+ range = all
printlog " range = all"
'///+ compression = Press optimized
printlog " compression = Press optimized"
kontext "Standardbar"
@@ -355,6 +380,8 @@ testcase tPDF
'------------------------------------------------------------ Output the ninth file ----------------------------------------------------------------
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 9, TRUE, FALSE, 1, 3)
'/// Export using Button in toolbar
'///+ use the settings from the export before
kontext "Standardbar"
checkexppdfwaitmax10sec
@@ -364,8 +391,11 @@ testcase tPDF
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 10, TRUE, FALSE, 1, 3) ' button in toolbar -> last settings have to be used
'###### range / Press optimized ######
'/// File->Export as PDF document ///'
printlog "File->Export as PDF document ///'"
'///+ range = all
printlog " range = all"
'///+ compression = Press optimized
printlog " compression = Press optimized"
kontext "Standardbar"
@@ -374,6 +404,8 @@ testcase tPDF
'----------------------------------------------------------- Output the eleventh file -------------------------------------------------------------
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 11, TRUE, FALSE, 2, 3, "2")
'/// Export using Button in toolbar
'///+ use the settings from the export before
kontext "Standardbar"
checkexppdfwaitmax10sec
@@ -389,21 +421,23 @@ testcase tPDF
for i=1 to 12
sPath = OutputGrafikTBO
sPath = sPath + i & ".pdf"
sPath = sPath + i + ".pdf"
iFileSize(i) = app.FileLen(sPath)
Printlog (" - " & i & ": " & " " & iFileSize(i) & " " & sPath
Printlog (" - " + i + ": " + " " + iFileSize(i) + " " + sPath
if (dir(sPath) <> "") then
sleep(1)
'/// the first line has to be '%PDF-1.4' ///'
sTemp = fGetFileText(sPath, 8)
if (sTemp <> "%PDF-1.4") then
Warnlog "File doesn't start with '%PDF-1.4' it is: '" & sTemp & "'"
Warnlog "File doesn't start with '%PDF-1.4' it is: '" + sTemp + "'"
endif
'/// the last line has to be '%%EOF' ///'
sTemp = left(fGetFileText(sPath, -6),5)
if (sTemp <> "%%EOF") then
Warnlog "File doesn't end with '%%EOF' it is: '" & sTemp & "'"
Warnlog "File doesn't end with '%%EOF' it is: '" + sTemp + "'"
endif
else
Warnlog "File was not exported to PDF :-( '" & sPath & "'"
Warnlog "File was not exported to PDF :-( '" + sPath + "'"
endif
next i
@@ -435,8 +469,8 @@ testcase tPDF
endif
call hCloseDocument()
endcase 'tPDF
endcase
'-------------------------------------------------------------------------------
testcase tPDF_Creator
@@ -452,22 +486,24 @@ testcase tPDF_Creator
dim sTextFiltername as String
dim sExtension() as String
sTemp = gTesttoolPath & "graphics\required\input\export_graphic3." & ExtensionString
sTemp = ConvertPath ( gTesttoolPath + "graphics\required\input\export_graphic3." + ExtensionString )
hFileOpen (sTemp)
sleep (30)
sPath = OutputGrafikTBO
sTemp = sPath
sPath = sPath & "L.pdf"
sPath = sPath + "L.pdf"
sleep(1)
hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1)
name sPath as sTemp&"L.txt"
name sPath as sTemp+"L.txt"
sleep (30)
iFileSize(3) = app.FileLen(sTemp&"L.txt")
iFileSize(3) = app.FileLen(sTemp+"L.txt")
iCreatorOffset = 0
sleep 5
'/// load file in writer as text ///'
hFileOpen(sTemp&"L.txt")
hFileOpen(sTemp+"L.txt")
'/// if dialog 'AsciiFilterOptionen' comes up, say OK ///'
Kontext "AsciiFilterOptionen"
If AsciiFilterOptionen.Exists(3) then
AsciiFilterOptionen.OK
@@ -495,11 +531,11 @@ testcase tPDF_Creator
sTemp = left(sTemp, inStr(sTemp, ">")-1)
sTemp2 = ""
for i = 0 to (len(sTemp)/4)-1
sTemp2 = sTemp2 + chr(" & H" & mid(sTemp,(i*4)+1, 4))
sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
next i
printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'"
printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then
warnlog "Application is different from Creator; is: '" & lCase(sTemp2) & "' should: '" & lCase(sapp) & "'"
warnlog "Application is different from Creator; is: '" + lCase(sTemp2) + "' should: '" + lCase(sapp) + "'"
endif
iCreatorOffset = iCreatorOffset + len(sTemp)
' /Producer
@@ -515,21 +551,21 @@ testcase tPDF_Creator
sTemp = left(sTemp, inStr(sTemp, ">")-1)
sTemp2 = ""
for i = 0 to (len(sTemp)/4)-1
sTemp2 = sTemp2 + chr(" & H" & mid(sTemp,(i*4)+1, 4))
sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
next i
printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'"
printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
if gOOO then
iCreatorOffset = iCreatorOffset + len(sTemp)
else
if bAsianLan then
iCreatorOffset = iCreatorOffset + 48
if (len(sTemp) <> 48) then
warnlog "Producer is different from 'StarSuite 8'; is: '" & sTemp2 & "'"
warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'"
endif
else
iCreatorOffset = iCreatorOffset + 52
if (len(sTemp) <> 52) then
warnlog "Producer is different from 'StarOffice 8'; is: '" & sTemp2 & "'"
warnlog "Producer is different from 'StarOffice 8'; is: '" + sTemp2 + "'"
endif
endif
endif
@@ -544,16 +580,16 @@ testcase tPDF_Creator
editcopy
sTemp = getClipboardText()
sTemp = left(sTemp, inStr(sTemp, ")")-1)
printlog sTemp & " -- " & len(sTemp)
printlog sTemp + " -- " + len(sTemp)
iCreatorOffset = iCreatorOffset + (len(sTemp) - 23)
if (len(sTemp) <> 23) then
warnlog "Date is longer than expected; is: '" & sTemp2 & "'"
warnlog "Date is longer than expected; is: '" + sTemp2 + "'"
endif
gApplication = sApp
call hCloseDocument
call hCloseDocument
endcase
endcase 'tPDF_Creator
'-------------------------------------------------------------------------------
testcase tSVG
@@ -617,11 +653,11 @@ testcase tSVG
'------------------------/
call hCloseDocument
endcase 'tSVG
endcase
'-------------------------------------------------------------------------------
testcase tBMP
qaerrorlog
qaerrorlog
dim x as integer
dim i as integer
dim bTemp as boolean
@@ -632,64 +668,52 @@ testcase tBMP
dim sY2 as string
dim sDocument as string
sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
'/// open the document
sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString)
hFileOpen sDocument
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then
'/// check if all properties have the right count, and depend on each other ///'
'/// 'Color Resolution' listbox contains eight items ///'
x = Farbaufloesung.GetItemCount
if x <> 8 then
warnlog "Color Resolution Count is wrong; should be:8, is:" & x
endif
if x <> 8 then warnlog "Color Resolution Count is wrong; should be:8, is:" + x
for i = 1 to x
Farbaufloesung.Select i
sleep 1
Printlog " - " & i & ": '" &Farbaufloesung.GetSelText & "'"
Printlog " - " + i + ": '" +Farbaufloesung.GetSelText + "'"
'/// checkbox RLE coding has to be enabled only for '4 and 8 bit' color palettes ///'
if ((i > 3) AND (i < 8)) then
if ( RLEKodierung.IsEnabled() ) then
warnlog "'RLE coding' is not checkable :-("
if RLEKodierung.IsEnabled <> TRUE then warnlog "'RLE coding' is not checkable :-("
else
warnlog "'RLE coding' is checkable :-("
if RLEKodierung.IsEnabled <> FALSE then warnlog "'RLE coding' is checkable :-("
endif
endif
next i
'/// if Mode 'original' is selected, DPI///'
Original.Check
if DPI.IsEnabled then
warnlog " :-("
endif
if Breite.IsEnabled then
warnlog " :-("
endif
if Hoehe.IsEnabled then
warnlog " :-("
endif
if DPI.IsEnabled then warnlog " :-("
if Breite.IsEnabled then warnlog " :-("
if Hoehe.IsEnabled then warnlog " :-("
Aufloesung.Check
x = DPI.GetItemCount
if x <> 4 then
warnlog "'DPI' Count is wrong; should be:4, is:" & x
endif
'/// 'DPI' listbox contains eight items ///'
if x <> 4 then warnlog "'DPI' Count is wrong; should be:4, is:" + x
for i = 1 to x
DPI.Select i
Printlog " - " & i & ": '" &DPI.GetSelText & "'"
Printlog " - " + i + ": '" +DPI.GetSelText + "'"
next i
if Breite.IsEnabled then
warnlog " :-("
endif
if Hoehe.IsEnabled then
warnlog " :-("
endif
if Breite.IsEnabled then warnlog " :-("
if Hoehe.IsEnabled then warnlog " :-("
Groesse.Check
if DPI.IsEnabled then
warnlog " :-("
endif
if DPI.IsEnabled then warnlog " :-("
Breite.More
Hoehe.Less
Sleep 1
'/// leave dialog with cancel -> there has to be no file created! ///'
BMPOptionen.Cancel
sleep 5
if ( dir(OutputGrafikTBO&".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
if ( dir(OutputGrafikTBO+".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
Printlog "ok :-)"
else
warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
@@ -705,6 +729,7 @@ testcase tBMP
Active.OK
end if
end if
Printlog "'/// now save it realy and load the file afterwards ///'"
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then
@@ -715,8 +740,8 @@ testcase tBMP
BMPOptionen.OK
sleep 5
endif
if ( dir(OutputGrafikTBO&".bmp") <> "") then
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO&".bmp" & "'"
if ( dir(OutputGrafikTBO+".bmp") <> "") then
Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+".bmp" + "'"
else
warnlog "File didn't get saved :-("
endif
@@ -724,16 +749,61 @@ testcase tBMP
sleep 5
hNewDocument()
sleep 5
Call hGrafikEinfuegen ( OutputGrafikTBO&".bmp" )
Call hGrafikEinfuegen ( OutputGrafikTBO+".bmp" )
endif
hCloseDocument ()
Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'"
qaerrorlog "#i93258#"
'hFileOpen (sDocument)
'kontext "Filterauswahl"
'if Filterauswahl.exists(10) then
' Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
' Filterauswahl.Cancel
' goto endsub
'endif
'' check if the document is writable
'if fIsDocumentWritable = false then
' ' make the document writable and check if it's succesfull
' if fMakeDocumentWritable = false then
' warnlog "The document can't be make writeable. Test stopped."
' goto endsub
' endif
'endif
'hTypeKeys ("<escape><tab>")
'fGetSizeXY sx1, sy, TRUE
'if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
' Kontext "BMPOptionen"
' if BMPOptionen.Exists (2) then
' Original.Check
' BMPOptionen.OK
' sleep 5
' endif
' if ( dir(OutputGrafikTBO + "1"+".bmp") <> "") then
' Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+".bmp" + "'"
' else
' warnlog "File didn't get saved :-("
' endif
' qaerrorlog "#i92902: Export to bmp: bmp options not respected"
'sleep 5
'hNewDocument()
'sleep 5
'Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+".bmp" )
'bTemp = FALSE
'fGetSizeXY sx1, sY, bTemp
'if (bTemp = FALSE) then
' warnlog "Selected original size NOT OK :-("
'endif
'endif
'hCloseDocument ()
Printlog "'/// now CREATE a rectangle, select it, save it in SIZE and load the file afterwards ///'"
hNewDocument()
hTypeKeys "<TAB>"
gMouseClick 50, 50
hRechteckErstellen ( 10, 10, 30, 40 )
if hCallExport (OutputGrafikTBO & "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
if hCallExport (OutputGrafikTBO + "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then
Groesse.Check
@@ -745,14 +815,14 @@ testcase tBMP
BMPOptionen.OK
sleep 5
endif
if ( dir(OutputGrafikTBO & "2" & ".bmp") <> "") then
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & ".bmp" & "'"
if ( dir(OutputGrafikTBO + "2"+".bmp") <> "") then
Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+".bmp" + "'"
else
warnlog "File didn't get saved :-("
endif
hCloseDocument ()
sleep 5
hFileOpen (OutputGrafikTBO & "2" & ".bmp")
hFileOpen (OutputGrafikTBO + "2"+".bmp")
kontext "Filterauswahl"
if Filterauswahl.exists then
Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
@@ -763,26 +833,32 @@ testcase tBMP
DocumentDraw.TypeKeys ("<escape><tab>")
qaerrorlog "#i92902: Export to bmp: bmp options not respected"
'ContextOriginalSize
'bTemp = FALSE
'fGetSizeXY sx1, sY, bTemp
'if (bTemp = FALSE) then
' warnlog "Selected original size NOT OK :-("
'endif
endif
if hCallExport (OutputGrafikTBO & "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
if hCallExport (OutputGrafikTBO + "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then
Groesse.Check
sX2 = Breite.GetText
if (LiberalMeasurement(sx1, sX2)) <> TRUE then
if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
Printlog "Width was ok. Expected: " + sx1 + "' was: '" + sX2 + "'"
else
warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
endif
endif
sY2 = Hoehe.GetText
if (LiberalMeasurement(sY, sY2)) <> TRUE then
if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
Printlog "Height was ok. Expected: " + sY + "' was: '" + sY2 + "'"
else
warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
endif
endif
BMPOptionen.Cancel
@@ -960,8 +1036,8 @@ testcase tEMF
endif
call hCloseDocument
endcase 'tEMF
endcase
'-------------------------------------------------------------------------------
testcase tMET
@@ -1157,8 +1233,8 @@ testcase tMET
endif
call hCloseDocument
endcase 'tMET
endcase
'-------------------------------------------------------------------------------
testcase tSWF
@@ -1182,8 +1258,8 @@ testcase tSWF
endif
call hCloseDocument
endcase 'tSWF
endcase
'------------------------------------------------------------------------------
testcase tWMF
@@ -1359,6 +1435,6 @@ testcase tWMF
endif
call hCloseDocument
endcase 'tWMF
endcase
'-------------------------------------------------------------------------

View File

@@ -45,16 +45,28 @@ testcase tiFormatArea
Dim Zaehler
dim Entf$
hNewDocument '/// New impress document ///'
hRechteckErstellen (20,20,60,60) '/// create rectangle ///'
Printlog " - Change Format" '/// change format for the rectangle ///'
FormatArea
Kontext
active.SetPage TabArea
Kontext "TabArea"
FillOptions.Select 5 '/// apply bitmap as texture ///'
BitmapList.Select 3 '/// Select "Water" ///'
Tile.Check '/// tile bitmap ///'
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
Anzeigen.Check '/// apply shadow ///'
Entfernung.SetText "30" '/// set angle to 30ó<30><C3B3><EFBFBD><EFBFBD><EFBFBD>///'
Entf$=Entfernung.GetText '/// change distance ///'
Farbe.Select 15 '/// select color 15///'
TabSchatten.OK '/// close dialog ///'
Sleep 3
Printlog " - Test various formats"
FormatArea '/// Format area, check if changes are saved for this object ///'
Kontext
active.SetPage TabArea
Kontext "TabArea"
@@ -63,12 +75,12 @@ testcase tiFormatArea
else
if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex
if NOT Tile.IsChecked then Warnlog "Tile is not checked"
' if Original.IsChecked then Warnlog "Original is not checked"
' if NOT Relativ.IsChecked then Warnlog "Relative is not checked"
' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText
' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText
' if NOT Zeile.IsChecked then Warnlog "Line is not checked"
' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText
' if Original.IsChecked then Warnlog "Original is not checked"
' if NOT Relativ.IsChecked then Warnlog "Relative is not checked"
' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText
' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText
' if NOT Zeile.IsChecked then Warnlog "Line is not checked"
' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
@@ -81,29 +93,35 @@ testcase tiFormatArea
end if
TabSchatten.Cancel
endcase
hCloseDocument '/// close document ///'
endcase 'tiFormatArea
'--------------------------------------------------------
testcase tdFormatArea1
Dim i
Dim j
Dim k
Dim m
Dim n
Dim Winkel_1 as string
Dim ZaehlerFarbe
Dim ZaehlerVerlauf
Dim ZaehlerSchraffur
Dim ZaehlerBitmap
Dim ColorName$
Dim i
Dim j
Dim k
Dim m
Dim n
Dim Winkel_1 as string
Dim ZaehlerFarbe
Dim ZaehlerVerlauf
Dim ZaehlerSchraffur
Dim ZaehlerBitmap
Dim ColorName$
ColorName$ = "Bullshit"
dim Zaehler as integer
Call hNewDocument '/// new document ///'
sleep 3
Call hRechteckErstellen (30,30,70,70) '/// create rectangle ///'
sleep 2
FormatArea '/// format area ///'
Kontext
Active.SetPage TabArea
Kontext "TabArea"
FillOptions.Select 1 '/// Select no fill ///'
sleep 2
TabArea.OK
sleep 1
@@ -111,6 +129,8 @@ testcase tdFormatArea1
Kontext
Active.SetPage TabArea
Kontext "TabArea"
sleep 1 '/// control if changes are still there after closing and reopening dialog ///'
FillOptions.Select 3'/// check gradient and select 1 ///'
ZaehlerVerlauf = GradientList.GetItemCount
for j = 1 To 2
GradientList.Select j
@@ -121,6 +141,7 @@ testcase tdFormatArea1
Kontext "TabArea"
PrintLog GradientList.GetSelText
next j
FillOptions.Select 4 '/// select hatching, control after closing and reopening dialog if changes are recognized ///'
HatchingList.GetItemCount
ZaehlerSchraffur = HatchingList.GetItemCount
for k=1 to 2'ZaehlerSchraffur
@@ -133,6 +154,7 @@ testcase tdFormatArea1
PrintLog HatchingList.GetSelText
next k
FillOptions.Select 5 '/// check bitmap, control if changes are permanent after closing and reopening dialog ///'
BitmapList.GetItemCount
ZaehlerBitmap = BitmapList.GetItemCount
for n=1 to ZaehlerBitmap
@@ -146,83 +168,92 @@ testcase tdFormatArea1
PrintLog BitmapList.GetSelText
next n
' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated"
' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated"
' if Relativ.IsChecked = False Then
' SetClipboard Breite.GetText
' Relativ.Check
' If Breite.GetText = GetClipboardText Then
' WarnLog " Relative isnt working"
' else
' PrintLog " Relative works"
' end if
' end if
'
' if Kacheln.IsChecked = True Then Kacheln.UnCheck
' Anpassen.Check
' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden"
' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert"
' Anpassen.Uncheck
' Original.Check
' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht"
' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert"
' Kacheln.Check
' setClipboard XOffset.GetText
' XOffset.More 3
' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert"
' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht"
' SetClipboard YOffset.GetText
' YOffset.More 5
' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert"
' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht"
' PrintLog " TabArea fertig"
if Tile.IsChecked = False Then Tile.Check '/// check tile ///'
' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated"
' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated"
' if Relativ.IsChecked = False Then
' SetClipboard Breite.GetText
' Relativ.Check
' If Breite.GetText = GetClipboardText Then
' WarnLog " Relative isnt working"
' else
' PrintLog " Relative works"
' end if
' end if
'
' if Kacheln.IsChecked = True Then Kacheln.UnCheck
' Anpassen.Check
' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden"
' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert"
' Anpassen.Uncheck
' Original.Check
' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht"
' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert"
' Kacheln.Check
' setClipboard XOffset.GetText
' XOffset.More 3
' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert"
' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht"
' SetClipboard YOffset.GetText
' YOffset.More 5
' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert"
' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht"
' PrintLog " TabArea fertig"
Kontext
Active.SetPage TabSchatten
Kontext "TabSchatten"
sleep 1
if Anzeigen.IsChecked = True Then Anzeigen.UnCheck '/// uncheck shadow ///'
sleep 1
if Entfernung.IsEnabled = False Then '/// check if shadow related controls are disabled with no shadow ///'
PrintLog " Show shadow works"
else
else
WarnLog " Show shadow does not work"
end if
end if
Entfernung.More 4
if GetClipboardText = Entfernung.GetText Then
Anzeigen.Check '/// check shadow ///'
SetClipboard Entfernung.GetText '/// change distance ///'
Entfernung.More 4
if GetClipboardText = Entfernung.GetText Then
WarnLog " Distance does not work"
else
else
PrintLog " Distance does work"
end if
end if
Farbe.Select 5 '/// change shadow color ///'
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
Farbe.Select 24
sleep 1
Farbe.Select 18
sleep 1
Farbe.Select 7
Aendern.Click
sleep 1
TabFarben.OK
FormatArea
Kontext
Active.SetPage TabArea
Kontext "TabArea"
FillOptions.Select 2
if ColourList.GetSelText = "Bullshit" Then
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
Farbe.Select 24
sleep 1
Farbe.Select 18
sleep 1
Farbe.Select 7
Farbname.SetText "Bullshit" '/// change color ///'
Aendern.Click
sleep 1
TabFarben.OK
FormatArea
Kontext
Active.SetPage TabArea
Kontext "TabArea"
FillOptions.Select 2
if ColourList.GetSelText = "Bullshit" Then
PrintLog " Color selection changed "
else
else
WarnLog " Color selection not changed"
end if
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
Farbmodell.Select 1
end if
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
Farbmodell.Select 1
Kontext
Kontext "TabFarben"
printlog " Selected colourmodel RGB?: "+Farbmodell.GetSelText
if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
Kontext
Active.SetPage TabFarben '/// test RGB color model ///'
Kontext "TabFarben"
Farbmodell.Select 1 '/// switch to RGB values ///' ' 33:RVB,CMJN
printlog " Selected colourmodel RGB?: "+Farbmodell.GetSelText
if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
try
R.SetText "50"
G.SetText "10"
@@ -243,13 +274,16 @@ if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
WarnLog " Chancges in RGB values not recognized, instead of R=50 , G=10 und B=90 it is " +R.GetText + " " + G.GetText + " " + B.GetText
end if
Farbe.Select 10
FarbName.SetText "Brighter" '/// add a color ///'
Hinzufuegen.Click
Farbe.Select "Brighter"
Loeschen.Click '/// delete color ///'
Kontext "Active"
Active.Yes
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
Bearbeiten.Click '/// edit color ///'
Kontext "FarbeDlg"
FarbeDlg.OK
sleep 2
@@ -270,11 +304,12 @@ if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
TabFarbverlaeufe.OK
sleep 2
FormatArea
FormatArea
sleep 2
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
KeineTransparenz.Check '/// check if controls are disabled if transparence is disabled ///'
Printlog "- No transparency is checked, all controls should be disabled."
if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled"
if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled"
@@ -285,7 +320,10 @@ if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
if MFStartwert.IsEnabled Then Warnlog "- Start value enabled"
if MFEndwert.IsEnabled Then Warnlog "- End value enabled"
LineareTransparenz.Check '/// check linear tranparency ///'
Printlog "- Set transparency to linear, all controls should be enabled now" '/// control if related controls are now enabled ///'
sleep 1
MFLinTransparenz.ToMax '/// change values of controls ///'
if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct"
MFLinTransparenz.ToMin
if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct"
@@ -319,6 +357,7 @@ if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
FormatArea
sleep 1
Kontext
Active.SetPage TabTransparenz '/// check if values are saved after closing and reopening dialog ///'
Kontext "TabTransparenz"
if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency"
next i
@@ -368,6 +407,7 @@ if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-("
if MFStartwert.GetText <> "20%" Then Warnlog "- Start-value was not set."
TabTransparenz.OK
Call hCloseDocument '/// close document ///'
endcase
endcase 'tdFormatArea1

View File

@@ -50,17 +50,25 @@ testcase tiDatei_Fuer_Anordnen_Erstellen
dim sTemp as string
dim i as integer
dim zaehler as integer
'/// This function creates the document, that will be used as reference and working object inthe following cases :-) ///'
'///'Dim Datei ' somewhere global :-) defined in calling sub! :sub im_107c_ ///
call hNewDocument '/// new document ///'
if Dir(Datei)<>"" then app.Kill(Datei) ' kill old file
for Zaehler = 1 to 3 '/// create 3 overlapping objects ///'
Kontext
Select Case Zaehler
Case 1: WL_SD_Wuerfel
gMouseMove (20,5, 80,60) '/// cubicel 20,5, 80,60 ///
Printlog " Object start ---------------------- "+ Zaehler +" cubicel "
Case 2: WL_SD_RechteckVoll
gMouseMove (40,35, 90,90) '/// rectangel 40,35, 90,90 ///
Printlog " Object start ---------------------- "+ Zaehler +" rectangel "
Case 3: WL_SD_Torus
gMouseMove (1,35, 60,95) '/// donut ;-) 1,35, 60,95 ///
Printlog " Object start ---------------------- "+ Zaehler +" donut "
End Select
sleep (1)
FormatArea '/// assign different area properties for created objects (use rnd function)///'
sleep (1)
kontext
Select Case Zaehler
@@ -81,10 +89,12 @@ testcase tiDatei_Fuer_Anordnen_Erstellen
TabFarben.OK
End Select
sleep 1
ContextPositionAndSize '/// save position and size values into varialbes ///'
sleep (1)
kontext
active.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
'/// the variables : Ueber_Text_[1-3] get set here ! with x position of object///
Select Case Zaehler
Case 1: Ueber_Text_1 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
Case 2: Ueber_Text_2 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
@@ -94,46 +104,62 @@ testcase tiDatei_Fuer_Anordnen_Erstellen
gMouseClick 96,5
next Zaehler
sleep 1
call hFileSaveAsKill (Datei) '/// save document ///'
printlog "OK saved at ", Datei
sleep 1
'/// select in default order and take Position X in mind ;-) ///'
'///+ has to be from bottom to top: cubicel, rectangel, donut ///'
sPrintCheckOrder (TRUE)
endcase
call hCloseDocument '/// close document ///'
endcase 'tiDatei_Fuer_Anordnen_Erstellen
'-------------------------------------------------------------------------------
testcase tdContextSendBackward
dim sTemp as string
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// select the middle object: rectangle, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
'/// Send Backward / [Strg]+[-] -> one level more to the back ///'
WL_TB_ANORDNUNG_WeiterNachHinten
'///+ has to be from bottom to top: rectangel cubicel donut ///'
sleep 2
sPrintCheckOrder
'/// deselect all ///'
hTypeKeys ("<escape><escape>")
sleep 2
'/// select the middle object: cubical, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
sleep 2
sTemp = fGetPositionX
if sTemp <> Ueber_Text_1 then
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
end if
'/// close document ///'
Call hCloseDocument
endif
sleep 2
endcase
endcase 'tdContextSendBackward
'-------------------------------------------------------------------------------
testcase tdContextBringForward
dim sTemp as string
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// select the middle object: rectangle, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
'/// Bring Forward / [Strg]+[+] -> one level more to the front ///'
WL_TB_ANORDNUNG_WeiterNachVorn
'/// has to be from bottom to top: cubicel donut rectangel ///'
sleep 1
sPrintCheckOrder
'/// select the middle object: donut, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
sleep 2
sTemp = fGetPositionX
@@ -141,21 +167,27 @@ testcase tdContextBringForward
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
end if
sleep 1
'/// close document ///'
Call hCloseDocument
endif
endcase
endcase 'tdContextBringForward
'-------------------------------------------------------------------------------
testcase tdContextSendToBack
dim sTemp as string
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB><TAB>")
'/// Send to Back / [Strg]+[Shift]+[-] -> backmost object ///'
OL_DRAW_GanzNachHinten
'/// has to be from bottom to top: rectangel cubicel donut ///'
sleep 3
sPrintCheckOrder
'/// select the middle object: cubical, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
sleep 1
sTemp = fGetPositionX
@@ -163,20 +195,26 @@ testcase tdContextSendToBack
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
end if
sleep 3
'/// close document ///'
Call hCloseDocument
endif
endcase
endcase 'tdContextSendToBack
'-------------------------------------------------------------------------------
testcase tdContextBringToFront
dim sTemp as string
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// select the bottom object: cubical, with keys: [TAB] ///'
hTypeKeys ("<TAB>")
'/// Bring to Front / [Strg]+[Shift]+[+] -> frontmost object ///'
OL_DRAW_GanzNachVorn
'/// has to be from bottom to top: rectangel, donut, cubicel ///'
sPrintCheckOrder
'/// select the middle object: donut, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
sleep 1
sTemp = fGetPositionX
@@ -184,66 +222,85 @@ testcase tdContextBringToFront
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
end if
sleep 3
'/// close document ///'
Call hCloseDocument
endif
endcase
endcase 'tdContextBringToFront
'-------------------------------------------------------------------------------
testcase tdContextInFrontOfObject
dim sTemp as string
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB><TAB>")
'/// In Front of object ///'
OL_DRAW_VorDasObjekt
'/// left click the cubicel with the mouse ///'
gMouseClick 50,5
'/// has to be from bottom to top: cubicel, donut, rectangel ///'
sPrintCheckOrder
sleep 1
'/// select the middle object: donut, with keys: [TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB>")
sTemp = fGetPositionX
if sTemp <> Ueber_Text_3 then
printlog "DISABLED the WARNLOG, because mouseaction is not always the same :-( : Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
end if
'/// close document ///'
Call hCloseDocument
endif
endcase
endcase 'tdContextInFrontOfObject
'-------------------------------------------------------------------------------
testcase tdContextBehindObject
dim sTemp as string
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
hTypeKeys ("<TAB><TAB><TAB>")
'/// Behind object ///'
OL_DRAW_HinterDasObjekt
sleep 1
'/// left click the cubicel with the mouse ///'
gMouseClick 50,5
'/// has to be from bottom to top: donut, cubicel, rectangel ///'
sPrintCheckOrder
sleep 1
'/// select the bottom object: donut, with keys: [TAB] ///'
hTypeKeys ("<TAB>")
sTemp = fGetPositionX
if sTemp <> Ueber_Text_3 then
printlog "DISABLED the WARNLOG, because mouseaction is not always tthe same Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
end if
'/// close document ///'
Call hCloseDocument
endif
endcase
endcase 'tdContextBehindObject
'-------------------------------------------------------------------------------
testcase tdContextReverse
dim sTemp as string
dim sTemp2 as string
dim i as integer
'/// open created document 'with 3 figures' ///'
if (hFileOpen (Datei)) then
sleep 10
sPrintCheckOrder (TRUE)
'/// Edit->Select All ///'
EditSelectAll
sleep 3
'/// Reverse ///'
WL_TB_ANORDNUNG_Vertauschen
sPrintCheckOrder
'/// select in default order and take Position X in mind ;-) ///'
hTypeKeys ("<escape><escape>")
for i = 1 to 3
hTypeKeys ("<TAB>")
@@ -257,7 +314,10 @@ testcase tdContextReverse
warnlog " - " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";"
end if
next i
'/// close document ///'
Call hCloseDocument '/// close document ///'
endif
endcase
endcase 'tdContextReverse
'-------------------------------------------------------------------------------

View File

@@ -43,40 +43,51 @@
' #1 tGetFormatCharacter
'*
'\*******************************************************************
testcase tFormatCharacter
dim sTemp as string
dim iTemp as integer
'/// open application ///'
Call hNewDocument
sleep 1
'/// create a textframe with content ///'
hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30)
'/// type with keys [strg]+[home] [shift]+[end] to select the inserted text ///'
hTypeKeys "<MOD1 HOME><shift end>"
sleep 1
'/// Format->Character ///'
FormatCharacter
sleep 1
'/// switch to tabpage 'Font' ///'
Kontext
Messagebox.SetPage TabFont
Kontext "TabFont"
sleep 1
'/// switch to tabpage 'Font Effects' ///'
Kontext
Messagebox.SetPage TabFontEffects
kontext "TabFontEffects"
sleep 1
'/// switch to tabpage 'Position' ///'
Kontext
Messagebox.SetPage TabFontPosition
Kontext "TabFontPosition"
sleep 1
'/// close dialog 'Character' with 'OK' ///'
TabFontPosition.OK
'/// close application ///'
Call hCloseDocument
endcase
endcase 'tFormatCharacter
'---------------------------------------------------------
testcase tDialogCharacter
Dim i as integer
Dim y as integer
Dim z as integer
@@ -96,256 +107,269 @@ testcase tDialogCharacter
ToolsOptions
hToolsOptions ( "LanguageSettings", "Languages" )
if Aktivieren.IsChecked then '/// Check in what state Asian support is ///'
Asiansupportsetting = TRUE
else
else
Asiansupportsetting = FALSE
end if
Aktivieren.Check '/// Activate if not already activated ///'
end if
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
Kontext
Kontext
Call hTextrahmenErstellen ( "Some text in a box.", 20, 20, 50, 50 )
Call hTextrahmenErstellen ( "Some text in a box.", 20, 20, 50, 50 )
FormatCharacter
sleep 1
Kontext '"Active" ' insert this, perhaps another
Active.SetPage TabFont ' tabpage is active at open
Kontext "TabFont"
CountOfThem = FontWest.GetItemCount
for y = 1 to CountOfThem
FormatCharacter
sleep 1
Kontext '"Active" ' insert this, perhaps another
Active.SetPage TabFont ' tabpage is active at open
Kontext "TabFont"
CountOfThem = FontWest.GetItemCount
for y = 1 to CountOfThem
FontWest.Select y
Xtext = FontWest.GetSelText
' printlog "This FontWest is: " & Xtext
next y
' printlog "This FontWest is: " & Xtext
next y
CountOfThem = StyleWest.GetItemCount
for y = 1 to CountOfThem
CountOfThem = StyleWest.GetItemCount
for y = 1 to CountOfThem
StyleWest.Select y
Xtext = StyleWest.GetSelText
' printlog "This StyleWest is: " & Xtext
next y
' printlog "This StyleWest is: " & Xtext
next y
CountOfThem = SizeWest.GetItemCount
for y = 1 to CountOfThem
CountOfThem = SizeWest.GetItemCount
for y = 1 to CountOfThem
SizeWest.Select y
Xtext = SizeWest.GetSelText
' printlog "This SizeWest is: " & Xtext
next y
' printlog "This SizeWest is: " & Xtext
next y
CountOfThem = LanguageWest.GetItemCount
for y = 1 to CountOfThem
CountOfThem = LanguageWest.GetItemCount
for y = 1 to CountOfThem
LanguageWest.Select y
Xtext = LanguageWest.GetSelText
' printlog "This LanguageWest is: " & Xtext
next y
' printlog "This LanguageWest is: " & Xtext
next y
CountOfThem = FontEast.GetItemCount
for y = 1 to CountOfThem
CountOfThem = FontEast.GetItemCount
for y = 1 to CountOfThem
FontEast.Select y
Xtext = FontEast.GetSelText
' printlog "This FontEast is: " & Xtext
next y
' printlog "This FontEast is: " & Xtext
next y
CountOfThem = StyleEast.GetItemCount
for y = 1 to CountOfThem
CountOfThem = StyleEast.GetItemCount
for y = 1 to CountOfThem
StyleEast.Select y
Xtext = StyleEast.GetSelText
' printlog "This StyleEast is: " & Xtext
next y
' printlog "This StyleEast is: " & Xtext
next y
CountOfThem = SizeEast.GetItemCount
for y = 1 to CountOfThem
CountOfThem = SizeEast.GetItemCount
for y = 1 to CountOfThem
SizeEast.Select y
Xtext = SizeEast.GetSelText
' printlog "This SizeEast is: " & Xtext
next y
' printlog "This SizeEast is: " & Xtext
next y
CountOfThem = LanguageEast.GetItemCount
for y = 1 to CountOfThem
CountOfThem = LanguageEast.GetItemCount
for y = 1 to CountOfThem
LanguageEast.Select y
Xtext = LanguageEast.GetSelText
' printlog "This LanguageEast is: " & Xtext
next y
' printlog "This LanguageEast is: " & Xtext
next y
Kontext
Active.SetPage TabFontEffects
Kontext "TabFontEffects"
if NOT Outline.IsChecked then
Kontext
Active.SetPage TabFontEffects
Kontext "TabFontEffects"
if NOT Outline.IsChecked then
Outline.Check
end if
end if
if NOT Shadow.IsChecked then
if NOT Shadow.IsChecked then
Shadow.Check
end if
end if
CountOfThem = Underline.GetItemCount
CountOfColors = Color.GetItemCount
CountOfThem = Underline.GetItemCount
CountOfColors = Color.GetItemCount
for y = 2 to CountOfThem
for y = 2 to CountOfThem
Underline.Select y
Xtext = Underline.GetSelText
' printlog "This Underline is: " & Xtext
' printlog "This Underline is: " & Xtext
for i = 1 to CountOfColors
Color.Select i
TestColorString = Color.GetSelText
' printlog "This Color is: " & TestColorString
' printlog "This Color is: " & TestColorString
next i
next y
next y
CountOfThem = StrikeThrough.GetItemCount
for y = 2 to CountOfThem
CountOfThem = StrikeThrough.GetItemCount
for y = 2 to CountOfThem
StrikeThrough.Select y
IndividualWords.UnCheck
Xtext = StrikeThrough.GetSelText
' printlog "The StrikeThrough is: " & Xtext
' printlog "The StrikeThrough is: " & Xtext
for i = 1 to CountOfColors
Color.Select i
TestColorString = Color.GetSelText
' printlog "And the Color is: " & TestColorString
' printlog "And the Color is: " & TestColorString
next i
next y
next y
IndividualWords.Check
printlog "Individual Words = On"
IndividualWords.Check
printlog "Individual Words = On"
CountOfThem = StrikeThrough.GetItemCount
for y = 2 to CountOfThem
CountOfThem = StrikeThrough.GetItemCount
for y = 2 to CountOfThem
StrikeThrough.Select y
Xtext = StrikeThrough.GetSelText
' printlog "The StrikeThrough is: " & Xtext
' printlog "The StrikeThrough is: " & Xtext
for i = 1 to CountOfColors
Color.Select i
TestColorString = Color.GetSelText
' printlog "And the Color is: " & TestColorString
' printlog "And the Color is: " & TestColorString
next i
next y
next y
CountOfThem = Emphasis.GetItemCount
for y = 2 to CountOfThem
CountOfThem = Emphasis.GetItemCount
for y = 2 to CountOfThem
Emphasis.Select y
Xtext = Emphasis.GetSelText
' printlog "The Emphasis is: " & Xtext
' printlog "The Emphasis is: " & Xtext
for i = 1 to CountOfColors
Color.Select i
TestColorString = Color.GetSelText
' printlog "And the Color is: " & TestColorString
' printlog "And the Color is: " & TestColorString
next i
next y
next y
CountOfThem = Position.GetItemCount
for y = 1 to CountOfThem
CountOfThem = Position.GetItemCount
for y = 1 to CountOfThem
Position.Select y
Xtext = Position.GetSelText
' printlog "The Position is: " & Xtext
' printlog "The Position is: " & Xtext
for i = 1 to CountOfColors
Color.Select i
TestColorString = Color.GetSelText
' printlog "And the Color is: " & TestColorString
' printlog "And the Color is: " & TestColorString
next i
next y
next y
CountOfThem = FontColor.GetItemCount
for z = 1 to CountOfThem
CountOfThem = FontColor.GetItemCount
for z = 1 to CountOfThem
FontColor.Select z
TestColorString = FontColor.GetSelText
' printlog "The FontColor is: " & TestColorString
next z
' printlog "The FontColor is: " & TestColorString
next z
CountOfThem = Relief.GetItemCount
TestColorString = Color.GetSelText
for y = 1 to CountOfThem
CountOfThem = Relief.GetItemCount
TestColorString = Color.GetSelText
for y = 1 to CountOfThem
Relief.Select y
Xtext = Relief.GetSelText
TestColorString = Color.GetSelText
' printlog "The Relief is: " & Xtext
next y
' printlog "The Relief is: " & Xtext
next y
Kontext
Kontext "TabFontPosition"
printlog "TabFontPosition"
SuperScript.Check
Super.Check
ThisIsMyTextFromControl = RelativeFontSize.GetText
Kontext
Active.SetPage TabFontPosition '/// Changes the active tab to "Position"
Kontext "TabFontPosition"
printlog "TabFontPosition"
SuperScript.Check
Super.Check
RelativeFontSize.ToMin '/// Testing the "Relative Font Size"-Listbox
ThisIsMyTextFromControl = RelativeFontSize.GetText
' printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl
for y = 1 to 99
for y = 1 to 99
RelativeFontSize.TypeKeys "<UP>"
ThisIsMyTextFromControl = RelativeFontSize.GetText
' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl
next y
' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl
next y
Automatic.Check
ThisIsMyTextFromControl = ScaleWith.GetText
printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl
' ScaleWith.TypeKeys "<TAB>"
for y = 1 to 100
Automatic.Check
ScaleWith.ToMin '/// Testing the "Scale With"-Listbox
ThisIsMyTextFromControl = ScaleWith.GetText
printlog "ScaleWith minimum is:" & ThisIsMyTextFromControl
' ScaleWith.TypeKeys "<TAB>"
for y = 1 to 100
ScaleWith.TypeKeys "<UP>"
ThisIsMyTextFromControl = ScaleWith.GetText
' printlog "ScaleWith is:" & ThisIsMyTextFromControl
next y
' printlog "ScaleWith is:" & ThisIsMyTextFromControl
next y
Normal.Check
Subscript.Check
Normal.Check
Subscript.Check
printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl
for y = 1 to 99
RelativeFontSize.ToMin '/// Testing the "Reliative Font Size"-Listbox again but this time
ThisIsMyTextFromControl = RelativeFontSize.GetText '/// with "Subscript" and "Normal" Checked
printlog "The Relative Font Size minimum is: " & ThisIsMyTextFromControl
for y = 1 to 99
RelativeFontSize.TypeKeys "<UP>"
ThisIsMyTextFromControl = RelativeFontSize.GetText
' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl
next y
' printlog "The Relative Font Size is: " & ThisIsMyTextFromControl
next y
Automatic.Check
Automatic.Check
ThisIsMyTextFromControl = ScaleWith.GetText
printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
for y = 1 to 100
ScaleWith.ToMin '/// Testing the "ScaleWith"-Listbox
ThisIsMyTextFromControl = ScaleWith.GetText
printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
for y = 1 to 100
ScaleWith.TypeKeys "<UP>"
ThisIsMyTextFromControl = ScaleWith.GetText
' printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
next y
' printlog "The ScaleWith Size is: " & ThisIsMyTextFromControl
next y
printlog "The Spacing is first: " & ThisIsMyTextFromControl
for y = 2 to 3
ThisIsMyTextFromControl = Spacing.GetSelText '/// Testing the "Spacing"-ListBox
printlog "The Spacing is first: " & ThisIsMyTextFromControl
for y = 2 to 3
Spacing.Select y
ThisIsMyTextFromControl = Spacing.GetSelText
printlog "The Spacing is: " & ThisIsMyTextFromControl
' printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl
ThisIsMyTextFromControl = SpacingBy.GetText '/// Testing the "Spacing By"-Scrollbox
' printlog "The SpacingBy Size minimum is: " & ThisIsMyTextFromControl
SpacingBy.ToMin
for z = 1 to 4
SpacingBy.More
ThisIsMyTextFromControl = SpacingBy.GetText
' printlog "The SpacingBy Size is: " & ThisIsMyTextFromControl
' printlog "The SpacingBy Size is: " & ThisIsMyTextFromControl
next z
PairKerning.Check
next y
next y
Kontext "TabFontPosition"
TabFontPosition.Ok
Kontext "TabFontPosition"
TabFontPosition.Ok
if Asiansupportsetting = FALSE then
if Asiansupportsetting = FALSE then
kontext
ToolsOptions
hToolsOptions ( "LanguageSettings", "Languages" )
Aktivieren.UnCheck '/// Deactivate if not already deactivated ///'
Printlog "Reseted the Asiansupport-value to it's original state"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
' ActiveDeactivateAsianSupport = FALSE
end if
' ActiveDeactivateAsianSupport = FALSE
end if
Printlog "DialogCharacter Ends"
Call hCloseDocument
endcase
Printlog "DialogCharacter Ends"
Call hCloseDocument
endcase 'tDialogCharacter
'--------------------------------------------------------
testcase tSetFormatCharacter
if iSprache = 48 then
qaerrorlog "Test not adapted to polish, 48."
goto endsub
@@ -367,28 +391,41 @@ testcase tSetFormatCharacter
end if
sFile = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString)
'/// create document, if it doesn't exist, else skip this case :-) ///'
if (dir(sFile)="") then
'/// open application ///'
Call hNewDocument
'/// activate all languages in options ///'
'///+ Tools->Options ///'
ToolsOptions
'///+ select tabpage 'Languages' from set 'Language Settings' ///'
hToolsOptions("LANGUAGESETTINGS","Languages")
kontext "TabSprachen"
'///+ save state and check checkbox 'Asian languages support' ///'
'/// if the language is Asian, skip this part ///'
printlog "iSprache = " + iSprache
if bAsianLan = FALSE then
bAsian = Aktivieren.isEnabled
Aktivieren.check
endif
'///+ save state and check checkbox 'Complex text layout (CTL) support' ///'
bComplex = ComplexScriptEnabled.isEnabled
ComplexScriptEnabled.check
'///+ close dialog 'Options' with OK ///'
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
'/// get count of languages ///'
'///+ Format->Character ///'
FormatCharacter
sleep 1
Kontext
'///+ switch to tabpage 'Font' ///'
Messagebox.SetPage TabFont
kontext "TabFont"
sleep 1
'///+ get count of languages for Western/Asian/CTL fonts ///'
iWest = LanguageWest.getItemCount
iAsian = LanguageEast.getItemCount
iComplex = LanguageCTL.getItemCount
@@ -425,28 +462,39 @@ testcase tSetFormatCharacter
Printlog "CTL font languages count : " + iComplex
endif
endif
'///+ close dialog 'Character' with OK ///'
TabFont.Ok
WL_SD_TextEinfuegenDraw
gMouseMove ( 1, 1, 100, 100 )
'///+ print the language counts into the first line of the document ///'
hTypeKeys(" "+iWest+" "+iAsian+" "+iComplex+"<return>")
'/// set all languages to '[None]' ///'
'///+ Format->Character ///'
FormatCharacter
kontext "TabFont"
'///+ select '[None]' (should be the first entry in every listbox) ///'
LanguageWest.select 1
LanguageEast.select 1
LanguageCTL.select 1
'///+ close dialog 'Character' with OK ///'
TabFont.Ok
'/// print one line with language formated text for every language ///'
for i = 1 to iWest
'///+ Format->Character ///'
FormatCharacter
kontext "TabFont"
'///+ select the next language ///'
LanguageWest.select i
sTemp = LanguageWest.getItemText (i)
ListAppend(sLanguage(), sTemp)
'///+ close dialog 'Character' with OK ///'
TabFont.Ok
'///+ type [return][number of language in list][Tab][Language name][Tab] ///'
hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
next i
@@ -486,6 +534,7 @@ testcase tSetFormatCharacter
hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
next i
'/// save the created document & the languages list if they don't exists ///'
hFileSaveAs (sFile)
qaErrorLog "Created file. Please check it and then commit it! " + sTemp
sTemp = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + ".txt")
@@ -493,26 +542,36 @@ testcase tSetFormatCharacter
ListWrite(sLanguage(), sTemp,"utf8")
endif
'/// restore the options ///'
'///+ Tools->Options ///'
ToolsOptions
'///+ select tabpage 'Languages' from set 'Language Settings' ///'
hToolsOptions("LANGUAGESETTINGS","Languages")
kontext "TabSprachen"
'///+ restore state of checkbox 'Asian languages support' ///'
'/// if the language is Asian, skip this part ///'
if bAsianLan = FALSE then
if (bAsian <> TRUE) then
Aktivieren.UNcheck
endif
endif
'///+ restore state of checkbox 'Complex text layout (CTL) support' ///'
if (bComplex <> TRUE) then
ComplexScriptEnabled.UNcheck
endif
'///+ close dialog 'Options' with OK ///'
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
'/// close application ///'
Call hCloseDocument
endif
endcase
endcase 'tSetFormatCharacter
'--------------------------------------------------------
testcase tGetFormatCharacter
qaerrorlog "tGetFormatCharacter outcommented due to too many qaerrorlogs"
goto endsub
Dim i as integer
@@ -533,20 +592,29 @@ testcase tGetFormatCharacter
ExtensionString = "odg"
end if
'/// open the english document with all languages ///'
hDateiOeffnen (convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString)
ListRead(sLanguageR(), convertPath(gTesttoolpath + "graphics\required\input\spellb_1.txt"),"utf8")
'/// activate all languages in options ///'
'///+ Tools->Options ///'
ToolsOptions
'///+ select tabpage 'Languages' from set 'Language Settings' ///'
hToolsOptions("LANGUAGESETTINGS","Languages")
kontext "TabSprachen"
'///+ save state and check checkbox 'Asian languages support' ///'
bAsian = Aktivieren.isEnabled
Aktivieren.check
'///+ save state and check checkbox 'Complex text layout (CTL) support' ///'
bComplex = ComplexScriptEnabled.isEnabled
ComplexScriptEnabled.check
'///+ close dialog 'Options' with OK ///'
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
sleep (1)
'/// get count of languages ///'
hTypeKeys("<tab><f2>")
'///+ first how many are in the reference document (printed in the first line)///'
hTypeKeys("<mod1 home><shift end>")
sleep (1)
editcopy
@@ -557,12 +625,15 @@ testcase tGetFormatCharacter
iAsian(1) = mid(sTemp, iTemp+1, iTemp-i)
iComplex(1) = right(sTemp, Len(sTemp) - i)
sleep (1)
'///+ Format->Character ///'
FormatCharacter
sleep 1
Kontext
'///+ switch to tabpage 'Font' ///'
Messagebox.SetPage TabFont
kontext "TabFont"
sleep 1
'///+ get count of languages for Western/Asian/CTL fonts ///'
iWest(2) = LanguageWest.getItemCount
iAsian(2) = LanguageEast.getItemCount
iComplex(2) = LanguageCTL.getItemCount
@@ -581,8 +652,10 @@ testcase tGetFormatCharacter
else
Printlog "CTL font languages count : " + iComplex(2)
endif
'///+ close dialog 'Character' with OK ///'
TabFont.Ok
'/// write the language for every line in the current language ///'
hTypeKeys("<mod1 home><down><home>")
for i = 1 to iWest(2)
FormatCharacter
@@ -592,6 +665,7 @@ testcase tGetFormatCharacter
sTemp = LanguageWest.getSelText
ListAppend(sLanguage(), sTemp)
TabFont.Ok
'///+ type [end][number of language in list][Tab][Language name][down][home] ///'
hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
next i
@@ -617,6 +691,7 @@ testcase tGetFormatCharacter
hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
next i
'/// save the created document & the languages list ///'
sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache)
hFileSaveAsKill (sTemp)
sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache + ".txt")
@@ -640,7 +715,6 @@ testcase tGetFormatCharacter
endif
next i
'/// close application ///'
Call hCloseDocument
endcase
endcase 'tGetFormatCharacter

View File

@@ -74,11 +74,13 @@ testcase tiEditUndo
print "what"
endif
Kontext "TabPositionAndSize"
Ueber_Text_1=PositionX.GetText '/// defining variable for original position of object ///'
TabPositionAndSize.Cancel
sleep 2
Kontext "Toolbar"
Auswahl.Click
sleep 1
ContextArrangeBringBackward '/// Bring Object backward ///'
sleep 1
gMouseClick 60,60
sleep 1
@@ -89,6 +91,7 @@ testcase tiEditUndo
Kontext "Toolbar"
Auswahl.Click
sleep 1
ContextPositionAndSize '/// Open Position and Size dialog, checking position ///'
Kontext
Messagebox.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -98,6 +101,7 @@ testcase tiEditUndo
gMouseClick 60,60
sleep 1
EditUndo '/// Edit Undo for BringBackward ///'
Sleep 2
gMouseClick 60,60
sleep 1
@@ -107,6 +111,7 @@ testcase tiEditUndo
sleep 1
Kontext "Toolbar"
Auswahl.Click
ContextPositionAndSize '/// Again checking position using Position and Size dialog ///'
kontext
Messagebox.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
@@ -117,6 +122,7 @@ testcase tiEditUndo
end if
TabPositionAndSize.Cancel
Call hCloseDocument '/// Close document ///'
endcase
@@ -134,6 +140,7 @@ testcase tiEditRedo
Datei$ = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
hFileOpen ConvertPath (Datei$) '/// Open test document (leer.od?) ///'
sleep 3
' check if the document is writable
if fIsDocumentWritable = false then
@@ -158,6 +165,7 @@ testcase tiEditRedo
sleep 1
hTypeKeys "<TAB>"
sleep 1
ContextArrangeBringBackward '/// move object behind other object ///'
sleep 1
gMouseClick 60,60
sleep 1
@@ -166,21 +174,25 @@ testcase tiEditRedo
ContextPositionAndSize
sleep 1
Kontext
Messagebox.SetPage TabPositionAndSize '/// checking new position values ///'
Kontext "TabPositionAndSize"
if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone"
TabPositionAndSize.Cancel
sleep 1
gMouseClick 60,60
EditUndo '/// Edit Undo///'
sleep 1
hTypeKeys "<TAB>"
sleep 1
ContextPositionAndSize
sleep 1
kontext
Messagebox.SetPage TabPositionAndSize '/// checking again position ///'
kontext "TabPositionAndSize"
if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either"
TabPositionAndSize.Cancel
sleep 2
EditRedo '/// Edit Redo ///'
sleep 2
gMouseClick 60,60
sleep 2
@@ -191,12 +203,14 @@ testcase tiEditRedo
kontext
Messagebox.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
if PositionX.GetText <> Ueber_Text_1 then '/// checking position ///'
printlog "Action Undo repeated"
else
warnlog "Action Undo not repeated"
end if
TabPositionAndSize.OK
sleep 1
call hCloseDocument '/// close document ///'
sleep 1
endcase
@@ -206,55 +220,71 @@ testcase tiEditClipboard
Dim Ueber_Text_4 as string
dim sTemp as string
'/// open application ///'
Call hNewDocument
sleep 1
SetClipboard ""
'/// Create rectangle ///'
Call hRechteckErstellen ( 65, 65, 80, 80 )
sleep 1
'///+ RightClick onto rectangle///'
gMouseClick 70,70
sleep 1
Ueber_Text_4 = fGetPositionX() '/// Get values for position variables ///'
Sleep 1
'/// <b> Edit->Copy </b> ///'
EditCopy
'///+ Type Key [Deletee] ///'
hTypeKeys "<DELETE>"
'///+ <i> Edit->Paste </i> ///'
EditPaste
sleep 1
'///+ Edit->Select All ///'
EditSelectAll
sTemp = fGetPositionX()
if LiberalMeasurement(sTemp, Ueber_Text_4) then '/// TabPositionAndSize: comparing position with original position ///'
printlog "OK EditCopy and EditPaste"
else
else
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
end if
sleep 1
hTypeKeys "<escape>"
EditSelectAll
sleep 2
EditCut
sleep 1
hTypeKeys "<TAB>"
try
end if
sleep 1
'/// Type Keys [escape], + EditSelectAll (to deselect object and to select again) ///'
hTypeKeys "<escape>"
EditSelectAll
sleep 2
'/// <b> Edit->Cut </b>///'
EditCut
sleep 1
hTypeKeys "<TAB>"
try
'///+ - Format->Position And Size -> HAS TO FAIL / IS NOT AVAILABLE !!! '///'
ContextPositionAndSize
kontext
'///+ - select TabPage 'Position And Size' ///'
Messagebox.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if TabPositionAndSize.NOTexists then
warnlog "TabPositionAndSize isn't up ?!!"
endif
'///+ - Ok dialog 'Position And Size' ///'
TabPositionAndSize.Ok
warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!"
catch
catch
Printlog " - There is no object in the document anymore :-)"
endcatch
sleep 1
EditPaste
sleep 2
sTemp = fGetPositionX()
if LiberalMeasurement(sTemp, Ueber_Text_4) then
endcatch
sleep 1
'///+ <i> Edit->Paste </i> ///'
EditPaste
sleep 2
sTemp = fGetPositionX()
if LiberalMeasurement(sTemp, Ueber_Text_4) then
printlog "OK Edit paste"
else
else
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
end if
sleep 3
Call hCloseDocument
end if
sleep 3
'/// close application ///'
Call hCloseDocument
endcase
'-------------------------------------------------------------------------------
@@ -263,6 +293,7 @@ testcase tiEditPasteSpecial_HTML
dim Zaehler as integer
Kontext "Standardbar"
sleep 1
Call hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\frame1.htm") '/// Load html document ///'
sleep 5
autoexecute=false
Kontext "DocumentWriter"
@@ -271,9 +302,13 @@ testcase tiEditPasteSpecial_HTML
autoexecute=true
EditSelectAll
sleep 3
EditCopy '/// Copy selection ///'
Sleep 2
FileClose '/// Close document ///'
sleep 3
Call hNewDocument '/// Create new Impress document ///'
sleep 1
EditPasteSpecial '/// Edit paste special ///'
sleep 1
Kontext "InhaltEinfuegen"
For Zaehler = 1 to Auswahl.GetItemCount
@@ -281,27 +316,35 @@ testcase tiEditPasteSpecial_HTML
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
next Zaehler
if Auswahl.GetItemCount <> 4 then '/// Controlling number of possible formats ///'
warnlog "formats for inserting Html <> 4"
else
else
printlog "OK 4 formats for HTML-Document"
end if
end if
sleep 3
sleep 3
try
catch
sleep 3
InhaltEinfuegen.OK '/// Paste clipboard content ///'
sleep 3
try
EditCopy '/// Copy object back into clipboard ///'
catch
Warnlog "- Nothing inserted into document"
endcatch
sleep 3
sleep 3
endcatch
sleep 3
Call hCloseDocument '/// Close document ///'
sleep 3
endcase
'-------------------------------------------------------------------------------
testcase tdEditPasteSpecial_Text
printlog "Insert Text"
call hNewDocument '/// new document ///'
SetClipboard "I am a cool test-text in the Clipboard" '/// put text into clipboard ///'
EditPasteSpecial '/// edit paste special ///'
sleep 1
Kontext "InhaltEinfuegen"
Auswahl.Select 1 '/// select list entree 1 ///'
printlog "Selection = ", Auswahl.GetSelText
sleep 1
if Auswahl.GetItemCount <> 1 then
@@ -309,8 +352,10 @@ testcase tdEditPasteSpecial_Text
else
printlog "Format Text OK"
end if
InhaltEinfuegen.OK '/// close dialog ///'
sleep 1
Call hCloseDocument '/// close document ///'
endcase
'-------------------------------------------------------------------------------
@@ -318,31 +363,42 @@ testcase tdEditPasteSpecial_Graphic
dim Zaehler as integer
call hNewDocument '/// ^new document ///'
printlog "Insert graphic file"
InsertGraphicsFromFile '/// insert graphic (sample.bmp)///'
Kontext "GrafikEinfuegenDlg"
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
Oeffnen.Click
sleep 1
EditSelectAll '/// select graphic ///'
EditCut '/// cut graphic ///'
EditPasteSpecial '/// edit paste special ///'
sleep 1
Kontext "InhaltEinfuegen"
For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
Auswahl.select Zaehler
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
next Zaehler
next Zaehler
warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount
else
printlog "There are " + Auswahl.GetItemCount + " formats for graphic files"
end if
gMouseClick 90,90
sleep 1
if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///'
warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount
else
printlog "There are " + Auswahl.GetItemCount + " formats for graphic files"
end if
InhaltEinfuegen.OK '/// insert graphic from clipboard ///'
gMouseClick 90,90
sleep 1
Call hCloseDocument '/// close document ///'
endcase
'-------------------------------------------------------------------------------
testcase tdEditPasteSpecial_Circle
dim Zaehler as integer
call hNewDocument '/// new document ///'
sleep 5
printlog "Insert circle" '/// create circle ///'
Kontext "Toolbar"
Ellipsen.Click
sleep 3
@@ -350,19 +406,27 @@ testcase tdEditPasteSpecial_Circle
sleep 1
hTypeKeys "<escape>"
sleep 2
EditSelectAll '/// select circle ///'
sleep 5
EditCut '/// cut circle ///'
sleep 1
EditPasteSpecial '/// edit paste special ///'
sleep 1
Kontext "InhaltEinfuegen"
if EinfuegenAls.IsVisible Then EinfuegenAls.Check '/// check "EinfuegenAls" ///'
For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
Auswahl.select Zaehler
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
next Zaehler
warnlog "Number of possible formats <> 4"
else
printlog "There are 4 formats for circle"
end if
sleep 1
sleep 1
next Zaehler
if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///'
warnlog "Number of possible formats <> 4"
else
printlog "There are 4 formats for circle"
end if
sleep 1
InhaltEinfuegen.OK '/// paste circle ///'
sleep 1
Call hCloseDocument '/// close document ///'
endcase
'-------------------------------------------------------------------------------
@@ -370,7 +434,9 @@ testcase tiEditPasteSpecial
dim i as integer
dim x as integer
' warnlog "TODOTBO: from draw, impress, math..."
' warnlog "TODOTBO: from draw, impress, math..."
'/// go into writer, type a text, select all, Edit->Cut, close writer ///'
'/// go into application to test, insert every format you can get from Edit->Paste->Special :-) ///'
gApplication = "WRITER"
call hNewDocument
kontext "DocumentWriter"
@@ -402,6 +468,7 @@ testcase tiEditPasteSpecial
InhaltEinfuegen.OK
sleep 1
next i
Call hCloseDocument '/// close document ///'
endcase
'-------------------------------------------------------------------------------

View File

@@ -125,6 +125,7 @@ testcase tiModifyConvertToPolygon
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
'/// compare width and heigth to control is it is still text ///'
if ( Width.GetText = PosX or Height.GetText = PosY ) Then
Printlog "- Text converted into polygon"
else
@@ -137,6 +138,7 @@ testcase tiModifyConvertToPolygon
Call hNewDocument
sleep 3
'/// insert graphic (input\\impress\\grafik\\sample.bmp)///'
Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" )
sleep 3
ContextConvertIntoPolygon
@@ -145,7 +147,9 @@ testcase tiModifyConvertToPolygon
MaxAnzahl = Farbanzahl.GetText
Farbanzahl.More 1
If Maxanzahl < Farbanzahl.GetText Then Warnlog "- Maximum value could be raised."
Farbanzahl.ToMin '/// set color to min ///'
MinAnzahl = Farbanzahl.GetText
Farbanzahl.Less 1 '/// try to set a value lower than minimum ///'
If Farbanzahl.GetText < Minanzahl then Warnlog "- Minimum value could be lowered."
Farbanzahl.SetText "2"
Vorschau.Click
@@ -162,10 +166,14 @@ testcase tiModifyConvertToPolygon
ExtrasOptionenDlg.OK
'-----------------------------------------------
Call hCloseDocument
endcase
endcase 'tiModifyConvertToPolygon
'--------------------------------------------------------
testcase tdContextConvertIntoBitmap
Call hNewDocument '/// new document ///'
sleep 3
InsertGraphicsFromFile '/// insert graphic ///'
sleep 3
kontext "Active"
if Active.Exists Then
@@ -174,6 +182,7 @@ testcase tdContextConvertIntoBitmap
sleep 5
Kontext "GrafikEinfuegenDlg"
sleep 2
'/// uses input\\impress\\grafik\\columbia.dxf ///
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
sleep 2
Oeffnen.Click
@@ -188,39 +197,56 @@ testcase tdContextConvertIntoBitmap
end if
Kontext "DocumentImpress"
try
ContextConvertIntoBitmap '/// convert dxf file to bitmap ///'
sleep 1
Printlog "- Convert into bitmap works"
catch
Warnlog "- Convert into bitmap does not work"
endcatch
sleep 2
endcase
Call hCloseDocument '/// close document ///'
endcase 'tdContextConvertIntoBitmap
'--------------------------------------------------------
testcase tiAendernUmwandelnInKurve
Printlog " ----- ContextConvertIntoCurve testen"
Call hNewDocument '/// New impress document///'
Call hTextrahmenErstellen ("I test,test,test,test only, if it works for you",20,20,60,30) '/// create textbox///'
sleep 2
Kontext "DocumentImpress"
gMouseDoubleClick 70,70 '/// deselect textbox ///'
sleep 2
EditSelectAll '/// select textbox ///'
sleep 2
ContextConvertIntoCurve '/// convert into curve ///'
sleep 3
gMouseClick 30,15
hTypeKeys "<SHIFT RIGHT>",3 '/// try to select 3 letters ///'
try
EditCopy '/// try edit copy to check if its still text ///'
Warnlog " - Convert into curve, seperate letters should not be selectable anymore"
catch
Printlog " - Text converted into a curve"
endcatch
endcase
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnInKurve
'--------------------------------------------------------
testcase tiAendernUmwandelnInPolygonGrafik
Printlog "- Context/ConvertIntoPolygon"
Call hNewDocument '/// new document ///'
InsertGraphicsFromFile '/// insert graphic (desp.bmp) ///'
Kontext "GrafikEinfuegenDlg"
'///use graphic : input\\impress\\grafik\\desp.bmp ///
Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" )
Oeffnen.Click
sleep 3
@@ -228,46 +254,67 @@ testcase tiAendernUmwandelnInPolygonGrafik
EditSelectAll
sleep 1
ContextConvertIntoPolygon '/// convert into polygon ///'
Kontext "UmwandelnInPolygon"
Printlog "- Testing vectorize dialog"
Farbanzahl.ToMax '/// set number of colors to max ///'
if Farbanzahl.GetText <> "32" Then Warnlog "- Maximum value for color depth should be 32, but it is: " + Farbanzahl.GetText
Farbanzahl.ToMin '/// set number of colors to min ///'
sleep 1
if Farbanzahl.GetText <> "8" Then Warnlog "- Minimum value for color depth should be 8 but it is: " + Farbanzahl.GetText
sleep 2
Punktreduktion.SetText "50" '/// set point reduction to 50 ///'
sleep 2
if Punktreduktion.GetText <> "32 Pixel" Then Warnlog "- Maximum value should be 32, but it is: " + Punktreduktion.GetText
sleep 1
Punktreduktion.SetText "-50" '/// set an out of range value ///'
sleep 1
if Punktreduktion.GetText <> "0 Pixel" Then Warnlog "- Minimum value should be 0, but it is: " + Punktreduktion.GetText
Loecherfuellen.Uncheck '/// uncheck fill holes ///'
if Not Kachelgroesse.IsEnabled Then
Printlog "- Control disabled."
else
Warnlog "- Control should be disabled if Fill is not checked."
end if
Vorschau.Click '/// open preview ///'
sleep 2
UmwandelnInPolygon.OK '/// close dialog ///'
sleep 5
endcase
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnInPolygonGrafik
'--------------------------------------------------------
testcase tiAendernUmwandelnIn3D
Printlog "- Convert into 3D"
Call hNewDocument
sleep 1 '/// new impress document ///'
hRechteckErstellen (10,10,40,40) '/// create rectangle ///'
'/// convert into 3D ///'
sleep 2
gMouseclick 35,35
sleep 1
try
ContextConvertInto3D '/// try to access convert ito 3d a 2nd time, should be impossible using a 3d object as source ///'
Printlog "- Convert into 3D works"
catch
Warnlog "- Convert into 3D does not work"
endcatch
endcase
Call hCloseDocument '/// close document '///
endcase 'tiAendernUmwandelnIn3D
'--------------------------------------------------------
testcase tiAendernUmwandelnIn3DRotationskoerper
Printlog "- ConvertInto3DRotationobject"
Dim PosX
Dim PosY
Call hNewDocument '/// new document '///
Kontext "DocumentImpress"
hRechteckErstellen (20,20,50,50) '/// create rectangle ///'
sleep 1
ContextPositionAndSize '/// get position values for the rectangle ///'
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -276,19 +323,26 @@ testcase tiAendernUmwandelnIn3DRotationskoerper
TabPositionAndSize.OK
sleep 1
Kontext "DocumentImpress"
ContextConvertInto3DRotationObject '/// convert into 3d lathe object ///'
sleep 2
ContextPositionAndSize
Kontext
Active.SetPage TabPositionAndSize '/// control changes in position values to confirm convert action ///'
Kontext "TabPositionAndSize"
if PositionX.GetText = PosX and PositionY.GetText = PosY Then Warnlog "- No change in position or dimension, converting seemd not to work"
TabPositionAndSize.OK
sleep 1
endcase
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnIn3DRotationskoerper
'--------------------------------------------------------
testcase tiAendernUmwandelnInMetaFile
Printlog "- ConvertIntoMetaFile"
Call hNewDocument '/// new document ///'
sleep 3
InsertGraphicsFromFile '/// insert graphic ///'
sleep 1
kontext "Active"
sleep 1
@@ -298,17 +352,21 @@ testcase tiAendernUmwandelnInMetaFile
sleep 1
Kontext "GrafikEinfuegenDlg"
sleep 2
'/// uses input\\impress\\grafik\\desp.gif") ///
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif")
sleep 2
Oeffnen.Click
sleep 5
Kontext "DocumentImpress"
try
ContextConvertIntoMetafile '/// convert bitmap into metafile ///'
sleep 2
Printlog "- Convert into Metafile does work"
catch
Warnlog "- Convert into Metafile does not work"
endcatch
sleep 2
endcase
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnInMetaFile

View File

@@ -49,11 +49,16 @@ testcase tCrossfading
dim CounterForX as integer
dim anothercounter as integer
Call hNewDocument '/// New Impress document ///'
gMouseClick 50,50
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
kontext "Ueberblenden"
X = Schritte.GetText ' /// Get counter-value and save it in X ///'
printlog "Steps before we start the test: " + X
@@ -68,11 +73,14 @@ testcase tCrossfading
Ueberblenden.OK
sleep 1
try
FormatUngroupDraw '/// open context menu and ungroup objects ///'
catch
qaerrorlog "Could not ungroup objects"
endcatch
sleep 1
hTypeKeys "<TAB>" '/// Should make the first object active ///'
'/// Get position and dimensions of elements ///'
try
ContextPositionAndSize
catch
@@ -85,41 +93,62 @@ testcase tCrossfading
if TabPositionAndSize.exists (5) then
CounterForX=0
CheckX=0
FirstX=PositionX.GetText '/// Tet Dimensions of first object ///'
TabPositionAndSize.OK
else
qaerrorlog "Couldn't switch tab page :-( "
endif
anothercounter = I+2 '/// How many objects we have on the screen ///'
for Y = 1 to anothercounter '/// How many times we should step to (hopefully) get back to the first one ///'
if Y > anothercounter then warnlog "Too many steps, something is wrong."
try
hTypeKeys "<TAB>" '/// Step to the next object ///'
catch
errolog "Could not step to the next object"
endcatch
' Printlog "- Get position and dimensions of elements"
' Printlog "- Get position and dimensions of elements"
ContextPositionAndSize '/// Open Position and Size for this object ///'
sleep 1
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
CheckX=PositionX.GetText '/// Get Position X for this object ///'
sleep 1
TabPositionAndSize.OK
Kontext "DocumentDraw"
CounterForX=CounterForX+1 '/// Up one on the object-counter ///'
if CheckX=FirstX then '/// Check if Position is the same as the first one ///'
if anothercounter = CounterForX then printlog "The first box is at: " + CheckX + " And we're now at " + FirstX + " = Correct steps between the objects, everything's fine."
printlog "We should have " + Y + " objects to go through." '/// Just here for debugging. - FHA
' printlog "anothercounter= " + anothercounter '/// Just here for debugging. - FHA
printlog "Number of objects: " + anothercounter
printlog ""
endif
next Y '/// End or go on with the checking-loop ///'
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create rectangle ///'
sleep 1
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
sleep 2
kontext "Ueberblenden"
next I
'/// And now we're gonna check if we can separate the object into it's parts ///'
'/// And check if the numbers of steps / objects is correct ///'
Schritte.ToMin '/// Select minimum value for number of steps ///'
for Z = 1 to X -1
Schritte.More '/// Raise the value for number of steps with one ///'
next Z
printlog "Value has been restored to: " + Schritte.GetText
printlog "X is now: " + X
@@ -127,53 +156,101 @@ testcase tCrossfading
Ueberblenden.OK
sleep 1
Kontext "DocumentDraw"
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
Kontext "Ueberblenden"
if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked."
GleicheOrientierung.UnCheck '/// Uncheck "same orienation" ///' -????
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
sleep 1
Kontext "DocumentDraw"
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
Kontext "Ueberblenden"
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked."
Attributierung.Check '/// Check "Attributing" ///' - ???
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
sleep 1
Kontext "DocumentDraw"
EditSelectAll '/// Select all ///'
sleep 1
EditDelete '/// Delete all ///'
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
Kontext "Ueberblenden"
if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again."
GleicheOrientierung.UnCheck '/// Check "same orientation" ///' -????
Ueberblenden.OK
sleep 1
Kontext "DocumentDraw"
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
Kontext "Ueberblenden"
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again."
GleicheOrientierung.Check '/// Check "same orientation" ///' -????
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
sleep 1
Kontext "DocumentDraw"
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
Kontext "Ueberblenden"
if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again."
GleicheOrientierung.Check '/// Check "same orientation" ///' -????
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
sleep 1
Kontext "DocumentDraw" '/// EditCrossFading should not be enabled if more than two objects is selected. ///'
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
gMouseClick 90,90
Call hRechteckErstellen ( 20, 20, 50, 50 ) '/// Create third rectangle ///'
sleep 1
EditSelectAll '/// Select all ///'
sleep 1
try
EditCrossFading '/// Choose Edit / CrossFading ///'
sleep 2
If active = "Ueberblenden" then
qaerrorlog "CrossFading should NOT be selectable since more than two objects is selected."
kontext "Ueberblenden"
Ueberblenden.CANCEL '/// Close CrossFading-window with "CANCEL" ///'
endif
sleep 2
Kontext "DocumentDraw"
@@ -182,11 +259,14 @@ testcase tCrossfading
endcatch
try
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
catch
warnlog "Could not select and delete all objects."
endcatch
printlog "End of test"
endcase
Call hCloseDocument '/// Close document ///'
endcase 'tCrossfading

View File

@@ -39,11 +39,12 @@
' #1 tCustomshapes
' #1 tFormatPaintbrush
'\********************************************************************
testcase tCustomshapes
dim counter as Integer
dim MakeInto3Dcounter as Integer
'/// Create new document ///'
Call hNewDocument
if gApplication = "DRAW" then
Kontext "Documentdraw"
@@ -53,6 +54,8 @@ testcase tCustomshapes
kontext "Toolbar"
sleep 1
printlog "insert a Smiley."
'/// From the toolbar: Insert three objects: ///'
'/// insert a Smiley. ///'
kontext "Toolbar"
if Toolbar.Exists then
if Toolbar.IsVisible then
@@ -75,11 +78,14 @@ testcase tCustomshapes
kontext "SymbolShapes"
SymbolShapes.Close
'/// Unmark all objects ///'
hTypeKeys "<ESCAPE>"
'/// Mark the Smiley ///'
hTypeKeys "<TAB>"
printlog "Rename the object to 'First'."
'/// Rename the object to 'First' ///"
hOpenContextMenu
sleep 2
'Choose rename.
@@ -93,6 +99,7 @@ testcase tCustomshapes
NameDlgObject.OK
printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'"
'/// Open the Context-menu and set the description of the object to 'First' ///"
hOpenContextMenu
sleep (2)
'Choose "Description"
@@ -114,6 +121,7 @@ testcase tCustomshapes
gMouseClick 90, 90
printlog "Insert a Triangle."
'/// Insert a Triangle ///'
kontext "Toolbar"
if Toolbar.Exists then
if Toolbar.IsVisible then
@@ -135,10 +143,13 @@ testcase tCustomshapes
BasicShapes.Close
sleep 1
'/// Unmark all objects ///'
hTypeKeys "<ESCAPE>"
'/// Mark the Triangle ///'
hTypeKeys "<TAB>", 2
printlog "Rename the object into 'Second'."
'/// Rename the object into 'Second'. ///'
hOpenContextMenu
sleep 2
'Choose rename.
@@ -154,6 +165,7 @@ testcase tCustomshapes
NameDlgObject.OK
printlog "Set the object -Title/Description to 'SecondTitle' and 'SecondText'."
'/// Open the Context-menu and set the description of the object to 'SecondTitle' and 'SecondText' ///"
hOpenContextMenu
sleep (2)
'Choose "Description"
@@ -175,6 +187,7 @@ testcase tCustomshapes
gMouseClick 90, 90
printlog "Insert Thinking-cloud."
'/// Insert Thinking-cloud. ///'
kontext "Toolbar"
if Toolbar.Exists then
if Toolbar.IsVisible then
@@ -198,10 +211,13 @@ testcase tCustomshapes
Callouts.Close
sleep 1
'/// Unmark all objects ///'
hTypeKeys "<ESCAPE>"
'/// Mark the cloud ///'
hTypeKeys "<TAB>", 3
printlog "Rename the object to 'Third'."
'/// Rename the object to 'Third'. ///'
hOpenContextMenu
sleep 2
'Choose rename.
@@ -215,6 +231,7 @@ testcase tCustomshapes
NameDlgObject.OK
printlog "Set the object -Title/Description to 'ThirdTitle' and 'ThirdText'."
'/// Open the Context-menu and set the description of the object to 'First' ///"
hOpenContextMenu
sleep (2)
'Choose "Description"
@@ -236,6 +253,7 @@ testcase tCustomshapes
gMouseClick 90, 90
printlog "Change all objects into 3D."
'/// Change all objects into 3D. ///'
if gApplication = "DRAW" then
Kontext "Documentdraw"
else '(Impress)
@@ -282,6 +300,8 @@ testcase tCustomshapes
Next MakeInto3Dcounter
printlog "See if the objects still are Custom Shapes."
'/// See if the objects still are Custom Shapes ///'
'/// We do so by moving the lower part of the the thinking-cloud. ///'
gMouseClick 90, 1
hTypeKeys "<TAB><TAB><TAB>"
@@ -299,6 +319,7 @@ testcase tCustomshapes
hTypeKeys "<TAB>"
printlog "Check the name of the selected object (should be 'First')"
'/// Check the name of the selected object (should be 'First') ///'
hOpenContextMenu
sleep 2
'Choose rename.
@@ -318,6 +339,7 @@ testcase tCustomshapes
NameDlgObject.OK
printlog "Open the Context-menu and check if the description of the object is right"
'/// Open the Context-menu and check if the description of the object is right ///"
hOpenContextMenu
sleep (2)
'Choose "Description"
@@ -346,6 +368,7 @@ testcase tCustomshapes
gMouseClick 90, 1
hTypeKeys "<TAB><TAB>"
'/// Check the name of the selected object (should be 'Second') ///'
hOpenContextMenu
sleep 2
'Choose rename.
@@ -365,6 +388,7 @@ testcase tCustomshapes
NameDlgObject.OK
printlog "Open the Context-menu and check if the description of the object is right"
'/// Open the Context-menu and check if the description of the object is right ///"
hOpenContextMenu
sleep (2)
'Choose "Description"
@@ -397,6 +421,7 @@ testcase tCustomshapes
gMouseClick 90, 1
hTypeKeys "<TAB><TAB><TAB>"
'/// Check the name of the selected object (should be "Third") ///'
hOpenContextMenu
sleep 2
'Choose rename.
@@ -416,6 +441,7 @@ testcase tCustomshapes
NameDlgObject.OK
printlog "Open the Context-menu and check if the description of the object is right"
'/// Open the Context-menu and check if the description of the object is right ///"
hOpenContextMenu
sleep (2)
'Choose "Description"
@@ -447,12 +473,14 @@ testcase tCustomshapes
endif
printlog "End of test. Close the document."
endcase
'************************************************************************
Call hCloseDocument '/// Close Document ///'
endcase 'tCustomshapes
'---------------------------------------------------------
testcase tFormatPaintbrush
dim counter, ZaehlerVerlauf, j as Integer
'/// Hatching ///'
dim HatchingDistance as string
dim HatchingAngle as string
dim HatchingLineType as string
@@ -501,17 +529,23 @@ testcase tFormatPaintbrush
dim front_value as string
dim background_value as string
'/// Create new document ///'
Call hNewDocument
'/// Create a new rectangle ///'
hRechteckErstellen ( 10, 10, 30, 30 )
FormatArea
'/// Switch to Tabpage "Area" ///'
Kontext
Active.SetPage TabArea
Kontext "TabArea"
sleep 1
FillOptions.Select 4 '/// Select hatching, control after closing and reopening dialog if changes are recognized ///'
'/// Switch to Tabpage "Hatching" ///'
Kontext
Active.setpage TabSchraffuren
Kontext "TabSchraffuren"
'/// Get the values for the Rectangle ///'
HatchingDistance = Abstand.GetText
HatchingAngle = Winkel.GetText
'Definition
@@ -521,7 +555,8 @@ testcase tFormatPaintbrush
'TabSchraffuren.OK
sleep 1
' FormatArea
' FormatArea
'/// Switch to Tabpage "Shaddow" ///'
Kontext
Active.setpage TabSchatten
Kontext "TabSchatten"
@@ -535,6 +570,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Transparency" ///'
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
@@ -552,6 +588,7 @@ testcase tFormatPaintbrush
MFEnd_value = MFEndwert.GetText
sleep 1
'/// Switch to Tabpage "Color" ///'
Kontext
Active.setpage TabFarben
Kontext "TabFarben"
@@ -571,6 +608,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Gradient" ///'
Kontext
Active.setpage TabFarbverlaeufe
Kontext "TabFarbverlaeufe"
@@ -586,6 +624,7 @@ testcase tFormatPaintbrush
tovalue_value = BisWert.GetText
sleep 1
'/// Switch to Tabpage "Bitmap" ///'
Kontext
Active.setpage TabBitmap
Kontext "TabBitmap"
@@ -593,9 +632,11 @@ testcase tFormatPaintbrush
front_value = Vordergrund.GetSelText
background_value = Hintergrund.GetSelText
sleep 1
'/// Close the FormatArea-dialogue with "OK" ///'
TabBitmap.OK
sleep 2
'/// Create a second rectangle, and use the "Paintbrush-icon" to copy the settings for the first rectangle onto the new one ///'
hRechteckErstellen ( 70, 70, 90, 90 )
if gApplication = "DRAW" then
kontext "Documentdraw"
@@ -623,15 +664,21 @@ testcase tFormatPaintbrush
sleep 1
endif
'/// Check if the Formatting is like the first one. ///'
FormatArea
'/// Switch to Tabpage "Area" ///'
Kontext
Active.SetPage TabArea
Kontext "TabArea"
' warnlog "The FillOptions-value was not transferred correctly."
' else
' printlog "The FillOptions-value was transferred correctly."
' endif
' if FillOptions.GetSelIndex <> 4 then '/// The selected value should be 'no fill' ///'
' warnlog "The FillOptions-value was not transferred correctly."
' else
' printlog "The FillOptions-value was transferred correctly."
' endif
sleep 1 '/// control if changes are still there after closing and reopening dialog ///'
FillOptions.Select 4 '/// Select hatching, control after closing and reopening dialog if changes are recognized ///'
'/// Switch to Tabpage "Hatching" ///'
kontext
Active.setpage TabSchraffuren
kontext "TabSchraffuren"
@@ -651,6 +698,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Shaddow" ///'
Kontext
Active.setpage TabSchatten
Kontext "TabSchatten"
@@ -675,6 +723,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Transparency" ///'
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
@@ -713,6 +762,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Color" ///'
Kontext
Active.setpage TabFarben
Kontext "TabFarben"
@@ -753,6 +803,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Gradient" ///'
Kontext
Active.setpage TabFarbverlaeufe
Kontext "TabFarbverlaeufe"
@@ -785,6 +836,7 @@ testcase tFormatPaintbrush
endif
sleep 1
'/// Switch to Tabpage "Bitmap" ///'
Kontext
Active.setpage TabBitmap
Kontext "TabBitmap"
@@ -796,4 +848,6 @@ testcase tFormatPaintbrush
endif
sleep 1
TabBitmap.OK
endcase
Call hCloseDocument '/// Close Document ///'
endcase 'tFormatPaintbrush

View File

@@ -47,9 +47,11 @@ testcase t_Introduction
gApplication = "IMPRESS"
'///Open new presentation
printlog "Open new presentation"
Call hNewDocument
'///Open the Gallery
printlog "Open the Gallery"
ToolsGallery
Sleep (1)
@@ -58,6 +60,7 @@ testcase t_Introduction
ToolsGallery
end if
'///Choose computer theme and insert the third image
printlog "Choose an item from the gallery"
Gallerys.Select(2)
View.TypeKeys "<HOME><RIGHT><RIGHT>"
@@ -67,6 +70,7 @@ testcase t_Introduction
sleep 2
MenuSelect(MenuGetItemID(1)) 'Copy
sleep 2
'///+ - Check that we really got a copy of the object ///'
kontext "DocumentImpress"
DocumentImpress.OpenContextMenu(true)
sleep 2
@@ -95,12 +99,14 @@ testcase t_Introduction
Warnlog "Insert graphic doesn't work"
endcatch
'///Resize object
printlog "Resize object"
Kontext "DocumentImpress"
gMouseClick (10, 10)
sleep 1
EditSelectAll
sleep 1
ContextPositionAndSize '/// Format-position and size
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -110,6 +116,7 @@ testcase t_Introduction
Width.SetText CStr((CInt(Width.GetText)) * 2)
TabPositionAndSize.OK
'///Break object
printlog "Break object"
Kontext "DocumentImpress"
gMouseClick (10, 10)
@@ -118,6 +125,7 @@ testcase t_Introduction
sleep 1
hOpenContextMenu '(when the object is marked)
hMenuSelectNr(13)
'/// Select part of object and make it black
printlog "Select part of object and make it black"
DocumentImpress.TypeKeys "<SHIFT TAB>"
FormatArea
@@ -128,12 +136,14 @@ testcase t_Introduction
ColourList.Select 1
TabArea.OK
'///Group the objects
printlog "Group the object"
kontext "DocumentImpress"
DocumentImpress.TypeKeys "<MOD1 A>"
hOpenContextMenu '(when the object is marked)
hMenuSelectNr(12)
'///Add Layout "Title Only"
Printlog "Add Layout"
kontext "Tasks"
if (NOT Tasks.exists) then
@@ -143,6 +153,7 @@ testcase t_Introduction
Kontext "LayoutsPreview"
LayoutsPreview.TypeKeys "<HOME> <DOWN> <DOWN> <RETURN>"
sleep (5)
'///Add a background
Printlog "Add background"
Kontext "Tasks"
@@ -158,6 +169,7 @@ testcase t_Introduction
Kontext "AvailableForUsePreview"
AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
sleep (5)
'///Add a transition effect
Printlog "Add a transition effect"
Kontext "Tasks"
View.OpenMenu
@@ -168,18 +180,19 @@ testcase t_Introduction
Sleep 1
TransitionSound.Select 4
'///Close the document
Printlog "Close the document"
Call hCloseDocument
endcase 't_Introduction
'--------------------------------------------------------------------
testcase t_Interoperability
Dim sTemplatename as string
gApplication = "IMPRESS"
'///Open PowerPoint presentation
printlog "Open PowerPoint presentation"
hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/dotNetOverview.ppt"))
@@ -216,6 +229,7 @@ testcase t_Interoperability
else printlog " Background has been changed"
endif
'///Switch back to original background
printlog "Switch back to original background"
Kontext "Tasks"
Kontext "AvailableForUsePreview"
@@ -227,6 +241,7 @@ testcase t_Interoperability
else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename
endif
'///Resort slides
printlog "Resort slides"
Kontext "DocumentImpress"
Kontext "Slides"
@@ -260,6 +275,7 @@ testcase t_Interoperability
NameDlgPage.OK
sleep 1
'///Switch views
printlog "Switch views"
ViewWorkspaceOutlineView
sleep (2)
@@ -320,6 +336,7 @@ testcase t_Interoperability
warnlog "Switching to Drawingview was not successfull"
endcatch
'///Travel through the presentation by left pane
printlog "Travel through the presentation by left pane to slide 7"
Kontext "DocumentImpress"
DocumentImpress.TypeKeys "<HOME><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN>"
@@ -363,7 +380,6 @@ testcase t_Interoperability
endcase 't_Interoperability
'--------------------------------------------------------------------
testcase t_DrawingEngine
Dim sGroupPosition as string
@@ -371,11 +387,13 @@ testcase t_DrawingEngine
gApplication = "DRAW"
'///Open a drawing
printlog "Open a drawing"
hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg"))
Call sMakeReadOnlyDocumentEditable
'///Select grouped object and enter group
printlog "Select group"
Kontext "DocumentDraw"
DocumentDraw.TypeKeys "<TAB><TAB>"
@@ -393,6 +411,7 @@ testcase t_DrawingEngine
FormatEditGroupDraw
sleep 1
'///Select and move single object
printlog "Select and move single object"
printlog " Select object"
Kontext "DocumentDraw"
@@ -421,6 +440,7 @@ testcase t_DrawingEngine
DocumentDraw.TypeKeys "<UP><UP><UP>"
sleep (5)
printlog " Verify that the object was moved"
ContextPositionAndSize '/// Format-position and size
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -443,6 +463,7 @@ testcase t_DrawingEngine
endif
TabPositionAndSize.OK
'///Close document
printlog "Close document"
Call hCloseDocument

View File

@@ -52,13 +52,22 @@ testcase tEditDuplicate
dim Ueber_Text_1
dim Zaehler
Call hNewDocument '/// New Impress document ///'
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
EditSelectAll '/// Select rectangle ///'
EditDuplicate '/// Edit-duplicate ///'
Kontext "Duplizieren"
Ueber_Text_1 = AnzahlAnKopien.GetText
AnzahlAnKopien.SetText "50" '/// Set number of copies to 50 ///'
Duplizieren.Cancel '/// Cancel Edit Duplicate ///'
sleep 1
For Zaehler = 1 to 8
EditDuplicate '/// Edit Duplicate ///'
sleep 1
Kontext "Duplizieren"
AnzahlAnKopien.SetText "30" '/// Number of copies = 30 ///'
Select Case Zaehler '/// Setting values for axis and angles ///'
Case 1: XAchse.SetText "0,0"
YAchse.SetText "0,45"
Hoehe.SetText "-0,1"
@@ -87,72 +96,105 @@ testcase tEditDuplicate
Drehwinkel.SetText "355"
End Select
Ende.Select Int((Ende.GetItemCount * Rnd)+1)
Duplizieren.OK '/// Execute Duplicate ///'
sleep 1
Next Zaehler
sleep 2
endcase
Next Zaehler
sleep 2
Call hCloseDocument '/// Close document ///'
endcase 'tEditDuplicate
'---------------------------------------------------------
testcase tEditFields
Call hNewDocument
sleep 3
InsertFieldsDateFix '/// Insert Date-Fix ///'
EditSelectAll '/// Select inserted field ///'
sleep 1
hTypeKeys "<F2>" '/// Go into edit mode (F2) ///'
sleep 2
EditSelectAll '/// Select the date///'
sleep 2
EditfieldsDraw '/// Edit -fields///'
Kontext "FeldbefehlBearbeitenDraw"
sleep 2
FeldtypFix.Check '/// check field type fix ///'
If FeldtypFix.Ischecked then
Printlog "OK FieldtypeFix checkable"
else
else
warnlog "FieldtypeFix not checkable"
end if
sleep 1
If FeldtypVariabel.Ischecked then
Printlog "OK FieldtypeVariabel enabled"
else
warnlog "FieldtypeVariabel not enabled"
end if
end if
FeldtypVariabel.Check '/// check field type variabel///'
sleep 1
If FeldtypVariabel.Ischecked then
Printlog "OK FieldtypeVariabel enabled"
else
warnlog "FieldtypeVariabel not enabled"
end if
' For Zaehler = 1 to FeldtypFormat.GetItemCount
' FeldTypFormat.Select Zaehler
' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText
' Next Zaehler
sleep 2
sleep 2
endcase
FeldbefehlBearbeitenDraw.OK '/// close edit fields dialog ///'
sleep 2
Call hCloseDocument '/// close document ///'
sleep 2
endcase 'tEditFields
'--------------------------------------------------------
testcase tEditDeleteSlide
dim Ueber_Text_1 as string
dim Ueber_Text_2 as string
dim Ueber_Text_3 as string
Call hNewDocument '/// New impress document ///'
sleep 3
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1
ContextPositionAndSize '/// open Position and Size dialog ///'
kontext
Messagebox.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
Ueber_Text_1 = PositionX.GetText '/// get position values for rectangle ///'
TabPositionAndSize.OK
InsertSlide '/// insert slide ///'
sleep 2
hTypekeys "<Pagedown>"
sleep 2
Call hRechteckErstellen ( 40, 40, 60, 60 ) '/// create rectangle ///'
sleep 1
EditDeleteSlide '/// Delete slide ///'
sleep 1
Ueber_Text_2 = "OK Page was closed"
Ueber_Text_3 = "Page was not closed"
call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3) '/// compare position of rectange ///'
sleep 1
endcase
Call hCloseDocument '/// close document ///'
endcase 'tEditDeleteSlide
'--------------------------------------------------------
testcase tEditLinks
Call hNewDocument '/// New document ///'
InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///'
Kontext "GrafikEinfuegenDlg"
Link.Check '/// check link ///'
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
Oeffnen.Click
sleep 3
EditLinksDraw '/// edit links ///'
Kontext "VerknuepfungenBearbeiten"
Aktualisieren.Click '/// refresh ///'
sleep 1
'Aendern 'kann man noch den Dialog aufrufen...
Loesen.Click
sleep 1
Kontext
Messagebox.Yes
VerknuepfungenBearbeiten.Close '/// close dialog ///'
sleep 1
try
EditLinksDraw '/// check if last changes remain in the dialog ///'
Kontext "VerknuepfungenBearbeiten"
Loesen.Click
sleep 1
@@ -163,33 +205,47 @@ testcase tEditLinks
catch
printlog "OK Link broken"
endcatch
endcase
Call hCloseDocument '/// close document ///'
endcase 'tEditLinks
'---------------------------------------------------------
testcase tdEditDeleteLayer
dim Ueber_Text_1 as string
dim Ueber_Text_2 as string
dim Ueber_Text_3 as string
Call hNewDocument '/// new document ///'
sleep 2
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1
'/// View->Layer ///'
ViewLayer
ContextPositionAndSize '/// get position values for rectangle ///'
kontext
active.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
Ueber_Text_1 = PositionX.GetText
TabPositionAndSize.OK
InsertLayer '/// insert layer ///'
Kontext "EbeneEinfuegenDlg"
EbeneEinfuegenDlg.OK
Call hRechteckErstellen ( 10, 40, 90, 60 ) '/// create rectangle on created layer ///'
sleep 1
EditDeleteLayer '/// delete layer ///'
sleep 1
Kontext
Active.Yes
sleep 1
Ueber_Text_2 = "OK Layer was deleted" '/// compare position of selected rectangle with position of created rectangle in deteted layer ///'
Ueber_Text_3 = "Layer was not deleted"
Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
sleep 1
endcase
Call hCloseDocument '/// close document ///'
endcase 'tdEditDeleteLayer
'--------------------------------------------------------
testcase tEditObjectEdit
Dim Schrieb as string
Schrieb = gOLEWriter
@@ -198,6 +254,8 @@ testcase tEditObjectEdit
else
Call hNewDocument
sleep 1 '/// new document ///'
InsertObjectOLEObject '/// insert writer ole object ///'
Kontext "OLEObjektEinfuegen"
sleep 3
if ObjektTyp.GetItemCount = 0 Then
@@ -216,6 +274,7 @@ testcase tEditObjectEdit
EditSelectAll
try
EditObjectEdit 'keine ID '/// try edit-objects ///'
sleep 2
catch
Warnlog "- The EditObjectEdit did not work"
@@ -225,5 +284,6 @@ testcase tEditObjectEdit
gMouseClick 90,90
end if
sleep 1
Call hCloseDocument '/// close document ///'
endif
endcase
endcase 'tEditObjectEdit

View File

@@ -50,6 +50,7 @@ testcase tHtmlExport
dim sTemp as string
dim sFile as string
'/// open 'tools->options' and set first/last name and email adress on the page 'StarOffice->UserData' ///'
ToolsOptions
hToolsOptions ("STAROFFICE","USERDATA")
VorName.SetText "Garfield"
@@ -58,6 +59,7 @@ testcase tHtmlExport
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
'/// create directory if not exists and delete the content, if exists user\\work\\html\\ ///'
app.mkDir ((ConvertPath (gOfficePath + "user\work\html\"))
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
@@ -67,28 +69,37 @@ testcase tHtmlExport
next i
endif
'/// open application ///'
Call hNewDocument
WaitSlot (3000)
'---------------------------------- simple document -----------------------------------------------
'---------------------------------- simple document -----------------------------------------------
'/// create a rectrangle ///'
hTextrahmenErstellen ("This is a test text",10,10,40,20)
WaitSlot (2000)
'/// create another rectrangle ///'
hRechteckErstellen (50,50,70,70)
WaitSlot (3000)
'###################################################################################################
'###################################################################################################
Printlog "'///<b> test if no file is created, if dialog is canceld </b>///'"
'/// call 'File->Export'///'
FileExport
Kontext "ExportierenDlg"
WaitSlot (1000)
gHTMLFilter = Dateityp.GetItemText(1)
Dateityp.Select(gHTMLFilter)
'/// set Filename to 'user\\work\\html\\expo0.html' ///'
sFile = ConvertPath (gOfficePath + "user\work\html\expo0")
Dateiname.SetText sFile
WaitSlot (2000)
'/// click button 'Save' ///'
Speichern.Click
WaitSlot (3000)
Kontext "Active"
if Active.Exists Then Active.Yes
'--------------------------------------------------------------------------
'--------------------------------------------------------------------------
'/// now we are on the dialog -1- 'Assign design' ///'
Kontext "HTMLExport1"
'/// click button 'Cancel' ///'
HTMLExport1.Cancel
WaitSlot (5000)
Liste(0) = 0
@@ -102,66 +113,88 @@ testcase tHtmlExport
next i
KillFileList (Liste())
end if
'###################################################################################################
'###################################################################################################
Printlog "'///<b> test if files are created </b>///'"
'/// call 'File->Export'///'
FileExport
Kontext "ExportierenDlg"
WaitSlot (1000)
try
'/// select Filetype 'HTML...' aka 'WebPage' ///'
Dateityp.Select gHTMLFilter
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
Dateityp.Select 1 '/// Selects the first entry - which should be html ///'
endcatch
WaitSlot (1000)
'/// set Filename to 'user\\work\\html\\expo.html' ///'
sFile = ConvertPath (gOfficePath + "user\work\html\expo.html")
Dateiname.SetText sFile
WaitSlot (2000)
'/// click button 'Save' ///'
Speichern.Click
WaitSlot (3000)
Kontext "Active"
if Active.Exists Then Active.Yes
'--------------------------------------------------------------------------
'--------------------------------------------------------------------------
Printlog "'/// now we are on the dialog -1- 'Assign design' ///'"
Kontext "HTMLExport1"
'/// 'New design' should be checked ///'
if (NeuesDesign.IsEnabled <> TRUE) then
warnlog "NewDesign is not enabled by default :-("
endif
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (1000)
Printlog "'/// now we are on the dialog -2- 'Publication Type & Options' ///'"
Kontext "HTMLExport2"
'/// checkbox 'Standard HTML Format' is checked by default ///'
if (Standard.IsChecked <> TRUE) then
warnlog "Standard is not enabled by default :-("
Standard.Check
end if
'/// checkbox 'Title Page' is checked by default ///'
if Not TitelseiteErzeugen.IsChecked Then
TitelSeiteErzeugen.Check
Warnlog "- 'create Titlepage' should be checked as default :-("
end if
if (gApplication = "IMPRESS") then
'/// if applcation is impress: the checkbox 'Show notes' is enabled by default///'
If (Notizenanzeigen.IsChecked <> TRUE) Then
warnlog "- 'Show notes' checked as default :-("
Notizenanzeigen.Check
end if
end if
'/// click button 'Next >>' ///'
Weiter.Click
Printlog "'/// now we are on the dialog -3- 'png/gif/jpeg & resolution & sound' ///'"
Kontext "HTMLExport3"
'/// checkbox 'PNG' is checked by default ///'
if (PNG.isChecked <> TRUE) then
warnlog "Save Graphic as 'PNG' is not checked as default :-("
PNG.Check
end if
'/// Listbox compression '75%' is selected by default ///'
if (Kompressionswert.GetSelText <> "75%") then
warnlog "'Compression' should be '75%', but is: '" + Kompressionswert.GetSelText + "'"
Kompressionswert.Select "75%"
end if
'/// checkbox 'low monitor resolution' is checked by default ///'
if (NiedrigeAufloesung.IsChecked <> TRUE)Then
warnlog "Monitor resolution 'low' is not selected as default :-("
NiedrigeAufloesung.Check
end if
'/// checkbox 'export sounds' is checked by default ///'
if (KlaengeExportieren.IsChecked <> true) then
warnlog "'Export Sounds' is not checked as default :-("
KlaengeExportieren.Check
end if
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (1000)
Printlog "'/// now we are on the dialog -4- 'Information for the title page' ///'"
Kontext "HTMLExport4"
'/// the names you entered in the options have to appeare here! ///'
sTemp = Autor.GetText
Autor1=Autor.GetText
if (sTemp <> "Garfield Peanuts") then
@@ -172,18 +205,24 @@ testcase tHtmlExport
if (sTemp <> "recumbent@sun.com") then
warnlog "Value for 'Email' is other than expected, should be 'recumbent@sun.com', is: '"+sTemp+"'"
end if
'/// set text in field 'your homepage' ///'
Homepage.SetText "mahler"
AdditionalInformation.SetText "QualityApprooved"
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (2000)
Printlog "'/// now we are on the dialog -5- 'select button style' ///'"
Kontext "HTMLExport5"
WaitSlot (5000)
'/// checkbox 'Text only' should be checked by default ///'
if (NurText.ischecked <> TRUE) then
warnlog "'Text only' is not checked by default :-("
NurText.check
end if
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (1000)
Printlog "'/// now we are on the dialog -6- 'select color scheme' ///'"
Kontext "HTMLExport6"
WaitSlot (2000)
' maybe check if colour dialog comes up ?! TBO
@@ -192,13 +231,16 @@ testcase tHtmlExport
'AktiverLink
'GesichteterLink
'Hintergrund
'/// 'Apply color schemes from document' should be checked per default :-) ///'
if (FarbenAusDok.IsChecked <> TRUE) Then
warnlog "'Apply color schemes from document' should be checked per default :-("
FarbenAusDok.Check
end if
WaitSlot (2000)
'/// click button 'Create' ///'
HTMLExport6.OK
WaitSlot (5000)
Printlog "'/// now we are on the dialog -7- 'Name HTML Design' ///'"
Kontext "HTMLDesign"
WaitSlot (1000)
Designname.SetText "Lem's Standard"
@@ -210,12 +252,13 @@ testcase tHtmlExport
printlog " SAY YES!------------------"
active.yes
end if
'/// check number and names of created files ///'
Printlog "used file name: '" + sFile + "'"
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.*" , Liste() )
WaitSlot (1000)
x = ListCount(Liste())
' Printlog "gApplication is: " + gApplication ' For debugging - FHA
' Printlog "gApplication is: " + gApplication ' For debugging - FHA
if gApplication = "DRAW" then
if (x <> "3") then
Warnlog "- Number of files is not correct, it should be:3 but it is: '" + x + "' - Draw"
@@ -231,6 +274,7 @@ testcase tHtmlExport
next
end if
end if
'/// check if fileextension is common - .htm or .html for all files the same ///'
Liste(0) = 0
GetFileList ((ConvertPath (gOfficePath + "user\work\html\")), "*.htm" , Liste() )
WaitSlot (1000)
@@ -244,29 +288,36 @@ testcase tHtmlExport
Warnlog " htm : " + x
Warnlog " html: " + i
end if
'------------------------------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------------------------------
Printlog "'///<b> check if design is created in dialog </b>///'"
WaitSlot (3000)
'/// File->Export ///'
FileExport
Kontext "ExportierenDlg"
'/// Set Filename to "user\\work\\html\\expo.html" ///'
Dateiname.SetText sFile
try
'/// select Filetype 'HTML...' aka 'WebPage' ///'
Dateityp.Select gHTMLFilter
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
endcatch
WaitSlot (1000)
'/// click button 'save' ///'
Speichern.Click
WaitSlot (1000)
Kontext "Active"
' active about overwriting existing file
if Active.Exists Then Active.Yes
'--------------------------------------------------------------------------
'--------------------------------------------------------------------------
WaitSlot (1000)
Kontext "HTMLExport1"
WaitSlot (1000)
try
'/// now 'existing design' is checkable -> check it ///'
ExistierendesDesign.Check
WaitSlot (3000)
'/// there has to be 1 design in the list, select and delete it ///'
x = Designliste.GetItemCount
if (x <> 1) then
warnlog "there is an unexpected count on designs in the list, expected 1, but there are : '" + x + "'"
@@ -293,8 +344,8 @@ testcase tHtmlExport
Call hCloseDocument
Printlog "used file name: '" + sFile + "'"
' TBOTODO CHECK files contenet !
endcase 'tHtmlExport
endcase 'tHtmlExport
'-------------------------------------------------------------------------------
testcase tHtmlExport_Webcast
@@ -305,6 +356,7 @@ testcase tHtmlExport_Webcast
dim Liste ( 200 ) as String
dim sFile as string
'/// create directories if not exists and delete the content, if exists user\\work\\html\\[asp|perl]\\ ///'
app.mkDir (ConvertPath (gOfficePath + "user\work\html\asp\"))
app.mkDir (ConvertPath (gOfficePath + "user\work\html\perl\"))
Liste(0) = 0
@@ -324,6 +376,7 @@ testcase tHtmlExport_Webcast
next i
end if
'/// File->Autopillot->Presentation... ///'----------------------------------
FileAutopilotPresentation
Kontext "Active"
if Active.Exists(1) then
@@ -335,12 +388,18 @@ testcase tHtmlExport_Webcast
endcatch
goto endsub
end if
'/// Page 1 of autopilot///'
Kontext "AutopilotPraesentation1"
'/// uncheck 'preview' ///'
Preview.Uncheck
'/// click on button 'create' ///'
AutopilotPraesentation1.OK
WaitSlot (3000)
'************************************************************ Page 1
Printlog "'///<b> create a presentation and save it for further references </b>///'"
'/// start creating the presentation now ///'-------------------------------
Printlog "- Create presentation"
'/// select 'click to add title' with [TAB] and press [F2] to edit the placeholder title ///'
hTypeKeys "<TAB><F2>"
WaitSlot (2000)
Select Case Ucase(gApplication)
@@ -348,24 +407,32 @@ testcase tHtmlExport_Webcast
case "IMPRESS" : hMouseClick DocumentImpress,50,50
end select
WaitSlot (3000)
'/// Type 'This is a test text', select it. ///'
hTextrahmenErstellen ("This is a test text",10,10,40,20)
EditSelectAll
Kontext "TextObjectbar"
'/// click 'bold text' in object toolbar ///'
Fett.Click
WaitSlot (2000)
'/// press [esacpe][tab] to get out of edit mode and select the next placeholder ///'
hTypeKeys "<escape><TAB>"
WaitSlot (1000)
'/// SlideShow->Effects ///'
SlideShowCustomAnimation
WaitSlot (1000)
Kontext "Tasks"
WaitSlot (1000)
EffectAdd.Click
'/// Dialog 'Custom Animation' comes up ///'
kontext
'/// Switch to TabPage: Entrance ///'
active.setPage(TabEntrance)
Kontext "TabEntrance"
if TabEntrance.Exists (5) then
WaitSlot (1000)
'/// select effect 'ABC v' :-) ///'
Effects.Select(5)
'/// select speed 'slow' -> first item in list ///'
Speed.Select 1
try
TabEntrance.Ok
@@ -381,34 +448,42 @@ testcase tHtmlExport_Webcast
kontext "Tasks"
end if
WaitSlot (3000)
'Doesnt work, will work when accessability works better - FHA.
'/// activate grafik insert dialog by typing [return] ///'
'Doesnt work, will work when accessability works better - FHA.
' hTypeKEys "<return>" ' i love accessability feartures .-)))))))))))))))))
' hTypeKEys "<return>" ' i love accessability feartures .-)))))))))))))))))
InsertGraphicsFromFile
Kontext "GrafikEinfuegenDlg"
if GrafikEinfuegenDlg.Exists <> TRUE then
WaitSlot (1000)
end if
'/// insert grafik: global\\input\\graf_inp\\borabora.jpg ///'
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg")
WaitSlot (3000)
Oeffnen.Click
WaitSlot (2000)
'/// select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder ///'
hTypeKeys "<TAB><F2>"
'/// insert text and select the words by typing [strg a] ///'
hTypeKeys "Mecury<RETURN>Venus<RETURN>Earth<RETURN>Mars<RETURN>Jupiter<RETURN>Saturn<RETURN>Uranus<RETURN>Neptune<RETURN>Pluto"
EditSelectAll
WaitSlot (1000)
'/// format->character ///'
FormatCharacter
WaitSlot (2000)
Kontext
Active.SetPage TabFont
Kontext "TabFont"
'/// set font size to '18' on tabpage 'font' ///'
try
SizeWest.SetText "18"
catch
Size.SetText "18"
endcatch
'/// click button OK ///'
TabFont.OK
WaitSlot (1000)
'/// click 'bold text' in object toolbar ///'
Kontext "TextObjectbar"
try
usebindings
@@ -429,12 +504,14 @@ testcase tHtmlExport_Webcast
endcatch
endcatch
WaitSlot (2000)
'/// SlideShow-> CustomAnimation ///'
SlideShowCustomAnimation
WaitSlot (1000)
Kontext "Tasks"
WaitSlot (1000)
EffectChange.Click
kontext
'/// Switch to TabPage: Entrance ///'
active.setPage(TabEntrance)
kontext "TabEntrance"
Effects.TypeKeys "<DOWN>",8
@@ -444,29 +521,37 @@ testcase tHtmlExport_Webcast
catch
warnlog "select another effect, assign is not possible"
endcatch
'************************************************************ Page 2 Merkur
'************************************************************ Page 2 Merkur
'/// create a 2nd slide with: insert->slide ///'
InsertSlide
WaitSlot (2000)
hTypekeys "<Pagedown>"
WaitSlot (2000)
'/// select 'click to add title' with [TAB] and press [F2] to edit the placeholder title ///'
hTypeKeys "<TAB><F2>"
WaitSlot (2000)
'/// Type 'MERKUR', select it via Edit-Select All///'
hTextrahmenErstellen ("MERKUR",10,10,60,30)
EditSelectAll
WaitSlot (2000)
'/// click 'bold text' in object toolbar ///'
Kontext "TextObjectbar"
Fett.Click
WaitSlot (1000)
' hTypeKeys "<escape><tab><return>"
'/// press [esacpe][tab][return] to get out of edit mode and select the next placeholder and activate grafik insert dialog ///'
' hTypeKeys "<escape><tab><return>"
hTypeKeys "<escape><tab>"
InsertGraphicsFromFile
WaitSlot (4000)
'/// insert grafik: global\\input\\graf_inp\\borabora.jpg ///'
Kontext "GrafikEinfuegenDlg"
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\borabora.jpg")
WaitSlot (3000)
Oeffnen.Click
WaitSlot (2000)
'/// select 'click to add an outline' with [TAB] and press [F2] to edit the placeholder ///'
hTypeKeys "<TAB><F2>"
'/// insert text and select the words by typing [strg a] ///'
WaitSlot (1000)
hTypeKeys "Reciprocal Mass *5972000<SHIFT RETURN>Mass (Erde=1) 0,0558<SHIFT RETURN>Mass in kg 3,30310<SHIFT RETURN>"
hTypeKeys "Equator-radius (km) 2440<SHIFT RETURN>Equator-radius (Erde=1)0,382<SHIFT RETURN>Middle density (kg/m^3) 5400<SHIFT RETURN>"
@@ -475,18 +560,22 @@ testcase tHtmlExport_Webcast
hTypeKeys "Temperatur at night -170C<SHIFT RETURN>Diameter (km) 4800"
EditSelectAll
WaitSlot (1000)
'/// format->character ///'
FormatCharacter
WaitSlot (2000)
Kontext
Active.SetPage TabFont
Kontext "TabFont"
'/// set font size to '18' on tabpage 'font' ///'
try
SizeWest.SetText "16"
catch
Size.SetText "16"
endcatch
'/// click button OK ///'
TabFont.OK
WaitSlot (2000)
'/// click 'bold text' in object toolbar ///'
Kontext "TextObjectbar"
try
Fett.Click 'culprint
@@ -505,46 +594,65 @@ testcase tHtmlExport_Webcast
endcatch
endcatch
WaitSlot (2000)
'/// save file with impress filter : "user\\work\\webcast.odp" ///'
sFile = ConvertPath (gOfficePath + "user\work\webcast")
if (Dir (sFile + ".odp") <> "") then app.kill (sFile + ".odp")
WaitSlot (2000)
hFileSaveAsWithFilterKill ((sFile + ".odp") , "impress8" )
Printlog "saved presentation: '" + sFile + ".odp"
'----------------------------------- Exportieren als ASP Web-Cast
'----------------------------------- Exportieren als ASP Web-Cast
Printlog "'///<b> export as webcast ASP </b>///'"
'/// File->SaveAs ///'
FileExport
WaitSlot (2000)
Kontext "ExportierenDlg"
try
'/// select Filetype 'HTML...' aka 'WebPage' ///'
gHTMLFilter = Dateityp.GetItemText(1)
Dateityp.Select(gHTMLFilter)
catch
errorlog " Filter not available :-( : '"+gHTMLFilter+"'"
Dateityp.Select 1 '/// Selects the first entry - which should be html ///'
endcatch
'/// Set Filename to "user\\work\\webcst_asp.html" ///'
sFile = ConvertPath (gOfficePath + "user\work\html\asp\webcast.html")
Dateiname.SetText sFile
'/// click button 'save' ///'
Speichern.Click
WaitSlot (5000)
Kontext "Active"' ????????? TBO
if Active.Exists (5) Then Active.Yes
WaitSlot (3000)
'/// now we are on the dialog -1- 'Assign design' ///'
Kontext "HTMLExport1"
WaitSlot (2000)
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (2000)
'/// now we are on the dialog -2- 'Publication Type & Options' ///'
Kontext "HTMLExport2"
WaitSlot (2000)
Printlog "'/// check 'WebCast' ///"
WebCast.Check
WaitSlot (2000)
Printlog "'/// check 'Active Server Pages (ASP)' ///"
ASP.Check
'/// click button 'Next >>' ///'
Weiter.Click
'/// now we are on the dialog -3- 'gif/jpeg & resolution & sound' ///'
Kontext "HTMLExport3"
WaitSlot (2000)
'/// check Save graphics as 'GIF' ///'
Gif.Check
'/// check 'Medium (monitor) Resolution' ///'
MittlereAufloesung.Check
WaitSlot (1000)
'/// click button 'Create' ///'
HTMLExport3.OK
WaitSlot (2000)
'/// now we are on the dialog -7- 'Name HTML Design' ///'
Kontext "HTMLDesign"
'/// click button 'Do Not Save' ///'
if HTMLDesign.Exists Then HTMLDesign.Cancel
iWaitIndex = 0
do while HTMLDesign.Exists AND iWaitIndex < 30
@@ -563,12 +671,15 @@ testcase tHtmlExport_Webcast
printlog "("+i+"/"+x+"): '"+Liste(i)+"'"
next
end if
'----------------------------------- Exportieren als ASP Web-Cast
'----------------------------------- Exportieren als ASP Web-Cast
Printlog "'///<b> export as webcast PERL </b>///'"
Kontext "DocumentImpress"
WaitSlot (2000)
'/// File->export ///'
FileExport
WaitSlot (2000)
Kontext "ExportierenDlg"
'/// select Filetype 'HTML...' aka 'WebPage' ///'
try
Dateityp.Select gHTMLFilter
catch
@@ -577,35 +688,51 @@ testcase tHtmlExport_Webcast
printlog "Selected " + Dateityp.GetSelText + " manually."
endcatch
WaitSlot (1000)
'/// Set Filename to "user\\work\\wbcst_p.html" ///'
sFile = ConvertPath (gOfficePath + "user\work\html\perl\webcast")
Dateiname.SetText sFile
'/// click button 'save' ///'
Speichern.Click
WaitSlot (2000)
Kontext "Active" '/// click button 'save' ///'
if Active.Exists Then Active.Yes
WaitSlot (2000)
'/// now we are on the dialog -1- 'Assign design' ///'
Kontext "HTMLExport1"
WaitSlot (2000)
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (2000)
'/// now we are on the dialog -2- 'Publication Type & Options' ///'
Kontext "HTMLExport2"
WaitSlot (2000)
Printlog "'/// check 'WebCast' ///"
WebCast.Check
WaitSlot (2000)
Printlog "'/// check 'Perl' ///"
PERL.Check
WaitSlot (1000)
'/// 'URL for listeners' ///'
printlog "URL for listeners compare to to TBO: '"+BeamerURL.GetText+"'"
'/// set 'URL for presentation' to 'wbcst_prl.html' ///'
PraesentationURL.SetText "wbcst_prl"
WaitSlot (1000)
'/// set 'URL for perl scrips' to '/WebCast/cgi-bin/' ///'
ScriptURL.SetText "/WebCast/cgi-bin/"
printlog "presentation url? : "+ (gOfficePath + "/WebCast/cgi-bin/wbcst_prl")
WaitSlot (1000)
'/// click button 'Next >>' ///'
Weiter.Click
WaitSlot (1000)
'/// now we are on the dialog -3- 'gif/jpeg & resolution & sound' ///'
Kontext "HTMLExport3"
WaitSlot (1000)
'/// check Save graphics as 'GIF' ///'
Gif.Check
'/// check 'Medium (monitor) Resolution' ///'
MittlereAufloesung.Check
WaitSlot (3000)
'/// click button 'Create' ///'
HTMLExport3.OK
WaitSlot (3000)
Kontext "HTMLDesign"
@@ -625,4 +752,4 @@ testcase tHtmlExport_Webcast
Call hCloseDocument
' TBO: TODO FILECHECK IF EXISTS
endcase
endcase 'tHtmlExport_Webcast

View File

@@ -41,8 +41,8 @@
' #1 tiEditSearchAndReplaceBUGS
'*
'\**********************************************************************************
testcase tiEditSearchAndReplace
'/// This test tests the 'Search and Replace' -dialogue. ///'
Dim sFile 'as string
Dim sExpression(2) as string ' Expression to look for: ... Replace with
dim sExt as string
@@ -77,7 +77,7 @@ testcase tiEditSearchAndReplace
case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German
case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil)
case 66 : ' Thai
' case 81 : sExpression(1) = "<22><><EFBFBD>" : sExpression(2) = "<22><><EFBFBD>" ' Japanese
' case 81 : sExpression(1) = "<EFBFBD><EFBFBD><EFBFBD>" : sExpression(2) = "<EFBFBD><EFBFBD><EFBFBD>" ' Japanese
' case 82 : ' Korean
' case 86 : ' Chinese (simplified)
' case 88 : ' Chinese (traditional)
@@ -86,7 +86,7 @@ testcase tiEditSearchAndReplace
case 96 : ' Arab
case 97 : ' Hebrew
case else :
' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
printlog " :-) Will use English instead"
sExpression(1) = "Alle" : sExpression(2) = "Allz"
end select
@@ -113,16 +113,24 @@ testcase tiEditSearchAndReplace
Messagebox.OK
end if
sleep 2
hTypeKeys "<MOD1 HOME>" '/// Select the text ///'
'/// Edit-Find & Replace I///'
EditSearchAndReplace
sleep 1
Kontext "FindAndReplace"
'/// Clap the 'more options'-part open ///'
More.Click
'/// verify, that search is done without 'similarity search' !!! ///'
if SimilaritySearch.IsChecked = TRUE then
SimilaritySearch.UnCheck
warnlog "'Similar search' checkbox was enabled! It shouldn't be the default!"
end if
SearchFor.SetText sExpression(1) '/// set Search text ///'
ReplaceWith.SetText sExpression(2) '/// set Replace text///'
'/// Word has to be there ONLY three times ///'
SearchNow.Click '/// 1st search for text ///'
Kontext "Messagebox"
if Messagebox.Exists(2) then
Printlog Messagebox.GetText
@@ -131,6 +139,7 @@ testcase tiEditSearchAndReplace
sleep 1
Kontext "FindAndReplace"
SearchNow.Click '/// 2nd search for text ///'
Kontext "Messagebox"
if Messagebox.Exists(2) then
Printlog Messagebox.GetText
@@ -139,6 +148,7 @@ testcase tiEditSearchAndReplace
sleep 1
Kontext "FindAndReplace"
SearchNow.Click '/// 3th search for text///'
Kontext "Messagebox"
if Messagebox.Exists(2) then
Printlog Messagebox.GetText
@@ -147,12 +157,14 @@ testcase tiEditSearchAndReplace
sleep 1
Kontext "FindAndReplace"
SearchNow.Click '/// 4th search for text; but it is no more available!///'
sleep 2
kontext "Messagebox"
if Messagebox.Exists Then
Printlog "- The word was found 3 times: '" + messagebox.gettext + "'"
Messagebox.OK
else
SearchNow.Click '/// 5th search for word 1///'
kontext
if Messagebox.Exists (5) Then
Printlog "?: "+Messagebox.gettext
@@ -162,6 +174,7 @@ testcase tiEditSearchAndReplace
Warnlog "- No MsgBox appeared: 'changed'"
end if
'/// Replace all ///'
Kontext "FindAndReplace"
sleep 1
ReplaceAll.Click
@@ -175,6 +188,7 @@ testcase tiEditSearchAndReplace
end if
Kontext "FindAndReplace"
sleep 2
SearchNow.Click '/// Search for word 1 to check if all words are replaced ///'
Kontext "Messagebox"
if Not Messagebox.Exists then
Warnlog " Not all words are replaced (Replace All)"
@@ -186,13 +200,17 @@ testcase tiEditSearchAndReplace
FindAndReplace.Close
sleep 3
'/// Edit-Find & Replace II ///'
gMouseClick 50,50
sleep 1
hTypeKeys "<MOD1 HOME>"
EditSearchAndReplace
sleep 1
Kontext "FindAndReplace"
SearchFor.SetText sExpression(2) '/// Search for word 2 ///'
ReplaceWith.SetText sExpression(1) '/// Replace with word 1 ///'
Replace.Click '/// Replace 1 ///'
Kontext "Messagebox"
if Messagebox.Exists(4) Then
Kontext "Messagebox"
@@ -204,6 +222,7 @@ testcase tiEditSearchAndReplace
Kontext "FindAndReplace"
sleep 1
SearchNow.Click '/// 2nd search for word 2 ///'
Kontext "Messagebox"
if Messagebox.Exists(2) Then
Warnlog " All words got replaced, but only the 1st should have been"
@@ -214,6 +233,7 @@ testcase tiEditSearchAndReplace
Printlog " Word replaced"
end if
'/// Replace all ///'
Kontext "FindAndReplace"
ReplaceAll.Click
kontext "Messagebox"
@@ -223,6 +243,7 @@ testcase tiEditSearchAndReplace
Printlog "- No messagebox after replace all"
end if
'/// Search for word 2 to check if all are replaced ///'
Kontext "FindAndReplace"
SearchNow.Click
kontext "Messagebox"
@@ -237,15 +258,21 @@ testcase tiEditSearchAndReplace
More.Click
FindAndReplace.Close
sleep 2
'/// Close document ///'
Call hCloseDocument
endcase
endcase 'tiEditSearchAndReplace
'--------------------------------------------------------
testcase tiEditSearchAndReplaceBUGS
'/// inspired by bugs: 101974, 101975, 101976 ///'
dim i as integer
dim bTemp as boolean
'/// open application ///'
Call hNewDocument
sleep 3
'/// Edit->Search and Replace ///'
EditSearchAndReplace
Kontext "FindAndReplace"
if FindAndReplace.Exists (5) then
@@ -254,6 +281,7 @@ testcase tiEditSearchAndReplaceBUGS
Warnlog "Dialog for Search&Replace could NOT be opened :-("
endif
'/// for al 5 views in 'View->Workspace->...' do: ///'
for i = 1 to 6
Printlog "- " + i + " View->Workspace->... ------------------------------------------------------"
try
@@ -292,6 +320,7 @@ testcase tiEditSearchAndReplaceBUGS
endcatch
sleep 5
Kontext "FindAndReplace"
'///+ if not already open, open. edit->search and replace ///'
if (FindAndReplace.exists <> TRUE) then
try
EditSearchAndReplace
@@ -306,10 +335,13 @@ testcase tiEditSearchAndReplaceBUGS
endif
else
Kontext "FindAndReplace"
'///+ set text to look for to "a" ///'
SearchFor.SetText "a"
Printlog "'///+ click button 'find' ///'"
SearchNow.Click
sleep 5
kontext
'///+ if active exists 'wrap/not found...' say OK ///'
if active.exists(5) then
Printlog "Active: '" + active.GetText + "'"
try
@@ -330,5 +362,7 @@ testcase tiEditSearchAndReplaceBUGS
next i
Kontext "FindAndReplace"
FindAndReplace.cancel
'/// close application ///'
Call hCloseDocument
endcase
endcase 'tiEditSearchAndReplaceBUGS

View File

@@ -44,7 +44,6 @@
' #1 tdFormatTemplates
' #1 tiFormatAufzaehlungszeichen
'\******************************************************************
testcase tiFormatText
Dim a as string
Dim b as string
@@ -53,86 +52,127 @@ testcase tiFormatText
Dim ZaehlerEffekt
dim sTemp as string
'/// open application ///'
Call hNewDocument
'/// create a textbox with text ///'
Call hTextrahmenErstellen ("This is a text, which, I hope, in Staroffice, will be automaticly formatted. Should that not be the case, then it doesn't matter.",20,20,70,20)
WaitSlot (1000)
'/// click outside of textbox, to leave edit mode of textbox and deselect it ///'
gMouseClick 99,99
'/// type key [TAB] to select textbox again ///'
hTypeKeys "<TAB>"
'/// Format->Position and Size ///'
FormatPositionAndSize
Kontext
'/// select tabpage 'Format and Size' on dialog 'Position and Size' ///'
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
sleep 2
'/// get and remember Position: 'Position X' ///'
a = PositionX.GetText
'/// close dialog 'Position and Size' with OK ///'
TabPositionAndSize.OK
'/// Format -> Text... ///'
FormatTextDraw
Kontext
'/// select tabpage 'Text' ///'
Active.SetPage TabText
Kontext "TabText"
'/// Check checkbox 'Fit width to text' ///'
BreiteAnTextAnpassen.Check
'/// leave dialog with OK ///'
TabText.OK
'/// Dialog should have been resized and moved now! ///'
'/// Format->Position and Size ///'
ContextPositionAndSize
Kontext
'/// select tabpage 'Format and Size' on dialog 'Position and Size' ///'
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
WaitSlot (2000)
'/// compare 'Position X' with saved value - has to be different ///'
sTemp = PositionX.GetText
if (sTemp <> a) Then
Printlog " - Fit to frame does work"
else
warnlog " - Fit to frame doesn't work: expected: '" + a + "' is: '" + + "'"
end if
'/// get and remember Position: 'Position Y' ///'
b=PositionY.GetText
TabPositionAndSize.OK
'/// Format -> Text... ///'
FormatTextDraw
Kontext
'/// select tabpage 'Text' ///'
Active.SetPage TabText
Kontext "TabText"
'/// UNCheck checkbox 'Fit width to text' ///'
BreiteAnTextAnpassen.Uncheck
'/// check checkbox 'Fit height to text' ///'
HoeheAnTextAnpassen.Check
'/// if checkbox 'Fit to frame' is enabled: this state only happens, if 'Fit height to text' and 'Fit width to text' are checked ///'
if AmRahmenAnpassen.IsEnabled Then
WarnLog " - checkbox 'Fit to frame' is enabled, which is wrong!"
else
PrintLog " - checkbox 'Fit to frame' is disabled."
end if
WaitSlot (1000)
'/// UNcheck checkbox 'Fit height to text' ///'
HoeheAnTextAnpassen.UnCheck
'/// UNCheck checkbox 'Fit width to text' ///'
BreiteAnTextAnpassen.UnCheck
'/// if checkbox 'Fit to frame' is disabled: this state only happens, if 'Fit height to text' and/or 'Fit width to text' are checked ///'
if AmRahmenAnpassen.IsEnabled Then
PrintLog " - checkbox 'Fit to frame' is enabled."
else
WarnLog " - checkbox 'Fit to frame' is disabled, which is wrong!"
end if
' PrintLog "Full width: " + GanzeBreite.IsChecked
' PrintLog "Full width: " + GanzeBreite.IsChecked
'/// set metric field 'Left' to 10 ///'
Links.SetText "10"
'/// set metric field 'Right' to 10 ///'
Rechts.SetText "10"
'/// set metric field 'Top' to 10 ///'
Oben.SetText "10"
'/// set metric field 'Bottom' to 10 ///'
Unten.SetText "10"
'/// leave dialog with OK ///'
TabText.OK
'/// Edit -> Select All ///'
EditSelectAll
'/// type Keys [Strg]+[x] to cut object ///'
hTypeKeys "<MOD1 X>"
'/// No object exists in dokument right now! ///'
'/// Format -> Text... ///'
FormatTextDraw
Kontext
'/// select tabpage 'Text' ///'
Active.SetPage TabText
Kontext "TabText"
'/// check checkbox 'Adjust to contour' ///'
Konturfluss.Check
'/// now every other control on the dialog has to get disabled ///'
if ((AmRahmenAnpassen.IsEnabled=False) And (Links.IsEnabled=False) And (Rechts.IsEnabled=False) And (Oben.IsEnabled=False) And (Unten.IsEnabled =False)) Then
PrintLog " - Adjust to contour is working"
else
WarnLog " - contourflow aktivated doesn't work it's supposed to"
end if
'/// leave dialog with OK ///'
TabText.OK
'/// create a textbox with text ///'
Call hTextrahmenErstellen ("blablablablablablablablablablablabla",20,20,60,60)
WaitSlot (5000)
'/// Format -> Text... ///'
FormatTextDraw
Kontext
'/// select tabpage 'Text Animation' ///'
Active.SetPage TabLauftext
Kontext "TabLauftext"
@@ -144,6 +184,7 @@ testcase tiFormatText
Effekt.Select n
printlog "" + n + ": '" + Effekt.getSelText + "' -------------------------------"
if (n > 2) then
'/// test all directions ///'
for i = 1 to 4
printlog "" + i
select case i
@@ -156,6 +197,7 @@ testcase tiFormatText
next i
end if
if ((n > 1) AND (n < 5)) then
'/// test all Start/End Text visibility ///'
for i = 1 to 4
printlog "" + i
select case i
@@ -168,6 +210,7 @@ testcase tiFormatText
next i
end if
if ((n > 1) AND (n < 5)) then
'/// test all Animation cycles ///'
for i = 1 to 3
printlog "" + i
select case i
@@ -183,6 +226,7 @@ testcase tiFormatText
next i
end if
if (n > 2) then
'/// test all Increment ///'
for i = 1 to 4
printlog "" + i
select case i
@@ -195,6 +239,7 @@ testcase tiFormatText
next i
end if
if (n > 1) then
'/// test all Delay ///'
for i = 1 to 3
printlog "" + i
select case i
@@ -205,16 +250,18 @@ testcase tiFormatText
sFormatTextDrawAnimation
next i
end if
next n
TabLauftext.OK
Call hCloseDocument
endcase 'tiFormatText
next n
TabLauftext.OK
Call hCloseDocument
endcase 'tiFormatText
'-------------------------------------------------------------------------------
testcase tdFormatLayer
'/// open application ///'
Call hNewDocument
'/// Edit->Layer->Insert (in DRAW also via Insert->Layer) ///'
InsertLayer
Kontext "EbeneEinfuegenDlg"
EbenenName.SetText " Test 4"
@@ -222,6 +269,7 @@ testcase tdFormatLayer
LayerDescription.SetText " This is the Description of the Layer."
EbeneEinfuegenDlg.OK
'/// Edit->Layer->Modify (in DRAW also via Format->Layer)///'
FormatLayer
Kontext "EbeneAendernDlg"
if EbenenName.GetText = " Test 4" Then
@@ -239,6 +287,7 @@ testcase tdFormatLayer
Gesperrt.Check
EbeneAendernDlg.OK
'/// Edit->Layer->Modify (in DRAW also via Format->Layer)///'
FormatLayer
Kontext "EbeneAendernDlg"
if EbenenName.GetText <> "Layer 5" Then
@@ -262,9 +311,10 @@ testcase tdFormatLayer
end if
EbeneAendernDlg.OK
'/// close application ///'
Call hCloseDocument
endcase 'tdFormatLayer
endcase 'tdFormatLayer
'-------------------------------------------------------------------------------
testcase tdFormatConnector
@@ -281,6 +331,7 @@ testcase tdFormatConnector
end if
Call hNewDocument
'/// insert connector ///
kontext "Connectorsbar"
if Connectorsbar.Exists then
Connectorsbar.Close
@@ -299,8 +350,10 @@ testcase tdFormatConnector
gMouseMove ( 10,10,30,30)
Call hCloseDocument
'/// Open file with a finished scenario ///'
hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\FormatConnector." + ExtensionString)
sleep (1)
'/// Check if the document is writable ///'
if fIsDocumentWritable = false then
' Make the document writable and check if it's succesfull
if fMakeDocumentWritable = false then
@@ -310,6 +363,7 @@ testcase tdFormatConnector
end if
gMouseClick 1,1
'/// Press TAB three times to select the connector. ///'
hTypekeys "<TAB>"
hTypekeys "<TAB>"
hTypekeys "<TAB>"
@@ -387,8 +441,8 @@ testcase tdFormatConnector
next i
Verbinder.OK
Call hCloseDocument
endcase 'tdFormatConnector
endcase 'tdFormatConnector
'-------------------------------------------------------------------------------
testcase tiFormatPositionAndSize
@@ -399,7 +453,7 @@ testcase tiFormatPositionAndSize
Dim r 'Variable fuer Radius
Dim w 'Variable fuer Winkel
printlog "New impress doc"
printlog "New impress doc"
Call hNewDocument
WaitSlot (3000)
printlog "RECTANGLE-----1/2"
@@ -471,6 +525,7 @@ testcase tiFormatPositionAndSize
WaitSlot (1000)
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
KeepRatio.UnCheck
printlog "set width to 10"
WaitSlot (1000)
Width.SetText "10"
@@ -479,6 +534,7 @@ testcase tiFormatPositionAndSize
b=Width.GetText
printlog "Width is " & b
SetClipboard Width.GetText
'/// set heigth to 5 ///'
Height.SetText "5"
printlog "put value into variable"
WaitSlot (1000)
@@ -632,8 +688,8 @@ testcase tiFormatPositionAndSize
if Winkel.GetText =w Then PrintLog " Object rotated over 45°"
TabSchraegstellen.OK
Call hCloseDocument
endcase 'tiFormatPositionAndSize
endcase 'tiFormatPositionAndSize
'-------------------------------------------------------------------------------
testcase tiFormat3D_Effekte
@@ -652,7 +708,9 @@ testcase tiFormat3D_Effekte
Call hNewDocument
printlog "new document"
'-----------------------------------RECTANGLE------------------------------------------------------
Call hRechteckErstellen (20,20,60,70) '/// create rectangle ///'
WaitSlot (1000)
ContextPositionAndSize '/// get position and size of rectangle ///'
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -660,11 +718,13 @@ testcase tiFormat3D_Effekte
X=PositionX.GetText
printlog "--- created RECTANGLE; xPosition @ "+ x
TabPositionAndSize.OK
ContextConvertInto3D '/// convert rectangle into 3d ///'
WaitSlot (1000)
Kontext "Drei_D_Effekte"
if Drei_D_Effekte.exists(3) then
qaerrorlog " The 3D-Effects-dialogue was open. Check why."
else
Format3D_Effects '/// open 3d flyer///'
end if
try
if Perspektive.isvisible then
@@ -695,10 +755,14 @@ testcase tiFormat3D_Effekte
hTypeKeys "<DELETE>"
'-----------------------------------RECTANGLE------------------------------------------------------
hRechteckErstellen (20,20,60,70) '/// create new rectangle ///'
printlog "--- created RECTANGLE 2"
Format3D_Effects '/// open 3d flyer ///'
Kontext "Drei_D_Effekte"
Rotationskoerper.Click '/// create lathe object ///'
WaitSlot (1000)
Kontext "DocumentImpress"
ContextPositionAndSize '/// check position and size ///'
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -709,11 +773,14 @@ testcase tiFormat3D_Effekte
end if
TabPositionAndSize.OK
EditSelectAll
hTypeKeys "<DELETE>" '/// delete object ///'
Sleep (1)
'-----------------------------------RECTANGLE------------------------------------------------------
hRechteckErstellen (20,20,60,70) '/// create rectangle ///'
printlog "--- created RECTANGLE 3"
Kontext "Drei_D_Effekte"
WaitSlot (1000)
In_3D_Umwandeln.Click '/// convert to 3d in 3d flyer ///'
WaitSlot (2000)
gMouseClick 40,40
qaerrorlog "#i92910: automation: crash when executing tiFormat3D_Effekte in test g_format"
@@ -735,16 +802,27 @@ testcase tiFormat3D_Effekte
'end select
EditSelectAll
hTypeKeys "<DELETE>" '/// delete object ///'
'-----------------------------------ZYLINDER------------------------------------------------------
Sleep (1)
printlog "--- create CYLINDER"
WL_SD_Zylinder '/// create cylinder ///'
gMousemove 30,30,80,80 '/// This affects the Vertical-value down to 15 ///'
Sleep (1)
hTypeKeys "<ESC>"
Kontext "Drei_D_Effekte"
Geometrie.Click '/// geometry ///'
WaitSlot (1000)
' Endwinkel.More
Vert=Vertikale_Segmente.GetText '/// get value for vertical segments (default) ///'
Hor =Horizontale_Segmente.GetText '/// get value for horizontal segments (default) ///'
Rund=Kantenrundung.GetText '/// get value for edge rounding ///'
Skal=Tiefenskalierung.GetText '/// get value for scale ///'
Tief=Tiefe.GetText '/// get value for depth ///'
Winkel=Endwinkel.GetText '/// get value for angle ///'
'/// Check if every entry has a value <> "" -> an init value is shown. ///'
if Vert ="" then warnlog "Vertical Segment has no init value"
if Hor ="" then warnlog "Horizontal Segment has no init value"
if Rund ="" then warnlog "Rounded edges has no init value"
@@ -752,40 +830,49 @@ testcase tiFormat3D_Effekte
if Tief ="" then warnlog "Depth has no init value"
if Winkel="" then printlog "Rotation angle has no init value"
'/// Go back to the 3d-effects-dialogue and change the value for the cylinder ///'
hTypeKeys "<ESC>" '/// Deselect object and check if 3d controller has default values again ///'
Kontext "Drei_D_Effekte"
'/// Check if value for vertical segments has changed in 3d controller ///'
if Vertikale_Segmente.GetText = Vert Then
Printlog "- Vertical segment value read from object's properties in the 3d flyer"
else
Warnlog "- 3D flyer could not read vertical segment information from object. It is = '"+ Vertikale_Segmente.GetText + "' but should be = '" + Vert + "'"
end if
if Horizontale_Segmente.GetText = Hor Then '/// check if value for horizontal segments has changed ///'
Printlog "- Horizontal segment value read from object's properties in the 3d flyer"
else
Warnlog "- 3D flyer not be able to read horizonal segment information from object. It is = '"+ Horizontale_Segmente.GetText + "' but should be = '" + Hor + "'"
end if
if Kantenrundung.GetText = Rund Then '/// check if value for edge rounding has changed ///'
Printlog "- Rounded edges works"
else
Warnlog "- Rounded edges value could not be read by the 3d flyer It is = '" + Kantenrundung.GetText + "' but should be = '" + rund + "'"
end if
if Tiefenskalierung.GetText = Skal Then '/// check value for scale ///'
Printlog "- Scaled depth works"
else
Warnlog "- Scale depth value could not be read by the 3d flyer It is = '" + Tiefenskalierung.GetText + "' but should be = '" + skal + "'"
end if
if Tiefe.GetText = Tief Then '/// check value for depth ///'
Printlog "- Depth value could be read by the 3d flyer"
else
Warnlog "- Depth value of object could not be read by the flyer It is = '"+ Tiefe.GetText + "' but should be = '" + tief + "'"
end if
if Endwinkel.GetText = Winkel Then '/// check value for angle ///'
Printlog "- Angle value could be read by the 3d flyer"
else
Warnlog "- Angle value is not correct"
end if
hTypeKeys "<ESC>" '/// deselect object and check if 3d controller has default values again ///'
Kontext "Drei_D_Effekte"
Sleep (2)
Printlog "- check if 3D flyer goes back to default values if object is deselected"
@@ -799,12 +886,15 @@ testcase tiFormat3D_Effekte
hTypeKeys "<TAB>"
Kontext "Drei_D_Effekte"
Sleep (2)
Horizontale_Segmente.SetText "32" '/// change horizontal and vertical segments ///'
Vertikale_Segmente.SetText "32"
Kantenrundung.SetText "100"
Endwinkel.Settext "300"
Tiefenskalierung.SetText "500"
Tiefe.SetText "100"
Zuweisen.Click '/// assign changes ///'
WaitSlot (1000) '/// check value changes ///'
if Vertikale_Segmente.GetText = Vert Then Warnlog "- Default value is wrong"
if Horizontale_Segmente.GetText = Hor Then Warnlog "- Default value is wrong"
if Kantenrundung.GetText = Rund Then Warnlog "- Default value is wrong"
@@ -812,13 +902,16 @@ testcase tiFormat3D_Effekte
if Endwinkel.GetText = Winkel Then Warnlog "- Default value is wrong"
if Tiefe.GetText=Tief Then Warnlog "- Default value is wrong"
EditSelectAll
hTypeKeys "<DELETE>" '/// delete cylinder ///'
'-----------------------------------ZYLINDER------------------------------------------------------
WL_SD_Zylinder '/// create new cylinder ///'
gMouseMove (20,20,60,60)
WaitSlot (3000)
Kontext "Drei_D_Effekte"
Printlog "- Change basic geometric parameters for the object"
Printlog "Segments : Horizontal: 8; Vertical: 8; Rounded edges: 50 %"
Horizontale_Segmente.SetText "8" '/// changing values for cylinder ///'
Vertikale_Segmente.SetText "8"
Kantenrundung.SetText "50 %"
Sleep (1)
@@ -826,23 +919,35 @@ testcase tiFormat3D_Effekte
WaitSlot (2000)
gMouseClick 90,90
Sleep (2)
EditSelectAll '/// select object ///'
WaitSlot (1000)
Kontext "Drei_D_Effekte" '/// control if changes are done ///'
if Horizontale_Segmente.GetText <> "8" Then Warnlog "- Horizontal segment count is not correct "+Horizontale_Segmente.GetText
if Vertikale_Segmente.GetText <> "8" Then Warnlog "- Vertical segment count is not correct "+Vertikale_Segmente.GetText
if Kantenrundung.GetText <> "50 %" Then Warnlog "- Value for rounded edges is not correct "+Kantenrundung.GetText
Darstellung.Click
Zaehler=Modus.GetItemCount '/// get number of pssibole render methods ///'
for i =1 to Zaehler
Modus.Select i
Zuweisen.Click '/// assign every render method ///'
gMouseClick 90,90
Sleep (1)
EditSelectAll '/// select object ///'
Sleep (1)
Kontext "Drei_D_Effekte"
if Modus.GetSelIndex <> i Then Warnlog "- Value for render modus did not change" '/// check if render method has changed ///'
next i
Printlog "- Check 3d shadow and surface angle"
Drei_DSchatten.Click '/// check 3d shadow ///'
Papierneigung.SetText "90 degree(s)"
vert = Papierneigung.getText
Zuweisen.Click '/// assign shadow ///'
gMouseClick 90,90 '/// deselect object ///'
WaitSlot (1000)
EditSelectAll '/// select object ///'
Kontext "Drei_D_Effekte"
if Papierneigung.GetText <> vert Then Warnlog "- Value for surface angle is not correct" '/// check value changes ///'
Entfernung.SetText "10" '/// set distance to 10 ///'
Sleep (1)
hor = Entfernung.getText
Sleep (1)
@@ -862,7 +967,9 @@ testcase tiFormat3D_Effekte
WaitSlot (1000)
Kontext "Drei_D_Effekte"
Brennweite.SetText "50" '/// set focval length to 50 ///'
Zuweisen.Click
ContextPositionAndSize '/// check change in position of the object ///'
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
@@ -896,10 +1003,11 @@ testcase tiFormat3D_Effekte
printlog "close document"
Drei_D_Effekte.Close
Call hCloseDocument
endcase 'tiFormat3D_Effekte
endcase 'tiFormat3D_Effekte
'------------------------------------------------------------------
testcase tdFormatTemplates
qaerrorlog "Not yet ready."
goto endsub
@@ -911,8 +1019,10 @@ testcase tdFormatTemplates
dim bDouble as boolean
dim sTemp(2) as string
Call hNewDocument '/// new impress document ///'
WaitSlot (5000)
FormatStylesCatalog '/// format-Style catalog///'
iWaitIndex = 0
do while Vorlagenkatalog.NotExists AND iWaitIndex < 10
sleep (1)
@@ -920,15 +1030,18 @@ testcase tdFormatTemplates
loop
Kontext "Vorlagenkatalog"
Vorlagen.GetItemCount '/// get item count for templates ///'
Vorlagen.Select 2 '/// select template 2 ///'
if Bereich.GetItemCount = Vorlagen.GetItemCount Then '/// check if area changes when selecting a template ///'
PrintLog " - Area did changed"
else
else
WarnLog " Number of entrees should be 2, but it is " + Bereich.GetItemCount
end if
end if
Zaehler = Ansicht.GetItemCount 'Vorlagenliste.GetItemCount
Zaehler = Ansicht.GetItemCount 'Vorlagenliste.GetItemCount
for i = 1 to Zaehler
for i = 1 to Zaehler
Ansicht.TypeKeys "<DOWN>" ,i
SetClipboard Ansicht.GetSelText
WaitSlot (2000)
@@ -949,9 +1062,11 @@ for i = 1 to Zaehler
Vorlagen.Select 2
WaitSlot (2000)
Vorlagen.Select 1 '/// select first template ///'
if Neu.IsEnabled =False Then WarnLog " Button must be choosable, but is not"
Ansicht.Select 1
WaitSlot (1000)
Neu.Click '/// create new template ///'
Kontext
Active.SetPage TabVerwalten
Kontext "TabVerwalten"
@@ -1010,8 +1125,10 @@ for i = 1 to Zaehler
wEnd
end if
if (i <= Zaehler) then printlog " found created entry for deleting it :-)"
' Ansicht.TypeKeys "<DOWN>" ,( i + 1 ) '/// control if template list has created template included ///'
WaitSlot (2000)
try
Loeschen.Click '/// delete template ///'
WaitSlot (1000)
Kontext "Active"
if active.exists then
@@ -1031,6 +1148,7 @@ for i = 1 to Zaehler
UseBindings
Ansicht.Select 1
WaitSlot (1000)
Aendern.Click '/// modify template ///'
WaitSlot (2000)
Kontext
Active.SetPage TabSchatten
@@ -1040,6 +1158,7 @@ for i = 1 to Zaehler
WaitSlot (2000)
Kontext "Vorlagenkatalog"
Verwalten.Click '/// organize templates ///'
WaitSlot (2000)
Kontext "DVVerwalten"
DVVerwalten.OK
@@ -1050,17 +1169,23 @@ for i = 1 to Zaehler
catch
Warnlog " - Style Catalog can't close unless the Template Management-dialog is closed"
endcatch
PrintLog " FormatStylesCatalog finished" '/// close template catalog ///'
WaitSlot (2000)
FormatModifyLayout '/// format modify layout ///'
WaitSlot (2000)
Kontext "Seitenvorlage"
if HintergrundseiteAustauschen.IsChecked=True Then HintergrundseiteAustauschen.UnCheck '/// uncheck switch background page ///'
Laden.Click '/// load ///'
WaitSlot (2000)
Kontext "Neu"
Neu.Cancel
Kontext "Seitenvorlage" '/// choose a page layout ///'
'Waehlen.Click
Seitenvorlage.OK '/// close dialog ///'
Call hCloseDocument '/// close document ///'
endcase 'tdFormatTemplates
'-------------------------------------------------------------------------------
testcase tiFormatAufzaehlungszeichen

View File

@@ -42,22 +42,30 @@
testcase tiGruppierung
Dim PosX 'Variable fuer PositionX
Call hNewDocument '/// new document ///'
sleep 3
Kontext "DocumentImpress"
sleep 2
hRechteckErstellen (20,20,40,40) '/// create rectangle ///'
sleep 1
hRechteckErstellen (60,60,70,10) '/// create 2nd rectangle ///'
sleep 1
hRechteckErstellen (50,90,70,40) '/// create 3rd rectangle ///'
sleep 1
Printlog "- Created 3 rectangles for group testing"
gMouseClick (50,50) '/// Put the mouse-marker in the middle of the screen ///'
EditSelectAll '/// select all rectangles ///'
if (gApplication = "DRAW") then
hOpenContextMenu
sleep(2)
hMenuSelectNr(12) ' Select "Group"
sleep(2)
else
FormatGroupDraw '/// open context menue and group rectangles ///'
endif
sleep 1
Printlog "- Get position and dimensions of elements"
ContextPositionAndSize '/// get dimensions of group ///'
sleep 1
Kontext
Active.SetPage TabPositionAndSize
@@ -69,8 +77,10 @@ testcase tiGruppierung
Kontext "DocumentImpress"
gMouseClick 35,35
sleep 1
hTypeKeys "<F3>" '/// entering group using key "F3" ///'
sleep 3
try
EditCut '/// cut rectangle out of document ///'
sleep 1
Warnlog "- Entering the group, no object within the group should have been selected"
catch
@@ -80,8 +90,10 @@ testcase tiGruppierung
gMouseMove (30,30,60,60)
sleep 1
Printlog "- Exit group"
' sleep 1
' hMenuSelectNr (13)
' DocumentImpress.OpenContextMenu '/// leave group, compare dimensions ///'
' sleep 1
' hMenuSelectNr (13)
hTypeKeys "<mod1 F3>" '/// exit group using key "strg F3" ///'
' would be better to call the slot TBO!
ContextPositionAndSize
sleep 1
@@ -96,4 +108,5 @@ testcase tiGruppierung
Printlog "- Moving within the group works"
TabPositionAndSize.OK
end if
Call hCloseDocument '/// close document ///'
endcase

View File

@@ -41,8 +41,11 @@
'\*************************************************************************************
testcase tEditImageMap
Call hNewDocument '/// new document ///'
EditImageMap '/// edit image map ///'
Kontext "ImageMapEditor"
sleep 1
if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
printlog "ImageMap editor exists"
DialogTest ( ImageMapEditor )
try
@@ -52,7 +55,7 @@ testcase tEditImageMap
EditImageMap
Printlog "ImageMap closed using the edit-menu entry"
endcatch
else
else
sleep 2
DialogTest ( ImageMapEditor )
try
@@ -62,14 +65,17 @@ else
EditImageMap
Printlog "ImageMap closed using the edit-menu entry"
endcatch
end if
endcase
end if
Call hCloseDocument '/// close document ///'
endcase 'tEditImageMap
'------------------------------------------------------------------------------------------------------------------------------------
testcase tEditImageMapProperties
qaerrorlog "test not yet ready."
goto endsub
Call hNewDocument '/// new document ///'
InsertGraphicsFromFile '/// Insert a graphic and select it ///'
sleep (1)
Kontext "GrafikEinfuegenDlg"
sleep (2)
@@ -77,64 +83,74 @@ testcase tEditImageMapProperties
sleep (2)
Oeffnen.Click
sleep (2)
EditImageMap '/// Open the image map dialog ///'
Kontext "ImageMapEditor"
sleep (1)
if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
printlog "ImageMap editor exists"
else
else
warnlog "Something is wrong, the Imagemap didn't show up."
end if
end if
Dokument.MouseDown 50,50
Dokument.MouseMove 50,50,10,10
Dokument.MouseUp 10,10
Ellipse.Click '/// Insert an 'image map' object ///'
Dokument.MouseDown 50,50
Dokument.MouseMove 50,50,10,10
Dokument.MouseUp 10,10
kontext "ImageMapHyperlink"
sleep (1)
if ImageMapHyperlink.Exists (2) then
Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///'
kontext "ImageMapHyperlink"
sleep (1)
if ImageMapHyperlink.Exists (2) then
printlog "ImageMapHyperlink (properties) editor exists"
else
else
warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up."
end if
end if
Frame.SetText "http://www.framed.com"
Objectname.SetText "This is a strange name: Huckillerry Bohaahw"
Alternativetext.SetText "Alternative, the only way to fly..."
Description.SetText "Just a Foney-text... or whatever it's called."
kontext "ImageMapEditor"
Zuweisen.Click
sleep (1)
ImageMapEditor.Close
URL.SetText "http://www.cnn.com" '/// Write some text in each field ///'
Frame.SetText "http://www.framed.com"
Objectname.SetText "This is a strange name: Huckillerry Bohaahw"
Alternativetext.SetText "Alternative, the only way to fly..."
Description.SetText "Just a Foney-text... or whatever it's called."
ImageMapHyperlink.Ok '/// Close the Properties-Dialogue with "Ok" ///'
kontext "ImageMapEditor"
Zuweisen.Click
sleep (1)
ImageMapEditor.Close
if gApplication = "DRAW" then
if gApplication = "DRAW" then
kontext "DocumentDraw"
else
else
kontext "DocumentImpress"
end if
end if
Kontext "ImageMapEditor"
sleep (1)
if ImageMapEditor.Exists (2) then
EditImageMap '/// Check if what we wrote in the Properites-Dialogue still is visible."
Kontext "ImageMapEditor"
sleep (1)
if ImageMapEditor.Exists (2) then
printlog "ImageMap editor exists"
else
else
warnlog "Something is wrong, the ImageMap Editor didn't show up."
end if
end if
Dokument.TypeKeys "<TAB>"
sleep (1)
Dokument.TypeKeys "<TAB>"
sleep (1)
kontext "ImageMapHyperlink"
sleep (1)
if ImageMapHyperlink.Exists (2) then
Eigenschaften.Click '/// Click on the properties icon to open up the properties for the Object ///'
kontext "ImageMapHyperlink"
sleep (1)
if ImageMapHyperlink.Exists (2) then
printlog "ImageMapHyperlink (properties) editor exists"
else
else
warnlog "Something is wrong, the ImageMapHyperlink (properties) didn't show up."
end if
end if
if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText
' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText
'/// Check if the entries we set before has remained the same, with one exception: cnn.com should now have a slash after it. ///'
if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText
' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText
if Objectname.GetText <> "This is a strange name: Huckillerry Bohaahw" then warnlog "Objectname. should have been: This is a strange name: Huckillerry Bohaahw. But was " + Objectname.GetText
if Alternativetext.GetText <> "Alternative, the only way to fly..." then warnlog "Alternativetext should have been: . But was " + Alternativetext.GetText
if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText
ImageMapHyperlink.Ok '/// Close the Properties-Dialogue ///'
sleep (1)
kontext "ImageMapEditor"
@@ -143,6 +159,7 @@ if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http
ImageMapEditor.Close
sleep (1)
endcase 'tEditImageMapProperties
Call hCloseDocument '/// close document ///'
endcase 'tEditImageMapProperties
'------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -39,8 +39,8 @@
' #1 tiFormatLine
' #1 tLineConnect
'\*************************************************************************************
testcase tiFormatLine
Dim ZaehlerStil
Dim ZaehlerFarbe
Dim ZaehlerTransp
@@ -50,62 +50,81 @@ testcase tiFormatLine
Dim l
Dim ZaehlerStilLinks
Call hNewDocument '/// New impress document
sleep 3
Call hRechteckErstellen (10,10,60,60) '/// create rectangle
sleep 2
FormatLine '/// open Format line dialog
Kontext
Active.SetPage TabLinie '///Open TabLine Tabpage
Kontext "TabLinie"
sleep 2
Stil.GetItemCount '/// Get item count for style ///'
Farbe.GetItemCount '/// Get item count for color ///'
Breite.More 1 '/// change value for ///'
ZaehlerStil = Stil.GetItemCount
ZaehlerFarbe = Farbe.GetItemCount
for i=1 to ZaehlerStil '/// Apply every style to the rectangle ///'
wait 10
Stil.Select i
wait 10
TabLinie.OK '/// Closing dialog with ok
' Kontext "DocumentImpress"
FormatLine '///Open TabLine Tabpage
Kontext
Active.SetPage TabLinie
Kontext "TabLinie"
next i
next i
PrintLog "-- " + Farbe.GetSelText
wait 10
Farbe.Select j
wait 10
TabLinie.OK
' Kontext "DocumentImpress"
FormatLine
Kontext
Active.SetPage TabLinie
Kontext "TabLinie"
next j
Breite.Less 2
for k=1 to 6
next k
TabLinie.OK
'---------------------------------------
sleep 2
sleep 2
sleep 2
FormatLine
for j=1 to ZaehlerFarbe '/// Apply every color to the rectangle///'
PrintLog "-- " + Farbe.GetSelText
wait 10
Farbe.Select j
wait 10
TabLinie.OK
' Kontext "DocumentImpress"
FormatLine
Kontext
Active.SetPage TabLinie
Kontext "TabLinie"
next j
Breite.More 3 '/// change Breite ///'
Breite.Less 2
for k=1 to 6
Transparenz.More 1 '/// change tranparence///'
next k
TabLinie.OK
'---------------------------------------
sleep 2
EditSelectAll '/// Select all objects in document ///'
sleep 2
hTypeKeys "<DELETE>" '/// Delete objects ///'
sleep 2
FormatLine
Kontext
Kontext "TabLinie"
StilLinks.GetItemCount
ZaehlerStilLinks=StilLinks.GetItemCount
wait 10
wait 10
StilLinks.Select l
if StilLinks.GetSelText<>StilRechts.GetSelText Then
else
PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText
end if
EndenSynchronisieren.UnCheck
next l
ZentriertLinks.Check
if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work"
i = CornerStyle.GetItemCount
if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i
for i = 1 to 4
Kontext
Active.SetPage TabLinie '/// TabLine ///'
Kontext "TabLinie"
StilLinks.GetItemCount
ZaehlerStilLinks=StilLinks.GetItemCount
for l=1 to ZaehlerStilLinks '/// Apply all line end styles///'
wait 10
if EndenSynchronisieren.IsChecked=False Then EndenSynchronisieren.Check '/// check synchronize ///'
wait 10
StilLinks.Select l
if StilLinks.GetSelText<>StilRechts.GetSelText Then
WarnLog " Ends not synchronized. " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText '/// check if style is automatically applied for both ends ///'
else
PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText
end if
EndenSynchronisieren.UnCheck
next l
ZentriertLinks.Check
if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work"
i = CornerStyle.GetItemCount
if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i
for i = 1 to 4
CornerStyle.Select i
if CornerStyle.GetSelIndex <> i then warnlog "Corner Styles was: " + CornerStyle.GetSelIndex + ", should have been " + i
Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText
@@ -117,12 +136,15 @@ for i = 1 to 4
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
Hinzufuegen.Click '/// Add new line style ///'
Kontext "NameDlg"
Eingabefeld.SetText "Testlinie2" '/// insert name of style (Testlinie2) ///'
NameDlg.OK
sleep 1
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
Loeschen.Click '/// delete created style ///'
Kontext "Active"
Active.Yes
Kontext
@@ -135,148 +157,169 @@ for i = 1 to 4
LaengeLinks.More 3
LaengeRechts.More 3
Abstand.SetText "0,1"
if AnLinienbreite.IsChecked = True Then AnLinienbreite.Click '/// all fields changed in TabLinienstile ///'
PrintLog " All controls could be manipulated."
TypLinks.Select 1
TypRechts.Select 1
if LaengeLinks.IsEnabled And LaengeRechts.IsEnabled =True Then '/// check if its possible to apply a length to a point ///'
WarnLog " A point where you can change its length is not a point anymore"
else
end if
sleep 1
try
else
PrintLog " Line style pint tested" '/// All styles for points are changed ///'
end if
sleep 1
try
Linienstil.Select 1
catch
catch
if Linienstil.GetItemCount = 0 then '/// check if style list is filled ///'
Warnlog "- The list for line styles is empty"
Hinzufuegen.Click '/// new style ///'
Kontext "NameDlg"
NameDlg.OK
end if
endcatch
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
Kontext "NameDlg"
NameDlg.OK
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
TabLinienstile.OK
sleep 2
FormatLine
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
try
Aendern.Click
catch
Hinzufuegen.Click
endcatch
Kontext "NameDlg"
NameDlg.Cancel
sleep 2
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
sleep 1
try
Kontext "Active"
Active.Yes
sleep 3
catch
if Linienstile.GetItemCount = 0 Then
end if
endcatch
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
Aendern.Click '/// change style ///'
Kontext "NameDlg"
Eingabefeld.SetText Eingabefeld.GetText + "1" '/// new name for changed style ///'
SetClipboard Eingabefeld.GetText '/// put name into clipboard ///'
NameDlg.OK
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
TabLinienstile.OK
sleep 2
FormatLine
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
try
Aendern.Click
catch
Hinzufuegen.Click
endcatch
Kontext "NameDlg"
if Eingabefeld.GetText <> GetClipboardText Then WarnLog "No changes for Line style" '/// check if changed style is in list ///'
NameDlg.Cancel
sleep 2
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
sleep 1
try
Loeschen.Click '/// delete changed style ///'
Kontext "Active"
Active.Yes
sleep 3
catch
if Linienstile.GetItemCount = 0 Then
Hinzufuegen.Click
Kontext "NameDlg"
sleep 1
Eingabefeld.SetText "Delete"
NameDlg.OK
end if
endcatch
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
sleep 1
TabLinienstile.OK
'--------------------------------------------
sleep 2
sleep 2
FormatLine
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
sleep 2
Kontext "Linienstil"
sleep 1
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
sleep 1
Liste.GetItemCount
Liste.Select 3
Kontext "NameDlg"
NameDlg.OK
end if
endcatch
Kontext
Active.SetPage TabLinienstile
Kontext "TabLinienstile"
sleep 1
TabLinienstile.OK
'--------------------------------------------
sleep 2
Call hRechteckErstellen (40,40,80,50) '/// create rectangle ///'
sleep 2
FormatLine
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
sleep 2
Kontext "Linienstil"
if Linienstil.Exists then Aendern.Click '/// change style ///'
sleep 1
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
sleep 1
Liste.GetItemCount
Liste.Select 3
Hinzufuegen.Click '/// add style ///'
Kontext "NameDlg"
NameDlg.OK
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
Kontext "Active"
Printlog Active.GetText
Active.OK
Kontext "NameDlg"
Eingabefeld.SetText Eingabefeld.GetText + "1"
PrintLog " Name inserted"
NameDlg.OK
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
Aendern.Click '/// change style ///'
Kontext "Active"
Printlog Active.GetText
Active.OK
Kontext "NameDlg"
Eingabefeld.SetText Eingabefeld.GetText + "1"
PrintLog " Name inserted"
NameDlg.OK
Kontext
if active.GetRt=304 then
active.ok
Kontext "NameDlg"
Eingabefeld.SetText Eingabefeld.GetText + "1"
PrintLog " Name inserted"
NameDlg.OK
endif
if active.GetRt=304 then
active.ok
warnlog "still not a valid name :-("
endif
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
Kontext "Active"
Active.Yes
Kontext
if active.GetRt=304 then
active.ok
Kontext "NameDlg"
Eingabefeld.SetText Eingabefeld.GetText + "1"
PrintLog " Name inserted"
NameDlg.OK
endif
if active.GetRt=304 then
active.ok
warnlog "still not a valid name :-("
endif
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
Loeschen.Click '/// delete style ///'
Kontext "Active"
Active.Yes
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
sleep 1
sleep 1
Kontext "SpeichernDlg"
sleep 1
SpeichernDlg.Cancel
Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
sleep 1
Speichern.Click '/// save style ///'
sleep 1
Kontext "SpeichernDlg"
sleep 1
SpeichernDlg.Cancel
Kontext "TabLinienenden"
TabLinienenden.Cancel
sleep 2
Kontext "TabLinienenden"
TabLinienenden.Cancel
sleep 2
'sleep 2
'sleep 2
'///New part for line
'EditSelectAll '/// Select all objects in document ///'
'sleep 2
'hTypeKeys "<DELETE>" '/// Delete objects ///'
'sleep 2
'kontext "Toolbar"
'Kurven.Click
'sleep 1
'if (gApplication = "DRAW") then
' Kontext "DocumentDraw"
' gMouseMove (30,50, 40,60)
' sleep 1
'else
' Kontext "DocumentImpress"
' gMouseMove (30,50, 40,60)
' sleep 1
'endif
'FormatLine
'Kontext
'Active.SetPage TabSchatten
'/// Create line to test shadow tabpage in line dialog
'kontext "Toolbar"
'Kurven.Click
'sleep 1
'if (gApplication = "DRAW") then
' Kontext "DocumentDraw"
' gMouseMove (30,50, 40,60)
' sleep 1
'else
' Kontext "DocumentImpress"
' gMouseMove (30,50, 40,60)
' sleep 1
'endif
'FormatLine
'Kontext
'Active.SetPage TabSchatten
' FormatLine.Cancel
Call hCloseDocument '/// close document ///'
' FormatLine.Cancel
endcase 'tiFormatLine
'-------------------------------------------------------------------------------'
testcase tLineConnect
@@ -293,6 +336,7 @@ testcase tLineConnect
goto Endsub
end if
Call hNewDocument '/// New Impress / Draw document ///'
sleep 3
kontext "GraphicObjectbar"
if GraphicObjectbar.Exists then
@@ -313,6 +357,7 @@ testcase tLineConnect
end if
endif
'/// Create 2 lines ///'
kontext "Toolbar"
Kurven.Click
sleep 1
@@ -336,6 +381,7 @@ testcase tLineConnect
printlog "'" + (gApplication) +"'"
'/// Check the amount of objects ///'
gMouseClick (10, 10)
sleep 1
EditSelectAll
@@ -359,10 +405,12 @@ testcase tLineConnect
end if
end if
'/// Connect the two objects selected ///'
hOpenContextMenu
sleep 1
hMenuSelectNr(13)
sleep 1
'/// Check the amount of objects ///'
gMouseClick (10, 10)
sleep 1
EditSelectAll
@@ -376,6 +424,7 @@ testcase tLineConnect
value2 = left(StatusBarText,1)
printlog "StatusBarText was: " + StatusBarText
'/// if same as the first value = wrong ///'
if value1 = value2 then
warnlog "Expected to find one object, but found " + value2 + " instead."
endif
@@ -383,18 +432,22 @@ testcase tLineConnect
warnlog "Connect was not successful. We should have one object, but have " + value2 + " instead."
endif
'/// unmark the objects, thereafter mark them again ///'
gMouseClick (10, 10)
sleep 1
EditSelectAll
sleep 1
'/// Break them from eachother ///'
hOpenContextMenu
sleep 1
hMenuSelectNr(11)
sleep 1
'/// unmark the objects, thereafter mark them again ///'
gMouseClick (10, 10)
sleep 1
EditSelectAll
sleep 1
'/// Check the amount of objects ///'
if (gApplication = "IMPRESS") then
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
else
@@ -405,16 +458,19 @@ testcase tLineConnect
printlog "StatusBarText was: " + StatusBarText
'/// if the same as any of the ones before: Wrong ///'
if (value3 = value1 OR value3 = value2) then
warnlog "Expected to find three objects, but found " + value3 + " instead."
endif
'/// if 3 objects, then everything is ok ///'
if value3 = 3 then
printlog "Found three objects. Means the test was successful."
else
warnlog "Wrong value, expected three objects, but found " + value3 + "."
endif
'/// Go through the different Corner-styles ///'
hOpenContextMenu
hMenuSelectNr(2) 'Choose "Line"
@@ -440,6 +496,7 @@ testcase tLineConnect
CornerStyle.Select cfirst
TabLinie.Ok
'/// And a nice finish to make life a bit happier for anyone who looks at the test ///'
kontext "Toolbar"
Ellipsen.Click
if (gApplication = "DRAW") then
@@ -468,7 +525,9 @@ testcase tLineConnect
gMouseMove (48,43, 53,50)
endif
gMouseClick (10, 10)
'/// Close the document ///'
hCloseDocument
endcase 'tiLineConnect
'/// Endcase ///'
endcase 'tiLineConnect
'-------------------------------------------------------------------------------'

View File

@@ -50,7 +50,6 @@
' #1 tSaveLoadLayoutChart
' #1 tSaveLoadLayoutSpreadsheet
'\*************************************************************************************
testcase tFileOpenSaveEtc
Dim Dokument$
Dim Dokument2$
@@ -64,23 +63,31 @@ testcase tFileOpenSaveEtc
ExtensionString = "odg"
end if
'/// delete previous created documents: 'user\\work\\test1*.od?' ///'
if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp")
if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg")
'/// open application ///'
hNewDocument
gMouseclick 90,90
'/// create a textframe with content ///'
Call hTextrahmenErstellen ( "This is a test",20,20,40,30 )
'/// save file as 'test1' ///'
hFileSaveAsKill (Dokument$ + "." + ExtensionString)
Sleep 10
'/// close Document ///'
hCloseDocument
printlog "- Document Saved and Closed"
'/// load document 'test1' ///'
hFileOpen (Dokument$ + "." + ExtensionString)
Sleep 10
'/// close Document ///'
hCloseDocument
printlog "- document Loaded and closed"
Sleep 10
'/// load document 'test1' ///'
hFileOpen (Dokument$ + "." + ExtensionString)
' check if the document is writable
if fIsDocumentWritable = false then
@@ -92,7 +99,9 @@ testcase tFileOpenSaveEtc
endif
Sleep 10
gMouseclick 90,90
'/// create another textbox with content ///'
Call hTextrahmenerstellen ( "Change",60,60,80,80 )
'/// File->Close needn't work, just say CANCEL to the question about saving changes! ///'
FileClose
Kontext ' message about 'something changed should i [overwrite discard cancel]?'
if Messagebox.exists (5) then
@@ -105,9 +114,11 @@ testcase tFileOpenSaveEtc
printlog "- Last version"
try
FileReload '/// File Reload ///'
catch
kontext "documentimpress"
try
FileReload '/// File Reload ///'
catch
warnlog "Damn reload ?? Why ? BREAKPOINT! File reload doesn't work. Create new object and try again :-("
endcatch
@@ -123,6 +134,7 @@ testcase tFileOpenSaveEtc
if GetClipboardText = "Change" then Warnlog "- Last version not loaded. Changes in the document still in."
printlog "- Change document, save it under different name"
Kontext "DocumentImpress"
Call hTextrahmenErstellen ("Change2",10,10,50,20 ) '/// new textbox ///'
gMouseclick 90,90
sleep 1
FileSaveAs
@@ -137,6 +149,7 @@ testcase tFileOpenSaveEtc
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
FileClose '/// Close document ///'
sleep 10
Kontext "Messagebox"
if Messagebox.Exists Then
@@ -145,6 +158,7 @@ testcase tFileOpenSaveEtc
end if
sleep 2
printlog "- Loading write protected file"
FileOpen '/// Open write protected file ///'
Kontext "OeffnenDlg"
Dateiname.SetText (Dokument2$ + "." + ExtensionString)
NurLesen.Check
@@ -152,6 +166,7 @@ testcase tFileOpenSaveEtc
Sleep 10
' check if the document is writable
try
Call hTextrahmenErstellen ( "Hello",85,85,95,95 ) '/// attempt to create a textbox ///'
hTypeKeys "<SHIFT LEFT>",5
hTypeKeys "<MOD1 C>"
sleep 1
@@ -160,11 +175,12 @@ testcase tFileOpenSaveEtc
Printlog "- Write protected document could not be edited"
endcatch
sleep 5
endcase
'********************************************************************************************
FileClose '/// Close document ///'
endcase 'tFileOpenSaveEtc
'--------------------------------------------------------
testcase tFileProperties
qaerrorlog "#i88163#, File/properties/user defined fields get mixed up."
goto endsub
Call hNewDocument
@@ -322,10 +338,12 @@ testcase tFileOpenImport
endcase
'********************************************************************************************
testcase tTestDXF255CharBug
dim q as integer
'/// tries to load a DXF-document which has a string-leght of 255 characters. ///'
dim q as integer
call hNewDocument
InsertGraphicsFromFile '/// insert graphic ///'
sleep 1
kontext "Active"
sleep 1
@@ -335,6 +353,7 @@ testcase tTestDXF255CharBug
sleep 1
Kontext "GrafikEinfuegenDlg"
sleep 2
'/// Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) ///'
Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
Oeffnen.Click
Sleep 2
@@ -365,11 +384,11 @@ testcase tTestDXF255CharBug
warnlog "DXF-Document could not be loaded :-("
endcatch
Call hCloseDocument
endcase
endcase 'tTestDXF255CharBug
'********************************************************************************************
testcase tDeletedTemplate
dim i as integer
dim Dokument1$
dim Dokument2$
@@ -387,25 +406,35 @@ testcase tDeletedTemplate
'/// delete previous created documents: 'user\\work\\test*.odp' ///'
if Dir (Dokument1$) <> "" then kill Dokument1$
if Dir (Dokument2$) <> "" then kill Dokument2$
'/// open application ///'
hNewDocument
gMouseclick 90,90
'/// create a textframe with content ///'
Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 )
'/// save file as 'test1.odp' ///'
hFileSaveAsKill (Dokument1$)
Sleep 10
'/// close Document ///'
hCloseDocument
printlog "- Document 'test1.odp' Saved and Closed"
'/// open application again ///'
hNewDocument
gMouseclick 90,90
'/// create another textframe with content ///'
Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 )
'/// save file as 'test2.odp' ///'
hFileSaveAsKill (Dokument2$)
Sleep 10
'/// close Document ///'
hCloseDocument
printlog "- Document 'test2.odp' Saved and Closed"
'/// Delete the first file ///'
try
kill Dokument1$
Printlog " Correctly deleted the file: " + Dokument1$
@@ -413,6 +442,8 @@ testcase tDeletedTemplate
warnlog "Could not delete the file: " + Dokument1$
endcatch
'/// File => New => Presentation ///'
FileAutopilotPresentation '/// new document-autopilot ///'
Kontext "AutopilotPraesentation1"
sleep 5
Existingpresentation.Check
@@ -453,6 +484,7 @@ testcase tDeletedTemplate
if found = true then warnlog " An error-message showed up. Eventually a result of '138498'"
AutopilotPraesentation1.Cancel
Sleep 2
'/// Delete the second file ///'
try
kill Dokument2$
Printlog " Correctly deleted the file: " + Dokument2$
@@ -460,8 +492,7 @@ testcase tDeletedTemplate
warnlog "Could not delete the file: " + Dokument2$
endcatch
endcase
endcase 'tDeletedTemplate
'****************************************************************************************************
testcase tSaveLoadLayoutEmpty

View File

@@ -53,8 +53,10 @@ testcase g_mediaplayer
goto endsub
endif
Datei$ = ConvertPath (convertPath (gTesttoolPath + "graphics\required\input\29secsound.wav"))
'/// Open New Document ///'
Call hNewDocument
sleep 2
'/// Check if the Media Player already exists - if so - close it ///'
kontext "mPlayer"
if mPlayer.exists then ' Close the MediaPlayer
warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA."
@@ -62,13 +64,16 @@ testcase g_mediaplayer
printlog "Closed the Media Player"
endif
'/// Tools - MediaPlayer ///'
ToolsMediaPlayer
sleep 2
'/// Open file ///' 'a bigger / longer one
kontext "mPlayer"
if mPlayer.exists then
printlog "The MediaPlayer was open."
else
warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test."
Call hCloseDocument '/// Close document ///'
goto endsub
endif
Mopen.Click
@@ -76,6 +81,9 @@ testcase g_mediaplayer
Pfad.SetText Datei$
Oeffnen.Click
'/// This test wont work correctly under Solaris and Linux, ///'
'/// unless some optional Media-libraries are installed. ///'
'/// Therefore we warn the tester about it if we cannot open the file. ///'
iWaitIndex = 0
do while OeffnenDlg.Exists AND iWaitIndex < 10
@@ -88,6 +96,7 @@ testcase g_mediaplayer
Active.OK
kontext "Mplayer"
ToolsMediaPlayer
Call hCloseDocument '/// close document ///'
goto endsub
else
kontext "Mplayer"
@@ -96,6 +105,7 @@ testcase g_mediaplayer
timevalue1 = mTimeedit.GetText
'/// Stop ///'
sleep 2
mStop.Click
printlog "Just pressed stop."
@@ -111,6 +121,7 @@ testcase g_mediaplayer
if Mplayer.Exists(3) then
ToolsMediaPlayer
endif
Call hCloseDocument '/// close document ///'
goto endsub
else
warnlog "The sound doesnt seem to be played at all, but I will continue the test. The platform was: " + gtSYSName
@@ -122,6 +133,7 @@ testcase g_mediaplayer
warnlog "Very strange. The first value was: " + timevalue1 + ". Second: " + timevalue2 + ". Third: " + timevalue3
endif
endif
'/// Play ///'
' Save value
timevalue1 = mTimeedit.GetText
' Press 'Play'
@@ -135,6 +147,7 @@ testcase g_mediaplayer
Printlog "the play-button seemed to work. Good."
endif
'/// Pause ///'
mPlay.Click
sleep 10
mPause.Click
@@ -149,6 +162,7 @@ testcase g_mediaplayer
Printlog "the pause-button seemed to work. Good."
endif
'/// Time ///'
mStop.Click 'to get to the beginning.
sleep 1 'And make sure it's really the beginning.
timevalue1 = mTimeedit.GetText
@@ -186,31 +200,39 @@ testcase g_mediaplayer
'-Repeat
'Plays the file repeatedly.
'/// Loop ///'
mLoop.Click
'/// Volume ///'
'mVolume. 'Click
'-Volume slider
'Adjusts the volume.
'/// Mute ///'
mMute.Click
sleep 1
mMute.Click
'-Mute
'Turns sound off and on.
'/// Time-slider ///'
' mTimeslider. 'Click
'-Position slider
'Moves to a different position in the file.
'/// Scroll-whatever ///'
'mZoomlistbox.
'-Zoom
'Adjusts the size of the movie playback.
'/// Apply ///'
mInsert.Click
sleep 10
'/// Close the MediaPlayer via Tools - MediaPlayer ///'
ToolsMediaPlayer
'/// Check if there is an object available. ///'
if (gApplication = "IMPRESS") then
kontext "DocumentImpress"
else
@@ -226,11 +248,14 @@ testcase g_mediaplayer
Kontext "TabPositionAndSize"
if Width.Exists then
Printlog "Position and Size came up, object inserted correctly."
'/// Close dialog TabPositionAndSize with 'OK' ///'
TabPositionAndSize.OK
else
Warnlog "Position And Size didn't come up, was there no sound-object inserted?"
endif
sleep 2
'/// close document ///'
Call hCloseDocument '/// close document ///'
else
qaerrorLog "#74350# - Different strings in g_mediaplayer under Italian."
endif

View File

@@ -44,10 +44,12 @@
testcase tOLE_Copy
qaerrorlog "not running due to reconstruction"
goto endsub
printlog "Test to see if three different OLEs can be copied and identified correctly."
dim writerfilename1 as string
writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg")
printlog "Open draw-file" & writerfilename1
FileOpen
Kontext "OeffnenDlg"
sleep 1
@@ -55,6 +57,7 @@ testcase tOLE_Copy
Oeffnen.Click
Sleep 3
printlog "When messagebox about Update all links shows up - press yes."
kontext "Messagebox"
if Messagebox.exists then
Messagebox.Yes
@@ -62,6 +65,7 @@ testcase tOLE_Copy
sleep 3
gApplication = "DRAW"
printlog "Select first object. Use EditCopy to copy it to the clipboard"
sleep 1
kontext "DocumentDraw"
DocumentDraw.mousedown (10,10)
@@ -70,21 +74,25 @@ testcase tOLE_Copy
DocumentDraw.Typekeys "<TAB>"
EditCopy
printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
Call hCloseDocument
gApplication = "IMPRESS"
Call hNewDocument
EditPaste
printlog "Select object and check via the Context-menu what it has been opened as."
sleep 1
Kontext "DocumentImpress"
hTypekeys "<MOD1> A"
hTypekeys "<RETURN>"
hOpenContextMenu
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3
MenuSelect (1) 'Default
@@ -94,11 +102,13 @@ testcase tOLE_Copy
endif
Kontext "DocumentImpress"
printlog "Click outside the OLE to deactivate it. Then close the Document "
DocumentImpress.mousedown (10,10)
DocumentImpress.mouseup (10,10)
sleep 3
Call hCloseDocument
printlog "Open Draw-file "
FileOpen
Kontext "OeffnenDlg"
sleep 1
@@ -106,12 +116,14 @@ testcase tOLE_Copy
Oeffnen.Click
Sleep 3
printlog " When messagebox about Update all links shows up - press yes."
kontext "Messagebox"
if Messagebox.exists then
Messagebox.Yes
endif
sleep 3
printlog "Select second object. Use EditCopy to copy it to the clipboard."
gApplication = "DRAW"
sleep 1
kontext "DocumentDraw"
@@ -121,6 +133,7 @@ testcase tOLE_Copy
DocumentDraw.Typekeys "<TAB><TAB>"
EditCopy
printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
sleep 1
DocumentDraw.mousedown (10,10)
DocumentDraw.mouseup (10,10)
@@ -131,16 +144,19 @@ testcase tOLE_Copy
Call hNewDocument
EditPaste
printlog "Select the object, and check via the Context-menu what it has been opened as."
sleep 1
Kontext "DocumentImpress"
hTypekeys "<MOD1> A"
hTypekeys "<RETURN>"
hOpenContextMenu
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3
MenuSelect (1) 'Default
@@ -155,8 +171,10 @@ testcase tOLE_Copy
DocumentImpress.mouseup (10,10)
sleep 1
printlog "Close document"
Call hCloseDocument
printlog "Open draw-file"
FileOpen
Kontext "OeffnenDlg"
sleep 1
@@ -164,11 +182,13 @@ testcase tOLE_Copy
Oeffnen.Click
Sleep 3
kontext "Messagebox"
printlog "When messagebox about Update all links shows up - press yes."
if Messagebox.exists then
Messagebox.Yes
endif
sleep 3
printlog "Select third object. Use EditCopy to copy it to the clipboard."
gApplication = "DRAW"
sleep 1
kontext "DocumentDraw"
@@ -178,6 +198,7 @@ testcase tOLE_Copy
DocumentDraw.Typekeys "<TAB><TAB><TAB>"
EditCopy
printlog "Close the Document. Open new Impress-Document. Paste the OLE-Object."
sleep 1
DocumentDraw.mousedown (10,10)
DocumentDraw.mouseup (10,10)
@@ -188,15 +209,18 @@ testcase tOLE_Copy
Call hNewDocument
EditPaste
printlog "Select the object, and check via the Context-menu what it has been opened as."
Kontext "DocumentImpress"
hTypekeys "<MOD1> A"
hTypekeys "<RETURN>"
hOpenContextMenu
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3
MenuSelect (1) 'Default
@@ -205,11 +229,11 @@ testcase tOLE_Copy
Printlog "This is a spreadsheet-Document. Good"
endif
printlog "Close Context menu. Then close the Document"
Call hCloseDocument
endcase 'tOLE_Copy
'-----------------------------------------------------------------------------------------------------------'
testcase tOLE_SaveLoad
printlog "Test to see if an OLE can be inserted, saved and loaded correctly."
@@ -303,25 +327,31 @@ testcase tOLE_SaveLoad
'FHA TODO
'testcase tOLE_DragDrop
printlog " Create OLE, drag n drop within the document. "
printlog " If Impress, drag and drop from document to another slide. "
'endcase 'tOLE_DragDrop
endcase ' tOLE_Save
'-------------------------------------------------------------------------------
testcase tiOpenOLECrash
dim sFileodp as string
dim oFile as string
dim i as integer
printlog "Testing for bug nr: i70019"
printlog "Open Application"
Call hNewDocument
sleep 1
printlog "1. Open file: generic_de.ppt"
FileOpen
sleep 1
Kontext "OeffnenDlg"
printlog " Use file: graphics\\optional\\input\\generic_de.ppt "
oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt")
Printlog "file: '" + oFile + "'"
Dateiname.SetText (oFile)
printlog "2. Save this document as an *.odp -file."
Oeffnen.Click
kontext "DocumentImpress"
i = 0
@@ -355,8 +385,10 @@ testcase tiOpenOLECrash
end if
Sleep 3
kontext "DocumentImpress"
printlog "3. Close Impress."
Call hCloseDocument
printlog "4.Reopen the *.odp file again"
FileOpen
Kontext "OeffnenDlg"
Dateiname.SetText (sFileodp + ".odp")
@@ -378,40 +410,45 @@ testcase tiOpenOLECrash
endcatch
loop
if DocumentImpress.StatusIsProgress AND i > 19 then
warnlog " Took over 20 seconds to load the document Document. Stalled?"
warnlog "Took over 20 seconds to load the document Document. Stalled?"
endif
printlog "5. Right-click on the second slide and click on New slide. "
Kontext "Slides"
SlidesControl.TypeKeys "<PAGEDOWN>" 'Goto second slide. (and get the focus right)
SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu (True) 'Open Context-menu
hMenuSelectNr (1) 'New Slide
printlog "6. Change the title-(the text was F<>r den TCM-Test, but this should irrelevant... ;) )."
hTypeKeys "<TAB>" 'To select the title.
hTypeKeys "F<EFBFBD>r den TCM-Test" 'To enter text
hTypeKeys "Fuer den TCM-Test" 'To enter text
printlog " 7. Clicked two times on the Click twice to insert object "
hTypeKeys "<ESCAPE>"
gMouseClick 1,1
hTypeKeys "<TAB><TAB>" '(to select the second object)
hTypeKeys "<RETURN>"
sleep (2)
printlog "8. Choose OpenOffice.org 2.0 Formular"
Kontext "OLEObjektInsert"
Objekttyp.Select (4)
Objekttyp.Select (3)
sleep (2)
PrintLog " Objeckt: " + Objekttyp.GetSelText + " will be inserted."
PrintLog " Object: " + Objekttyp.GetSelText + " will be inserted."
printlog "Leave dialog 'Insert OLE Object' with OK"
OLEObjektInsert.OK
sleep (2)
kontext "CommandsMath"
Commands.TypeKeys "A over B + FACT 6 = x"
'printlog " Leave edit mode by typing key [Escape] "
'Comment: If I do this, the bug wont occur...
'hTypeKeys "<ESCAPE>"
printlog "10. Click on the Save button."
kontext "Standardbar"
Speichern.Click
printlog "11. Click on the X to close the window while the OLE-object still in Edit-mode."
Call hCloseDocument
endcase
'-----------------oooo-----------------oooo-----------------oooo-----------------
endcase 'tiOpenOLECrash

View File

@@ -40,8 +40,8 @@
' #1 tiShaddow
'*
'\*******************************************************************
testcase tiShaddow
dim sFilter as string
dim i as integer
dim t as integer
@@ -60,15 +60,18 @@ testcase tiShaddow
dim linewidth as string
dim cornerstyletype as string
'/// Set the file-extension we'll be using when opening the saved file ///'
if (gApplication = "IMPRESS") then
ExtensionString = "odp"
else
ExtensionString = "odg"
end if
'/// Open application ///'
Call hNewDocument
sleep 1
'/// Import picture ///'
InsertGraphicsFromFile
sleep 3
kontext "Active"
@@ -83,8 +86,10 @@ testcase tiShaddow
Oeffnen.Click
printlog "Inserted file"
sleep 2
'/// Select all ///'
EditSelectAll
sleep 3
'/// Check values and save them ///'
FormatPositionAndSize
kontext
active.SetPage TabPositionAndSize
@@ -92,9 +97,11 @@ testcase tiShaddow
ImageWidth = Width.GetText
ImageHeight = Height.GetText
printlog "Got values from position and size"
'/// Check the "Protect Size"-button. And close dialogue. ///'
ProtectSize.Check
TabPositionAndSize.Ok
'/// Add Shaddow via Toolbar-Button ///'
Kontext "GraphicObjectbar"
if GraphicObjectbar.Exists = FALSE then
ViewToolbarsPicture
@@ -104,7 +111,9 @@ testcase tiShaddow
end if
sleep 1
'/// click button 'Shadow' ///'
Schatten.Click
' '/// Check and save Shaddow-values via context-menu ///'
EditSelectAll
hOpenContextMenu
sleep(2)
@@ -113,8 +122,10 @@ testcase tiShaddow
Call hCloseDocument
Goto Endsub
endif
'/// Select Contextmenu entry "Area" ///'
sleep(2)
kontext "TabArea"
'/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
@@ -125,6 +136,7 @@ testcase tiShaddow
Warnlog "'Use Shadow' doesn't exist or isn't visible."
endif
'/// Change Distance and Transparency-values ///'
Entfernung.More ',2
Transparenz.More ',2
shadowdistancevalue = Entfernung.GetText
@@ -133,9 +145,11 @@ testcase tiShaddow
printlog "Got values from TabArea"
TabSchatten.Ok
'/// Check if it's the same when going over FormatArea ///'
FormatArea
sleep 1
kontext "TabArea"
'/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
@@ -156,6 +170,7 @@ testcase tiShaddow
endif
TabSchatten.Ok
'/// Add Cornerstyle via FormatLine ///'
FormatLine
Kontext
Messagebox.SetPage TabLinie
@@ -171,6 +186,7 @@ testcase tiShaddow
printlog "Cornerstyle is: " + CornerStyle.GetSelText '+ cornerstyletype
TabLinie.ok
'/// Check values via PositionAndSize via the Contextmenu ///'
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
@@ -187,6 +203,7 @@ testcase tiShaddow
if ImageHeight <> Height.GetText then warnlog "Position Y differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
'/// Check Cornerstyle via FormatLine ///'
FormatLine
Kontext
Messagebox.SetPage TabLinie
@@ -197,12 +214,15 @@ testcase tiShaddow
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
'/// Check if the Shaddow-button is activated ///'
Kontext "GraphicObjectbar"
if Schatten.GetState(2) <> 1 then
warnlog "Shaddow-button shouldnt have been checked"
endif
'/// Save the file. Then close the office and reload the file ///'
sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
'/// File-Save As with filter as: "user\temp\shaddow-test" ///'
try
FileSaveAs
Kontext "SpeichernDlg"
@@ -218,10 +238,12 @@ testcase tiShaddow
warnlog "Error when saving file."
endcatch
'/// Close the office-session ///'
FileClose
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
'/// Open the saved file ///'
try
hFileOpen sFileName + "." + ExtensionString
Sleep 3
@@ -230,9 +252,11 @@ testcase tiShaddow
warnlog "Error when opening file."
endcatch
'/// Select all ///'
EditSelectAll
sleep 2
'/// Check if the Shaddow-button still is activated ///'
kontext "GraphicObjectbar"
if schatten.Getstate(2) <> 1 then
warnlog "The Shadow-button should be activated"
@@ -240,6 +264,7 @@ testcase tiShaddow
Printlog "Shaddowbutton activated, good."
endif
'/// Check the attributes for the picture ///'
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
@@ -259,6 +284,7 @@ testcase tiShaddow
FormatArea
sleep 1
kontext "TabArea"
'/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
@@ -272,19 +298,20 @@ testcase tiShaddow
if shadowcolorvalue <> Farbe.GetSelText then warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.gettext
if shadowtransparencyvalue <> Transparenz.GetText then warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
'/// Check Transparency ///'
Kontext
Active.SetPage TabTransparenz
kontext "TabTransparenz"
LineareTransparenz.Check
shadowtransparencyvalue = MFLinTransparenz.GetText
sleep 2
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
TabSchatten.Ok
'/// Check Cornerstyle via FormatLine ///'
FormatLine
Kontext
Messagebox.SetPage TabLinie
@@ -295,6 +322,7 @@ testcase tiShaddow
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
'/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
if (gApplication = "IMPRESS") then
ExtensionString = "ppt"
else
@@ -321,15 +349,19 @@ testcase tiShaddow
printlog "Saved as: " + sFileName
Sleep 3
'/// Close the office and reload the file ///'
FileClose
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
'/// Open the saved file ///'
hFileOpen (sFileName + "." + ExtensionString)
printlog "File opened: " + sFileName + "." + ExtensionString
Sleep 3
'/// Select all ///'
EditSelectAll
'/// Check the attributes for the picture ///'
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
@@ -346,6 +378,7 @@ testcase tiShaddow
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
'/// Check if transparency has disappeared and if the cornerstyle has changed ///'
FormatArea
Kontext
Messagebox.SetPage TabTransparenz
@@ -365,8 +398,8 @@ testcase tiShaddow
end if
endif
if (gApplication = "IMPRESS") then
if LineareTransparenz.Ischecked <> FALSE then
warnlog "Transparency should NOT have been checked!"
if LineareTransparenz.Ischecked =TRUE then
printlog "Transparency contained in newer ppt files, ok.!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
KeineTransparenz.Check
end if
@@ -374,6 +407,7 @@ testcase tiShaddow
TabTransparenz.Cancel
'/// Check Cornerstyle via FormatLine ///'
FormatLine
Kontext
Messagebox.SetPage TabLinie
@@ -384,6 +418,7 @@ testcase tiShaddow
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
'/// Remove the Shaddow, Transparency and Cornerstyle ///'
FormatArea
Kontext
Messagebox.SetPage TabTransparenz
@@ -391,12 +426,14 @@ testcase tiShaddow
KeineTransparenz.Check
sleep 1
kontext "TabArea"
'/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
Anzeigen.UnCheck
TabSchatten.Ok
'/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
if (gApplication = "IMPRESS") then
ExtensionString = "ppt"
else
@@ -422,15 +459,19 @@ testcase tiShaddow
printlog "Saved as: " + sFileName
Sleep 3
'/// Close the office-session ///'
FileClose
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
'/// Open the saved file ///'
hFileOpen (sFileName + "." + ExtensionString)
printlog "File opened: " + sFileName + "." + ExtensionString
Sleep 3
'/// Select all ///'
EditSelectAll
'/// Check the attributes for the picture ///'
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
@@ -447,6 +488,7 @@ testcase tiShaddow
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
'/// Check if transparency has disappeared ///'
FormatArea
Kontext
Messagebox.SetPage TabTransparenz
@@ -458,6 +500,7 @@ testcase tiShaddow
end if
TabTransparenz.Cancel
'/// Check if the cornerstyle has changed via FormatLine ///'
FormatLine
Kontext
Messagebox.SetPage TabLinie
@@ -468,6 +511,8 @@ testcase tiShaddow
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
'/// Close application ///'
Call hCloseDocument
Printlog "Finished Shaddow-test for " + gApplication
endcase ' tiShaddow

View File

@@ -56,11 +56,14 @@ testcase tFormatStylistFlyer
Dim ySize%
printlog " - Format/Stylist : using all possible things to manipulate the flyer"
'/// open application ///'
Call hNewDocument
Kontext "Gestalter"
'/// Check if stylist is there. Expected: not there ///'
if Gestalter.NotExists = false Then
qaErrorLog " - Expected Stylist to be closed; But is Open. Check tests."
else
hTypekeys "<F11>" '/// open stylist by pressing key [F11] ///'
sleep 1
end if
Kontext "Gestalter"
@@ -68,36 +71,51 @@ testcase tFormatStylistFlyer
Warnlog " No stylist popped up using F11; opening now via slotID"
FormatStylist
end if
'///+ save stylist position and size ///'
xPos% = Gestalter.GetPosX
yPos% = Gestalter.GetPosY
xSize% = Gestalter.GetSizeX
ySize% = Gestalter.GetSizeY
'///+ if Stylist is docked; undock ///'
if Gestalter.IsDocked then Gestalter.UnDock
printlog " - '///move stylist ///"
'///+ move stylist to 10,10 ///'
Gestalter.Move 10, 10
Sleep 1
'///+ move stylist to 300,400 ///'
Gestalter.Move 300, 400
Sleep 1
'///+ move stylist to 590,790 ///'
Gestalter.Move 590, 790
Sleep 1
'///+ move stylist back to saved start position ///'
Gestalter.Move xPos%, yPos%
Sleep 1
printlog " - '///size stylist ///"
'///+ change size to 200,200 ///'
Gestalter.Size 200, 200
Sleep 1
'///+ change size to 300,400 ///'
Gestalter.Size 300, 400
Sleep 1
'///+ change size to 150,250 ///'
Gestalter.Size 150, 250
Sleep 1
'///+ change size back to saved size ///'
Gestalter.Size xSize%, ySize%
Sleep 1
printlog " - Close stylist reopen stylist, check if appearence is same as before"
'/// save stylist position and size ///'
xPos% = Gestalter.GetPosX
yPos% = Gestalter.GetPosY
xSize% = Gestalter.GetSizeX
ySize% = Gestalter.GetSizeY
'/// close stylist Format->Stylist ///'
FormatStylist
Sleep 1
'/// open stylist Format->Stylist ///'
FormatStylist
sleep (1)
if xPos% <> Gestalter.GetPosX then Warnlog "The x-Pos. has changed : Should be -> '"+ xPos% + "' Is -> '"+ Gestalter.GetPosX +"'."
@@ -106,29 +124,36 @@ testcase tFormatStylistFlyer
if ySize% <> Gestalter.GetSizeY then Warnlog "The y-Size has changed : Should be -> '"+ ySize% + "' Is -> '"+ Gestalter.GetSizeY +"'."
printlog " - dock stylist"
'/// dock stylist ///'
Gestalter.Dock
Sleep 1
if (NOT Gestalter.IsDocked) then
warnlog " stylist not docked but should"
endif
'/// UNdock stylist ///'
if (Gestalter.IsDocked) Then
Gestalter.UnDock
endif
Sleep 1
printlog " - maximize/minimize stylist"
'/// minimize stylist ///'
Gestalter.Minimize
Sleep 1
'/// maximize stylist ///'
Gestalter.Maximize
Sleep 1
if (NOT Gestalter.IsMax) then
warnlog " The stylist did not return to maximized state"
endif
'/// close stylist ///'
Gestalter.Close
Call hCloseDocument
endcase
endcase 'tFormatStylistFlyer
'--------------------------------------------------------
testcase tFormatStylistDocuments
Dim xPos% as Integer
Dim yPos% as Integer
Dim xSize% as Integer
@@ -188,9 +213,11 @@ testcase tFormatStylistDocuments
Gestalter.Close
end if
Call hCloseDocument
endcase
endcase 'tFormatStylistDocuments
'--------------------------------------------------------
testcase tFormatStylistTemplatesUse
Dim i as Integer
Dim save as integer
@@ -228,9 +255,11 @@ testcase tFormatStylistTemplatesUse
sleep 3
Call hCloseDocument
endcase
endcase 'tFormatStylistTemplatesUse
'--------------------------------------------------------
testcase tFormatStylistTemplateCreate
goto endsub
dim i
dim Zaehler
@@ -269,29 +298,31 @@ testcase tFormatStylistTemplateCreate
i=0
do
inc i
loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler))
if i>zaehler then
loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler))
if i>zaehler then
warnlog " error"
endif
Ansicht.Select i
sleep 1
Ansicht.TypeKeys "<SPACE>"
sleep 1
Loeschen.Click
Kontext "Active"
Active.Yes
sleep 1
Kontext "Vorlagenkatalog"
Vorlagenkatalog.Close
sleep 1
Kontext "DocumentDraw"
gMouseClick 90,90
sleep 1
Call hCloseDocument
sleep 1
endcase
endif
Ansicht.Select i
sleep 1
Ansicht.TypeKeys "<SPACE>"
sleep 1
Loeschen.Click
Kontext "Active"
Active.Yes
sleep 1
Kontext "Vorlagenkatalog"
Vorlagenkatalog.Close
sleep 1
Kontext "DocumentDraw"
gMouseClick 90,90
sleep 1
Call hCloseDocument
sleep 1
endcase 'tFormatStylistTemplateCreate
'--------------------------------------------------------
testcase tFormatStylistTemplateSelect
dim i as integer
dim sListDown(21) as string
dim sListUp(21) as string
@@ -367,9 +398,11 @@ testcase tFormatStylistTemplateSelect
TabArea.OK
sleep 2
hCloseDocument
endcase
endcase 'tFormatStylistTemplateSelect
'---------------------------------------------------------
testcase tFormatStylistTemplateNew
dim sListDown(21) as string
dim sListUp(21) as string
dim sTemp as string
@@ -452,22 +485,24 @@ testcase tFormatStylistTemplateNew
inc i
sTemp = Vorlagenliste.GetText
Vorlagenliste.TypeKeys "<Up>"
loop while (("Testtool" <> sTemp) AND (i<20))
Vorlagenliste.TypeKeys "<Return>"
Kontext "Gestalter"
Gestalter.Close
loop while (("Testtool" <> sTemp) AND (i<20))
Vorlagenliste.TypeKeys "<Return>"
Kontext "Gestalter"
Gestalter.Close
Printlog " - check template"
FormatCharacter
Kontext
Active.SetPage TabFont
Kontext "TabFont"
TabFont.OK
hTypeKeys ("<escape>",2)
hCloseDocument
endcase
Printlog " - check template"
FormatCharacter
Kontext
Active.SetPage TabFont
Kontext "TabFont"
TabFont.OK
hTypeKeys ("<escape>",2)
hCloseDocument
endcase 'tFormatStylistTemplateNew
'--------------------------------------------------------
testcase tiFormatStylist
Dim Num1 as integer ' graphics : first line indent ; the one with 0,6cm in the summary
Dim Num2 as integer ' presentations : background ; just one tabpage pops up: Area
Dim Num3 as integer ' : background objects ; Line pops up
@@ -637,8 +672,9 @@ testcase tiFormatStylist
Kontext "Gestalter"
if Gestalter.Exists Then Warnlog "- Stylist could not be closed pressing F11"
Call hCloseDocument
endcase
endcase 'tiFormatStylist
'---------------------------------------------------------
sub hWalkTheStyles (optional a as integer,optional b as integer)
' TODO: TBO DialogTest should go to Recource test!
dim i as integer
@@ -752,9 +788,11 @@ sub hWalkTheStyles (optional a as integer,optional b as integer)
Call DialogTest (TabOptionenNumerierung)
sleep 1
endif
end sub
end sub 'hWalkTheStyles
'---------------------------------------------------------
testcase tFormatStylist
Dim sTemp as String
dim sSettings(20,3) ' control_name; control_type; value
dim i as integer
@@ -841,9 +879,11 @@ testcase tFormatStylist
endif
endif
Call hCloseDocument
endcase
endcase 'tFormatStylist
'--------------------------------------------------------
function hSelectInList (window, sEntry as String) as Boolean
Dim i as Integer
Dim sTemp as String
Dim sLastTemp as String
@@ -861,9 +901,11 @@ if (sEntry = sTemp) then
else
hSelectInList = FALSE
endif
end function
end function 'hSelectInList
'---------------------------------------------------------
function hWalkTheStyles2 (atemp)
'function hWalkTheStyles2 (bSet as boolean, aSettings(), atemp as variant) as string
dim i as integer
dim x as integer
@@ -984,6 +1026,4 @@ function hWalkTheStyles2 (atemp)
' sleep 1
' Call DialogTest (TabOptionenNumerierung)
' sleep 1
end function
end function 'hWalkTheStyles2

View File

@@ -49,7 +49,13 @@ testcase tiToolsThesaurus
Dim DasWort$
Dim ZaehlerBedeutung
'/// for normal text, the thesaurus is enabled, if the format->character->language of the word has a thesaurus///'
'///+ unfortunately in textboxes this doesn't work, you can give the word a langauge, but this is been ignored by///'
'///+ our thesaurus :-(((///'
'/// so especially for asian languages you have to set a default language in the options, to be able to use///'
'///+ the thesaurus there - fallback to englisch, because there is no ? thesaurus for cjk languages ??///'
'/// First we make sure we test a language where Thesa
' As long as OOo has no modules for that, disabled
if gOOO = True then
printlog "No spellchecking in OOo"
@@ -97,24 +103,26 @@ testcase tiToolsThesaurus
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
DasWort$ = "Hello"
endif
end select
end select
printlog " Thesaurus without any word in the document"
try
printlog " Thesaurus without any word in the document"
Call hNewDocument '/// New document ///'
try
ExtrasThesaurusDraw '/// try thesaurus in empty document ///'
Kontext "Thesaurus"
Thesaurus.Cancel
WarnLog " If no word is in the document, Thesaurus shouldn't be available"
catch
catch
PrintLog " No Thesaurus available"
endcatch
endcatch
PrintLog " Thesaurus with 1 word: " + DasWort$
PrintLog " Thesaurus with 1 word: " + DasWort$
Call hTextrahmenErstellen (DasWort$,20,20,50,30)
sleep 1
Call hTextrahmenErstellen (DasWort$,20,20,50,30)
sleep 1
hTypeKeys "<Home><SHIFT END>"
'------------------------
hTypeKeys "<Home><SHIFT END>"
'------------------------
ToolsOptions
Kontext "ExtrasOptionenDlg"
hToolsOptions("LANGUAGESETTINGS","Languages")
@@ -122,11 +130,13 @@ Westlich.Select 32
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
sleep 1
'------------------------
try
'------------------------
try
ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///'
Kontext "Thesaurus"
if Thesaurus.Exists(3) then
if Wort.GetSelText <> DasWort$ Then WarnLog "marked word should be:" + DasWort$ + " but it is:" + Wort.GetSelText
if Wort.GetSelText = DasWort$ Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///'
ZaehlerBedeutung=Bedeutung.GetItemCount
if Bedeutung.GetItemCount = 0 Then
PrintLog " There are no suggestions for this word"
@@ -138,6 +148,7 @@ try
Bedeutung.Select (ZaehlerBedeutung - 1)
end if
sleep 1
Synonym.Select 1 '/// Select synonym 1///'
sleep 1
if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field"
if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'"
@@ -149,6 +160,7 @@ try
catch
warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!"
endcatch
Call hCloseDocument '/// Close document ///'
endcase 'tiToolsThesaurus
@@ -156,7 +168,9 @@ endcase 'tiToolsThesaurus
testcase tiToolsHyphenation1
printlog " - Hyphenation without any text"
Call hNewDocument '/// New impress document ///'
sleep 3
ExtrasSilbentrennungDraw '/// Try Silbentrennung with empty document ///'
Kontext "Silbentrennung"
if Silbentrennung.Exists(1) = True Then
Warnlog " - Dialog ist da"
@@ -164,11 +178,13 @@ testcase tiToolsHyphenation1
else
Printlog " - Hyphenation activated"
end if
' Kontext "DocumentImpress"
' Kontext "DocumentImpress"
printlog " - Hyphenation with text, but without any possibility to break words"
select case iSprache
case 01 : hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40) '/// Create text without a pssibility to split words///'
case 03 : hTextrahmenErstellen ("Compare a tradu" + Chr(231) + Chr(227) + "o com o original",10,10,40,40)
case 07 : qaerrorlog "- No Hypenation for Russian available"
Call hCloseDocument '/// Close document ///'
goto endsub
case 31 : hTextrahmenErstellen ("Het is mijn bedoeling om voor en hulpmiddel.",10,10,40,40)
case 33 : hTextrahmenErstellen ("Merci beaucoup pout votre candidature du 13/11/97.",10,10,40,40)
@@ -188,17 +204,19 @@ testcase tiToolsHyphenation1
else
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
endif
end select
hTypeKeys "<Home>"
Kontext "Silbentrennung"
if Silbentrennung.Exists =True Then
end select
hTypeKeys "<Home>"
ExtrasSilbentrennungDraw '/// Try Silbentrennung ///'
Kontext "Silbentrennung"
if Silbentrennung.Exists =True Then
Warnlog "Dialog exists"
Silbentrennung.Cancel
else
else
Kontext "Active"
if Active.Exists then Active.OK
end if
Call hCloseDocument '/// Close document ///'
endcase 'tiToolsHyphenation1
@@ -221,61 +239,69 @@ testcase tiToolsHyphenation2
Call hFileOpen (sFile)
endif
case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
case 07 : qaerrorlog "- No Hypenation for Russian available"
select case iSprache '/// Open prepared document ///'
case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
case 07 : qaerrorlog "- No Hypenation for Russian available"
goto endsub
case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit"
case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e"
case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o"
case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal"
case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu"
case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka"
case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e"
case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g"
case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a"
case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia"
case else : if bAsianLan then
case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit"
case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e"
case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o"
case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal"
case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu"
case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka"
case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e"
case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g"
case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a"
case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia"
case else : if bAsianLan then
printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
printlog " :-) will use English instead"
Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt)
DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
else
else
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile
hNewDocument
endif
end select
endif
end select
Call sMakeReadOnlyDocumentEditable
Call sMakeReadOnlyDocumentEditable
printlog " - Test hyphenation"
hTypeKeys "<Return>"
printlog " - Test hyphenation"
EditSelectAll '/// Press CTRL + A to select all ///'
'/// press return to go into the edit mode ///'
hTypeKeys "<Return>"
sleep 1
' WA for draw, or smth else: get text part before hyphenation:
if iSprache = "1" OR bAsianLan = TRUE then
else
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
endif
EditCopy
sDraw = GetClipboardText()
gMouseClick 50,50
sleep 3
EditCopy
sleep 1
' WA for draw, or smth else: get text part before hyphenation:
if iSprache = "1" OR bAsianLan = TRUE then
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
else
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
endif
EditCopy
sDraw = GetClipboardText()
EditSelectAll '/// Select whole text ///'
ExtrasSilbentrennungDraw '/// Run Hyphenation ///'
gMouseClick 50,50
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
sleep 3
EditCopy
printlog GetClipboardText
select case GetClipboardText
case DasWort : printlog " - Hyphenation worked"
case DasWort2 : printlog " - Hyphenation worked"
case DasWort3 : printlog " - Hyphenation worked"
case DasWort4 : printlog " - Hyphenation worked"
case else : warnlog " - Hyphenation didnt work"
end select
if GetClipboardText <> sDraw then
Printlog " - WA draw hyphenation did work :-)"
else
Warnlog " - Hyphenation did not work"
Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'"
end if
sleep 1
select case GetClipboardText
case DasWort : printlog " - Hyphenation worked"
case DasWort2 : printlog " - Hyphenation worked"
case DasWort3 : printlog " - Hyphenation worked"
case DasWort4 : printlog " - Hyphenation worked"
case else : warnlog " - Hyphenation didnt work"
end select
if GetClipboardText <> sDraw then
Printlog " - WA draw hyphenation did work :-)"
else
Warnlog " - Hyphenation did not work"
Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'"
end if
sleep 1
Call hCloseDocument '/// Close document ///'
endcase 'tiToolsHyphenation2
@@ -292,6 +318,7 @@ testcase tToolsMacro
ToolsMacro
Kontext "Makro"
'/// to get the count of all macros, the list needs to get elapsed-all ///'
for j = 1 to 2
Zaehler=MakroAus.GetItemCount
MakroAus.typeKeys "<end>"

View File

@@ -56,15 +56,19 @@ testcase tViewZoom
Printlog "- View-Zoom testing"
if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-)
Call hNewDocument '/// new document ///'
ViewZoom
Kontext "Massstab"
Vergroesserung100.Check '/// set zoom to 50% ///'
Massstab.OK
'/// create a number of rectangles with different color properties ///'
Kontext "SD_Farbleiste"
sleep 1
if SD_Farbleiste.Exists then
Printlog "- Color toolbar will be disabled now"
ViewToolbarsColorBar
end if
'/// All rectangles are created with same dimensions but using different zoom settings ///'
For Zaehler = 1 to 9
Position1 = 5 * Zaehler - 3
Position2 = 105 - 5 * Zaehler
@@ -79,7 +83,9 @@ testcase tViewZoom
gMouseClick 50,0
Next Zaehler
sleep 2
hFileSaveAs (Datei$) '/// save document ///'
sleep 3
for Zaehler = 1 to 6 '/// changing zoom settings and checking functionality with controlling the color of the selected rectangle ///'
ViewZoom
Kontext "Massstab"
VergroesserungStufenlos.check
@@ -129,4 +135,5 @@ testcase tViewZoom
'Seitenbreite.push
sleep 2
Call hCloseDocument '/// close document ///'
endcase

View File

@@ -324,7 +324,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes
printlog " - 'add all' for the rest of the files"
DateiListe.Select 1
HinzufuegenAlle.Click
sleep (1)
sleep (8)
printlog " - apply-dialog -> cancel"
Kontext "ApplyGallery"
for j=1 to 100
@@ -341,7 +341,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes
printlog " - 'add all' for the rest of the files"
DateiListe.Select 1
HinzufuegenAlle.Click
sleep (2)
sleep (8)
Kontext "ApplyGallery"
for j=1 to 100
If ApplyGallery.Exists then

View File

@@ -332,10 +332,10 @@ testcase tViewNavigator
'/// Check that the dragmodus has 3 modes
printlog " Check that the dragmodus has 3 modes"
Dragmodus.OpenMenu
if MenuGetItemCount <> 3 then
if hMenuItemGetCount <> 3 then
warnlog "Not enough modes for dragmodus"
end if
MenuSelect (0)
hMenuSelectNr (0)
'/// Close Navigator
printlog " Close Navigator"
Kontext "Navigator"