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

View File

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

View File

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

View File

@@ -27,9 +27,9 @@
* for a copy of the LGPLv3 License. * for a copy of the LGPLv3 License.
* *
************************************************************************/ ************************************************************************/
package graphical; package graphical;
import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.util.ArrayList; 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 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 */ // is only need, if we need this class outside package convwatch
public class IniFile implements Enumeration public class IniFile implements Enumeration
{ {
/** /**
* internal representation of the ini file content. * internal representation of the ini file content.
* Problem, if ini file changed why other write something difference, we don't realise this. * Problem, if ini file changed why other write something difference, we don't realise this.
@@ -48,13 +49,13 @@ public class IniFile implements Enumeration
private String m_sFilename; private String m_sFilename;
private ArrayList m_aList; private ArrayList m_aList;
boolean m_bListContainUnsavedChanges = false; boolean m_bListContainUnsavedChanges = false;
private int m_aEnumerationPos = 0; private int m_aEnumerationPos = 0;
/** /**
open a ini file by it's name 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. @param _sFilename string a filename, if the file doesn't exist, a new empty ini file will create.
write back to disk only if there are really changes. write back to disk only if there are really changes.
*/ */
public IniFile(String _sFilename) public IniFile(String _sFilename)
{ {
m_sFilename = _sFilename; m_sFilename = _sFilename;
@@ -66,23 +67,23 @@ 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 if (m_aList.size() == 0)
for (int i=0; i<_aList.length;i++)
{ {
m_aList.add(_aList[i]); // can only insert if there is nothing else already in the ini file
for (int i = 0; i < _aList.length; i++)
{
m_aList.add(_aList[i]);
}
} }
} }
}
private ArrayList loadLines() private ArrayList loadLines()
{ {
File aFile = new File(m_sFilename); File aFile = new File(m_sFilename);
ArrayList aLines = new ArrayList(); ArrayList aLines = new ArrayList();
if (! aFile.exists()) if (!aFile.exists())
{ {
GlobalLogWriter.get().println("couldn't find file '" + m_sFilename + "', will be created."); GlobalLogWriter.get().println("couldn't find file '" + m_sFilename + "', will be created.");
// DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); // DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
@@ -90,9 +91,10 @@ public class IniFile implements Enumeration
return aLines; return aLines;
} }
RandomAccessFile aReader = null; RandomAccessFile aReader = null;
// BufferedReader aReader;
try try
{ {
aReader = new RandomAccessFile(aFile,"r"); aReader = new RandomAccessFile(aFile, "r");
String aLine = ""; String aLine = "";
while (aLine != null) while (aLine != null)
{ {
@@ -135,28 +137,29 @@ public class IniFile implements Enumeration
{ {
return m_aList.size() > 1 ? true : false; return m_aList.size() > 1 ? true : false;
} }
/**
* Check if a given Section and Key exists in the ini file /**
* @param _sSectionName * Check if a given Section and Key exists in the ini file
* @param _sKey * @param _sSectionName
* @return true if the given Section, Key exists, now you can get the value * @param _sKey
*/ * @return true if the given Section, Key exists, now you can get the value
*/
public boolean hasValue(String _sSectionName, String _sKey) public boolean hasValue(String _sSectionName, String _sKey)
{
int n = findKey(_sSectionName, _sKey);
if (n > 0)
{ {
return true; int n = findKey(_sSectionName, _sKey);
if (n > 0)
{
return true;
}
return false;
} }
return false;
}
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
private boolean isRemark(String _sLine) private boolean isRemark(String _sLine)
{ {
if ( ((_sLine.length() < 2) ) || if (((_sLine.length() < 2)) ||
( _sLine.startsWith("#")) || (_sLine.startsWith("#")) ||
( _sLine.startsWith(";")) ) (_sLine.startsWith(";")))
{ {
return true; return true;
} }
@@ -165,7 +168,7 @@ public class IniFile implements Enumeration
private String getItem(int i) private String getItem(int i)
{ {
return (String)m_aList.get(i); return (String) m_aList.get(i);
} }
private String buildSectionName(String _sSectionName) private String buildSectionName(String _sSectionName)
@@ -173,16 +176,18 @@ public class IniFile implements Enumeration
String sFindSection = "[" + _sSectionName + "]"; String sFindSection = "[" + _sSectionName + "]";
return sFindSection; return sFindSection;
} }
private String sectionToString(String _sSectionName) private String sectionToString(String _sSectionName)
{
String sKeyName = _sSectionName;
if (sKeyName.startsWith("[") &&
sKeyName.endsWith("]"))
{ {
sKeyName = sKeyName.substring(1, sKeyName.length() - 1); String sKeyName = _sSectionName;
if (sKeyName.startsWith("[") &&
sKeyName.endsWith("]"))
{
sKeyName = sKeyName.substring(1, sKeyName.length() - 1);
}
return sKeyName;
} }
return sKeyName;
}
private String toLowerIfNeed(String _sName) private String toLowerIfNeed(String _sName)
{ {
return _sName.toLowerCase(); return _sName.toLowerCase();
@@ -194,11 +199,11 @@ public class IniFile implements Enumeration
String sFindSection = toLowerIfNeed(buildSectionName(_sSection)); String sFindSection = toLowerIfNeed(buildSectionName(_sSection));
// ----------- find _sSection --------------- // ----------- find _sSection ---------------
int i; int i;
for (i=0; i<m_aList.size();i++) for (i = 0; i < m_aList.size(); i++)
{ {
String sLine = toLowerIfNeed(getItem(i).trim()); String sLine = toLowerIfNeed(getItem(i).trim());
if (isRemark(sLine)) if (isRemark(sLine))
{ {
continue; continue;
} }
if (sFindSection.equals("[]")) if (sFindSection.equals("[]"))
@@ -220,14 +225,14 @@ public class IniFile implements Enumeration
* @return true if the given _sSection was found * @return true if the given _sSection was found
*/ */
public boolean hasSection(String _sSection) public boolean hasSection(String _sSection)
{
int i = findSection(_sSection);
if (i == -1)
{ {
return false; int i = findSection(_sSection);
if (i == -1)
{
return false;
}
return true;
} }
return true;
}
// return the line number, where the key is found. // return the line number, where the key is found.
private int findKey(String _sSection, String _sKey) private int findKey(String _sSection, String _sKey)
@@ -245,7 +250,7 @@ public class IniFile implements Enumeration
private int findKeyFromKnownSection(int _nSectionIndex, String _sKey) private int findKeyFromKnownSection(int _nSectionIndex, String _sKey)
{ {
_sKey = toLowerIfNeed(_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(); String sLine = getItem(j).trim();
@@ -270,7 +275,7 @@ public class IniFile implements Enumeration
{ {
return j; return j;
} }
} }
} }
return -1; return -1;
} }
@@ -280,7 +285,7 @@ public class IniFile implements Enumeration
{ {
_sKey = toLowerIfNeed(_sKey); _sKey = toLowerIfNeed(_sKey);
int i = _nSectionIndex + 1; 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(); String sLine = getItem(j).trim();
@@ -318,7 +323,7 @@ public class IniFile implements Enumeration
int nEqual = sLine.indexOf("="); int nEqual = sLine.indexOf("=");
if (nEqual >= 0) if (nEqual >= 0)
{ {
String sKey = sLine.substring(0, nEqual).trim(); String sKey = sLine.substring(0, nEqual).trim();
String sValue = sLine.substring(nEqual + 1).trim(); String sValue = sLine.substring(nEqual + 1).trim();
return sValue; return sValue;
} }
@@ -332,7 +337,6 @@ public class IniFile implements Enumeration
*/ */
// private int m_nCurrentPosition; // private int m_nCurrentPosition;
// private String m_sOldKey; // private String m_sOldKey;
public String getValue(String _sSection, String _sKey) public String getValue(String _sSection, String _sKey)
{ {
String sValue = ""; String sValue = "";
@@ -359,7 +363,6 @@ public class IniFile implements Enumeration
// } // }
// return ""; // return "";
// } // }
/** /**
* Returns the value at Section, Key converted to an integer * Returns the value at Section, Key converted to an integer
* Check with hasValue(Section, Key) to check before you get into trouble. * Check with hasValue(Section, Key) to check before you get into trouble.
@@ -369,31 +372,32 @@ public class IniFile implements Enumeration
* @return * @return
*/ */
public int getIntValue(String _sSection, String _sKey, int _nDefault) public int getIntValue(String _sSection, String _sKey, int _nDefault)
{
String sValue = getValue(_sSection, _sKey);
int nValue = _nDefault;
if (sValue.length() > 0)
{ {
try String sValue = getValue(_sSection, _sKey);
int nValue = _nDefault;
if (sValue.length() > 0)
{ {
nValue = Integer.valueOf(sValue).intValue(); try
} {
catch(java.lang.NumberFormatException e) nValue = Integer.valueOf(sValue).intValue();
{ }
GlobalLogWriter.get().println("IniFile.getIntValue(): Caught a number format exception, return the default value."); catch (java.lang.NumberFormatException e)
{
GlobalLogWriter.get().println("IniFile.getIntValue(): Caught a number format exception, return the default value.");
}
} }
return nValue;
} }
return nValue;
}
public void close() public void close()
{ {
store(); store();
} }
/** /**
write back the ini file to the disk, only if there exist changes write back the ini file to the disk, only if there exist changes
* @deprecated use close() instead! * @deprecated use close() instead!
*/ */
public void store() public void store()
{ {
if (m_bListContainUnsavedChanges == false) if (m_bListContainUnsavedChanges == false)
@@ -423,22 +427,26 @@ public class IniFile implements Enumeration
try try
{ {
RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw"); 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); String sLine = getItem(i);
if (sLine.startsWith("["))
{
// write an extra empty line before next section.
aWriter.writeByte((int) '\n');
}
aWriter.writeBytes(sLine); aWriter.writeBytes(sLine);
aWriter.writeByte((int)'\n'); aWriter.writeByte((int) '\n');
} }
aWriter.close(); aWriter.close();
} }
catch (java.io.FileNotFoundException fne) catch (java.io.FileNotFoundException fne)
{ {
GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename); GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename);
GlobalLogWriter.get().println("Message: " + fne.getMessage()); GlobalLogWriter.get().println("Message: " + fne.getMessage());
// DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, ""); // 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("Exception occurs while writing to file " + m_sFilename);
GlobalLogWriter.get().println("Message: " + ie.getMessage()); GlobalLogWriter.get().println("Message: " + ie.getMessage());
@@ -446,12 +454,16 @@ public class IniFile implements Enumeration
} }
} }
public void insertValue(String _sSection, String _sKey, int _nValue) public void insertValue(String _sSection, String _sKey, int _nValue)
{ {
insertValue(_sSection, _sKey, String.valueOf(_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 insert a value
there are 3 cases there are 3 cases
@@ -551,71 +563,71 @@ public class IniFile implements Enumeration
// //
// return sLocalValue; // return sLocalValue;
// } // }
public void removeSection(String _sSectionToRemove)
public void removeSection(String _sSectionToRemove)
{
// first, search for the name
int i = findSection(_sSectionToRemove);
if (i == -1) {
// Section to remove not found, do nothing.
return;
}
// second, find the next section
int j = findNextSection(i + 1);
if (j == -1)
{ {
// if we are at the end, use size() as second section // first, search for the name
j = m_aList.size(); int i = findSection(_sSectionToRemove);
if (i == -1)
{
// Section to remove not found, do nothing.
return;
}
// second, find the next section
int j = findNextSection(i + 1);
if (j == -1)
{
// if we are at the end, use size() as second section
j = m_aList.size();
}
// remove all between first and second section
for (int k = i; k < j; k++)
{
m_aList.remove(i);
}
// mark the list as changed
m_bListContainUnsavedChanges = true;
} }
// remove all between first and second section
for(int k=i; k<j; k++)
{
m_aList.remove(i);
}
// mark the list as changed
m_bListContainUnsavedChanges = true;
}
/** /**
* some tests for this class * 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"; String sTempFile = System.getProperty("java.io.tmpdir");
sTempFile += "inifile";
IniFile aIniFile = new IniFile(sTempFile); IniFile aIniFile = new IniFile(sTempFile);
String sValue = aIniFile.getValue("Section", "Key"); String sValue = aIniFile.getValue("Section", "Key");
// insert a new value to a already exist section // insert a new value to a already exist section
aIniFile.insertValue("Section", "Key2", "a new value in a existing section"); aIniFile.insertValue("Section", "Key2", "a new value in a existing section");
// replace a value // replace a value
aIniFile.insertValue("Section", "Key", "replaced value"); aIniFile.insertValue("Section", "Key", "replaced value");
// create a new value // create a new value
aIniFile.insertValue("New Section", "Key", "a new key value pair"); aIniFile.insertValue("New Section", "Key", "a new key value pair");
aIniFile.insertValue("New Section", "Key2", "a new second key value pair"); aIniFile.insertValue("New Section", "Key2", "a new second key value pair");
String sValue2 = aIniFile.getValue("Section2", "Key"); String sValue2 = aIniFile.getValue("Section2", "Key");
aIniFile.removeSection("Section"); aIniFile.removeSection("Section");
aIniFile.removeSection("New Section"); aIniFile.removeSection("New Section");
aIniFile.close();
}
aIniFile.close();
}
/** /**
* Enumeration Interface * Enumeration Interface
* @return true, if there are more Key values * @return true, if there are more Key values
*/ */
public boolean hasMoreElements() public boolean hasMoreElements()
{
if (m_aEnumerationPos >=0 &&
m_aEnumerationPos < m_aList.size())
{ {
return true; if (m_aEnumerationPos >= 0 &&
m_aEnumerationPos < m_aList.size())
{
return true;
}
return false;
} }
return false;
}
/** /**
* Find the next line, which starts with '[' * Find the next line, which starts with '['
@@ -623,57 +635,57 @@ public void removeSection(String _sSectionToRemove)
* @return the line where '[' found or -1 * @return the line where '[' found or -1
*/ */
private int findNextSection(int i) private int findNextSection(int i)
{
if (i >= 0)
{ {
while (i < m_aList.size()) if (i >= 0)
{ {
String sLine = (String)m_aList.get(i); while (i < m_aList.size())
if (sLine.startsWith("["))
{ {
return i; String sLine = (String) m_aList.get(i);
if (sLine.startsWith("["))
{
return i;
}
i++;
} }
i++;
} }
return -1;
} }
return -1;
}
/** /**
* Enumeration Interface * Enumeration Interface
* @return a key without the enveloped '[' ']' * @return a key without the enveloped '[' ']'
*/ */
public Object nextElement() public Object nextElement()
{
int nLineWithSection = findNextSection(m_aEnumerationPos);
if (nLineWithSection != -1)
{ {
String sSection = (String)m_aList.get(nLineWithSection); int nLineWithSection = findNextSection(m_aEnumerationPos);
m_aEnumerationPos = findNextSection(nLineWithSection + 1); if (nLineWithSection != -1)
sSection = sectionToString(sSection); {
return sSection; String sSection = (String) m_aList.get(nLineWithSection);
m_aEnumerationPos = findNextSection(nLineWithSection + 1);
sSection = sectionToString(sSection);
return sSection;
}
else
{
m_aEnumerationPos = m_aList.size();
}
return null;
} }
else
{
m_aEnumerationPos = m_aList.size();
}
return null;
}
/** /**
* Helper to count the occurence of Sections * Helper to count the occurence of Sections
* @return returns the count of '^['.*']$' Elements * @return returns the count of '^['.*']$' Elements
*/ */
public int getElementCount() public int getElementCount()
{
int nCount = 0;
int nPosition = 0;
while ((nPosition = findNextSection(nPosition)) != -1)
{ {
nCount ++; int nCount = 0;
nPosition ++; int nPosition = 0;
while ((nPosition = findNextSection(nPosition)) != -1)
{
nCount++;
nPosition++;
}
return nCount;
} }
return nCount;
}
} }

View File

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

View File

@@ -122,8 +122,8 @@ public class CwsDataExchangeImpl implements CwsDataExchange
final String stat = status ? ".PASSED.OK" : ".PASSED.FAILED"; final String stat = status ? ".PASSED.OK" : ".PASSED.FAILED";
statusFile = utils.getUsersTempDir() + statusFile = utils.getUsersTempDir() +
System.getProperty("file.separator") + System.getProperty("file.separator") +
"UnoApiCwsStatus." + "UnoApiCwsStatus." +
(String) param.get(PropertyName.VERSION) + (String) param.get(PropertyName.VERSION) +
"_" + param.get(PropertyName.OPERATING_SYSTEM) + stat + ".txt"; "_" + param.get(PropertyName.OPERATING_SYSTEM) + stat + ".txt";

View File

@@ -36,6 +36,9 @@ import java.io.PrintStream;
import java.io.LineNumberReader; import java.io.LineNumberReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import lib.TestParameters; import lib.TestParameters;
import util.PropertyName; import util.PropertyName;
import util.utils; import util.utils;
@@ -492,6 +495,29 @@ public class ProcessHandler
isStarted = false; 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() protected void execute()
{ {
if (isStarted()) if (isStarted())
@@ -511,7 +537,7 @@ public class ProcessHandler
log.print(" "); log.print(" ");
} }
log.println(""); log.println("");
initialExactStartTime();
m_aProcess = runtime.exec(cmdLineArray, envVars); m_aProcess = runtime.exec(cmdLineArray, envVars);
} }
else else
@@ -547,6 +573,9 @@ public class ProcessHandler
stderr = new Pump(m_aProcess.getErrorStream(), log, "err > "); stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ");
stdIn = new PrintStream(m_aProcess.getOutputStream()); stdIn = new PrintStream(m_aProcess.getOutputStream());
// int nExitValue = m_aProcess.exitValue();
// int dummy = 0;
dbg("execute: flush io-streams"); dbg("execute: flush io-streams");
flushInput(); flushInput();
@@ -583,10 +612,10 @@ public class ProcessHandler
* @return <code>true</code> if process correctly exited * @return <code>true</code> if process correctly exited
* (exit code doesn't affect to this result). * (exit code doesn't affect to this result).
*/ */
public boolean waitFor(long timeout) public boolean waitFor(long timeout)
{ {
return waitFor(timeout, true); return waitFor(timeout, true);
} }
private boolean waitFor(long timeout, boolean bKillProcessAfterTimeout) private boolean waitFor(long timeout, boolean bKillProcessAfterTimeout)
{ {

View File

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

View File

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

View File

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

View File

@@ -36,6 +36,8 @@ eval 'exec perl -wS $0 ${1+"$@"}'
# smoketest - do the smoketest # smoketest - do the smoketest
# #
use lib ("$ENV{SOLARENV}/bin/modules");
use File::Basename; use File::Basename;
use File::Path; use File::Path;
use File::Copy; use File::Copy;
@@ -47,12 +49,12 @@ use Getopt::Long;
# # # #
######################### #########################
$is_debug = 0; # run without executing commands $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_protocol_test = 0;
$is_remove_on_error = 0; $is_remove_on_error = 0;
$is_remove_at_end = 1; $is_remove_at_end = 1;
$is_do_deinstall = 0; $is_do_deinstall = 0;
$is_admin_installation = 1; $is_without_msiexec = 1;
$is_oo = 1; $is_oo = 1;
$gui = $ENV{GUI}; $gui = $ENV{GUI};
@@ -165,7 +167,6 @@ elsif ($gui eq $cygwin) {
$bootstrapiniTemp = $bootstrapini . "_"; $bootstrapiniTemp = $bootstrapini . "_";
$CygwinLineends = $/; $CygwinLineends = $/;
$WinLineends = "\r\n"; $WinLineends = "\r\n";
&SetWinLineends();
$packpackage = "msi"; $packpackage = "msi";
$installpath_without =~ s/\\/\//g; $installpath_without =~ s/\\/\//g;
} }
@@ -173,6 +174,12 @@ else {
print_error ("not supported system\n",1); 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) { if ($is_oo) {
@install_list = ( 'instsetoo_native' @install_list = ( 'instsetoo_native'
); );
@@ -195,7 +202,8 @@ else {
'can not patch bottstrapini', 'can not patch bottstrapini',
'msiexec failed. Maybe you have got an installed version', 'msiexec failed. Maybe you have got an installed version',
'deinstallation is incomplete', '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; my $show_NoMessage = 0;
@@ -214,6 +222,7 @@ my $error_patchBootstrap = 10;
my $error_msiexec = 11; my $error_msiexec = 11;
my $error_deinst = 12; my $error_deinst = 12;
my $error_packformat = 13; my $error_packformat = 13;
my $error_permission = 14;
my $command_normal = 0; my $command_normal = 0;
my $command_withoutErrorcheck = 1; my $command_withoutErrorcheck = 1;
@@ -528,6 +537,10 @@ sub doTest {
# execute_Command ($Command, $error_deinstall, $show_NoMessage, $command_normal); # execute_Command ($Command, $error_deinstall, $show_NoMessage, $command_normal);
} }
sub install_error {
print_error ($error_messages[$error_setup], $error_setup);
}
sub doInstall { sub doInstall {
my ($installsetpath, $dest_installdir) = @_; my ($installsetpath, $dest_installdir) = @_;
my ($DirArray, $mask, $file, $Command, $optdir, $rpmdir, $system, $mach, $basedir, $output_ref, $olddir, $newdir); my ($DirArray, $mask, $file, $Command, $optdir, $rpmdir, $system, $mach, $basedir, $output_ref, $olddir, $newdir);
@@ -557,51 +570,43 @@ sub doInstall {
print_error ("Installationset in $installsetpath is incomplete", 2); print_error ("Installationset in $installsetpath is incomplete", 2);
} }
foreach $file (@DirArray) { foreach $file (@DirArray) {
if ($gui eq $cygwin) { if ($is_without_msiexec) {
my $convertinstallset = ConvertCygwinToWin_Shell("$installsetpath$file"); if ($is_debug) {
my $convertdestdir = ConvertCygwinToWin_Shell($dest_installdir); print "Debugmode: no installation from $installsetpath\n";
$_inst_cmd=$ENV{SMOKETEST_SOINSTCMD};
if ( defined($_inst_cmd) ) {
$Command = $_inst_cmd . " $convertinstallset -qn TARGETDIR=$convertdestdir";
} }
else { else {
if ($is_admin_installation) { 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);
$_inst_cmd=$ENV{SMOKETEST_SOINSTCMD};
if ( defined($_inst_cmd) ) {
$Command = $_inst_cmd . " $convertinstallset -qn TARGETDIR=$convertdestdir";
}
else {
$Command = "msiexec.exe /a $convertinstallset -qn TARGETDIR=$convertdestdir ALLUSERS=2"; $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};
if ( defined($_inst_cmd) ) {
$Command = $_inst_cmd . " $installsetpath$file -qn TARGETDIR=$dest_installdir";
} }
else { else {
if ($is_admin_installation) $_inst_cmd=$ENV{SMOKETEST_SOINSTCMD};
{ if ( defined($_inst_cmd) ) {
$Command = $_inst_cmd . " $installsetpath$file -qn TARGETDIR=$dest_installdir";
}
else {
$Command = "msiexec.exe /a $installsetpath$file -qn TARGETDIR=$dest_installdir ALLUSERS=2"; $Command = "msiexec.exe /a $installsetpath$file -qn TARGETDIR=$dest_installdir ALLUSERS=2";
} }
else {
$Command = "msiexec.exe -i $installsetpath$file -qn INSTALLLOCATION=$dest_installdir";
}
} }
execute_Command ($Command, $error_msiexec, $show_Message, $command_normal);
} }
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; $basedir = $dest_installdir;
} }
@@ -844,12 +849,7 @@ sub getInstset {
return ($NEWINSTSET, $INSTSET); return ($NEWINSTSET, $INSTSET);
} }
if (!isLocalEnv() and !defined($ENV{CWS_WORK_STAMP}) and (-e $SHIP)) { if (!isLocalEnv() and !defined($ENV{CWS_WORK_STAMP}) and (-e $SHIP)) {
my $last_lineend = $/;
if ($gui eq $cygwin) {
&SetCygwinLineends();
}
($NEWINSTSET, $INSTSET) = getSetFromServer(); ($NEWINSTSET, $INSTSET) = getSetFromServer();
$/ = $last_lineend;
} }
else { else {
$InstDir=""; $InstDir="";
@@ -899,44 +899,6 @@ sub isLocalEnv {
return $returnvalue; 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 { sub get_productcode {
my ( $installpath ) = @_; my ( $installpath ) = @_;
my ($path, $productcode); my ($path, $productcode);
@@ -977,13 +939,11 @@ sub getSetFromServer {
my $workspace = $ENV{WORK_STAMP}; my $workspace = $ENV{WORK_STAMP};
my $platform = $ENV{INPATH}; my $platform = $ENV{INPATH};
my $latestset; my $latestset;
my (@DirArray, $mask, $buildid); my (@DirArray, $mask);
$SetupFullPath = $PORDUCT; $SetupFullPath = $PORDUCT;
if ( ! ( $workspace && $platform ) ) { if ( ! ( $workspace && $platform ) ) {
print_error ( "Error: environment not set correctly.", 1); print_error ( "Error: environment not set correctly.", 1);
} }
# get latest broadcastet milestone and pack number
($milestone, $buildid) = get_milestoneAndBuildID( $workspace, $platform );
if (!defined($milestone)) { if (!defined($milestone)) {
print_error ("Milestone ist not defined!", 2); print_error ("Milestone ist not defined!", 2);
} }

View File

@@ -721,9 +721,9 @@ testcase tCreateNewBubbleChart
dim sInputFile as STRING dim sInputFile as STRING
dim sOutputFile as STRING dim sOutputFile as STRING
dim sControlString 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" ) 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) call hFileOpen(sInputFile)
sleep(2) sleep(2)
printlog "Save document as Officepath/user/work/tCreateNewBubbleChart.ods" printlog "Save document as Officepath/user/work/tCreateNewBubbleChart.ods"

View File

@@ -196,7 +196,7 @@ testcase tTextBox
endif endif
if fGetControlProperty("TextBox","AdditionalInfo") <> "my only friend the end." then 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 endif
call fSetControlProperty("TextBox","TextType","2") 'needed for activate scrollbar call fSetControlProperty("TextBox","TextType","2") 'needed for activate scrollbar
sleep(1) sleep(1)

View File

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

View File

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

View File

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

View File

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

View File

@@ -74,8 +74,8 @@ testcase tPNG
endif endif
call hCloseDocument call hCloseDocument
endcase 'tPNG
endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tSVM testcase tSVM
@@ -243,8 +243,8 @@ testcase tSVM
endif endif
call hCloseDocument call hCloseDocument
endcase endcase 'tSVM
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tPDF testcase tPDF
@@ -253,13 +253,18 @@ testcase tPDF
dim iFileSize(12) as long dim iFileSize(12) as long
dim i as integer 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) sleep (10)
'--------------------------------------------------------------------------------------------------------------------------------------------------------- '---------------------------------------------------------------------------------------------------------------------------------------------------------
'###### all / Screen optimized ###### '###### all / Screen optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document" printlog "File->Export as PDF document"
'///+ range = All
printlog " range = All" printlog " range = All"
'///+ compression = Screen optimized
printlog " compression = Screen optimized" printlog " compression = Screen optimized"
kontext "Standardbar" kontext "Standardbar"
@@ -268,7 +273,9 @@ testcase tPDF
'--------------------------------------------------------- Output the first file --------------------------------------------------------------- '--------------------------------------------------------- Output the first file ---------------------------------------------------------------
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 1, TRUE, FALSE, 1, 1) hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 1, TRUE, FALSE, 1, 1)
'/// Export using Button in toolbar
printlog "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" printlog " use the settings from the export before"
kontext "Standardbar" 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 hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 2, TRUE, FALSE, 1, 1) ' button in toolbar -> last settings have to be used
'###### range / Screen optimized ###### '###### range / Screen optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document" printlog "File->Export as PDF document"
'///+ range = Range
printlog " range = Range" printlog " range = Range"
'///+ compression = Screen optimized
printlog " compression = Screen optimized" printlog " compression = Screen optimized"
kontext "Standardbar" kontext "Standardbar"
@@ -290,7 +300,9 @@ testcase tPDF
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 3, TRUE, FALSE, 2, 1, "2") hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 3, TRUE, FALSE, 2, 1, "2")
'/// Export using Button in toolbar
printlog "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" printlog " use the settings from the export before"
kontext "Standardbar" 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 hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 4, TRUE, FALSE, 2, 1) ' button in toolbar -> last settings have to be used
'###### all / Print optimized ###### '###### all / Print optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document" printlog "File->Export as PDF document"
'///+ range = all
printlog " range = all" printlog " range = all"
'///+ compression = Print optimized
printlog " compression = Print optimized" printlog " compression = Print optimized"
kontext "Standardbar" kontext "Standardbar"
@@ -312,7 +327,9 @@ testcase tPDF
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 5, TRUE, FALSE, 1, 2) hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 5, TRUE, FALSE, 1, 2)
'/// Export using Button in toolbar
printlog "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" printlog " use the settings from the export before"
kontext "Standardbar" 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 hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 6, TRUE, FALSE, 1, 2) ' button in toolbar -> last settings have to be used
'###### range / Print optimized ###### '###### range / Print optimized ######
'/// File->Export as PDF document
printlog "File->Export as PDF document" printlog "File->Export as PDF document"
'///+ range = Range
printlog " range = Range" printlog " range = Range"
'///+ compression = Screen optimized
printlog " compression = Screen optimized" printlog " compression = Screen optimized"
kontext "Standardbar" kontext "Standardbar"
@@ -334,7 +354,9 @@ testcase tPDF
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 7, TRUE, FALSE, 2, 2, "2") hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 7, TRUE, FALSE, 2, 2, "2")
'/// Export using Button in toolbar
printlog "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" printlog " use the settings from the export before"
kontext "Standardbar" 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 hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 8, TRUE, FALSE, 2, 2) ' button in toolbar -> last settings have to be used
'###### all / Press optimized ###### '###### all / Press optimized ######
'/// File->Export as PDF document ///'
printlog "File->Export as PDF document ///'" printlog "File->Export as PDF document ///'"
'///+ range = all
printlog " range = all" printlog " range = all"
'///+ compression = Press optimized
printlog " compression = Press optimized" printlog " compression = Press optimized"
kontext "Standardbar" kontext "Standardbar"
@@ -355,6 +380,8 @@ testcase tPDF
'------------------------------------------------------------ Output the ninth file ---------------------------------------------------------------- '------------------------------------------------------------ Output the ninth file ----------------------------------------------------------------
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 9, TRUE, FALSE, 1, 3) hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 9, TRUE, FALSE, 1, 3)
'/// Export using Button in toolbar
'///+ use the settings from the export before
kontext "Standardbar" kontext "Standardbar"
checkexppdfwaitmax10sec 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 hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 10, TRUE, FALSE, 1, 3) ' button in toolbar -> last settings have to be used
'###### range / Press optimized ###### '###### range / Press optimized ######
'/// File->Export as PDF document ///'
printlog "File->Export as PDF document ///'" printlog "File->Export as PDF document ///'"
'///+ range = all
printlog " range = all" printlog " range = all"
'///+ compression = Press optimized
printlog " compression = Press optimized" printlog " compression = Press optimized"
kontext "Standardbar" kontext "Standardbar"
@@ -374,6 +404,8 @@ testcase tPDF
'----------------------------------------------------------- Output the eleventh file ------------------------------------------------------------- '----------------------------------------------------------- Output the eleventh file -------------------------------------------------------------
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 11, TRUE, FALSE, 2, 3, "2") hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 11, TRUE, FALSE, 2, 3, "2")
'/// Export using Button in toolbar
'///+ use the settings from the export before
kontext "Standardbar" kontext "Standardbar"
checkexppdfwaitmax10sec checkexppdfwaitmax10sec
@@ -389,21 +421,23 @@ testcase tPDF
for i=1 to 12 for i=1 to 12
sPath = OutputGrafikTBO sPath = OutputGrafikTBO
sPath = sPath + i & ".pdf" sPath = sPath + i + ".pdf"
iFileSize(i) = app.FileLen(sPath) iFileSize(i) = app.FileLen(sPath)
Printlog (" - " & i & ": " & " " & iFileSize(i) & " " & sPath Printlog (" - " + i + ": " + " " + iFileSize(i) + " " + sPath
if (dir(sPath) <> "") then if (dir(sPath) <> "") then
sleep(1) sleep(1)
'/// the first line has to be '%PDF-1.4' ///'
sTemp = fGetFileText(sPath, 8) sTemp = fGetFileText(sPath, 8)
if (sTemp <> "%PDF-1.4") then 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 endif
'/// the last line has to be '%%EOF' ///'
sTemp = left(fGetFileText(sPath, -6),5) sTemp = left(fGetFileText(sPath, -6),5)
if (sTemp <> "%%EOF") then 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 endif
else else
Warnlog "File was not exported to PDF :-( '" & sPath & "'" Warnlog "File was not exported to PDF :-( '" + sPath + "'"
endif endif
next i next i
@@ -424,10 +458,10 @@ testcase tPDF
'Warnlog ("Difference in filesize for file 9 and 10") 'Warnlog ("Difference in filesize for file 9 and 10")
endif endif
if (iFileSize(1) > iFileSize(5)) then if (iFileSize(1) > iFileSize(5)) then
qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button" qaerrorlog "i100919: pdf export: different file size when exporting with file/export or button"
'Warnlog ("Filesize for file 1 is greater then for file 5. The compression level doesn't work.") 'Warnlog ("Filesize for file 1 is greater then for file 5. The compression level doesn't work.")
endif endif
if (iFileSize(5) > iFileSize(9)) then if (iFileSize(5) > iFileSize(9)) then
@@ -435,8 +469,8 @@ testcase tPDF
endif endif
call hCloseDocument() call hCloseDocument()
endcase 'tPDF
endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tPDF_Creator testcase tPDF_Creator
@@ -452,22 +486,24 @@ testcase tPDF_Creator
dim sTextFiltername as String dim sTextFiltername as String
dim sExtension() 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) hFileOpen (sTemp)
sleep (30) sleep (30)
sPath = OutputGrafikTBO sPath = OutputGrafikTBO
sTemp = sPath sTemp = sPath
sPath = sPath & "L.pdf" sPath = sPath + "L.pdf"
sleep(1) sleep(1)
hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1) hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1)
name sPath as sTemp&"L.txt" name sPath as sTemp+"L.txt"
sleep (30) sleep (30)
iFileSize(3) = app.FileLen(sTemp&"L.txt") iFileSize(3) = app.FileLen(sTemp+"L.txt")
iCreatorOffset = 0 iCreatorOffset = 0
sleep 5 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" Kontext "AsciiFilterOptionen"
If AsciiFilterOptionen.Exists(3) then If AsciiFilterOptionen.Exists(3) then
AsciiFilterOptionen.OK AsciiFilterOptionen.OK
@@ -495,11 +531,11 @@ testcase tPDF_Creator
sTemp = left(sTemp, inStr(sTemp, ">")-1) sTemp = left(sTemp, inStr(sTemp, ">")-1)
sTemp2 = "" sTemp2 = ""
for i = 0 to (len(sTemp)/4)-1 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 next i
printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'" printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then 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 endif
iCreatorOffset = iCreatorOffset + len(sTemp) iCreatorOffset = iCreatorOffset + len(sTemp)
' /Producer ' /Producer
@@ -515,21 +551,21 @@ testcase tPDF_Creator
sTemp = left(sTemp, inStr(sTemp, ">")-1) sTemp = left(sTemp, inStr(sTemp, ">")-1)
sTemp2 = "" sTemp2 = ""
for i = 0 to (len(sTemp)/4)-1 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 next i
printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'" printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
if gOOO then if gOOO then
iCreatorOffset = iCreatorOffset + len(sTemp) iCreatorOffset = iCreatorOffset + len(sTemp)
else else
if bAsianLan then if bAsianLan then
iCreatorOffset = iCreatorOffset + 48 iCreatorOffset = iCreatorOffset + 48
if (len(sTemp) <> 48) then if (len(sTemp) <> 48) then
warnlog "Producer is different from 'StarSuite 8'; is: '" & sTemp2 & "'" warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'"
endif endif
else else
iCreatorOffset = iCreatorOffset + 52 iCreatorOffset = iCreatorOffset + 52
if (len(sTemp) <> 52) then 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 endif
endif endif
@@ -544,16 +580,16 @@ testcase tPDF_Creator
editcopy editcopy
sTemp = getClipboardText() sTemp = getClipboardText()
sTemp = left(sTemp, inStr(sTemp, ")")-1) sTemp = left(sTemp, inStr(sTemp, ")")-1)
printlog sTemp & " -- " & len(sTemp) printlog sTemp + " -- " + len(sTemp)
iCreatorOffset = iCreatorOffset + (len(sTemp) - 23) iCreatorOffset = iCreatorOffset + (len(sTemp) - 23)
if (len(sTemp) <> 23) then if (len(sTemp) <> 23) then
warnlog "Date is longer than expected; is: '" & sTemp2 & "'" warnlog "Date is longer than expected; is: '" + sTemp2 + "'"
endif endif
gApplication = sApp gApplication = sApp
call hCloseDocument call hCloseDocument
call hCloseDocument call hCloseDocument
endcase endcase 'tPDF_Creator
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tSVG testcase tSVG
@@ -617,180 +653,220 @@ testcase tSVG
'------------------------/ '------------------------/
call hCloseDocument call hCloseDocument
endcase 'tSVG
endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tBMP testcase tBMP
qaerrorlog qaerrorlog
dim x as integer dim x as integer
dim i as integer dim i as integer
dim bTemp as boolean dim bTemp as boolean
dim sX as string dim sX as string
dim sY as string dim sY as string
dim sx1 as string dim sx1 as string
dim sX2 as string dim sX2 as string
dim sY2 as string dim sY2 as string
dim sDocument 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 hFileOpen sDocument
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
Kontext "BMPOptionen" Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then if BMPOptionen.Exists (2) then
x = Farbaufloesung.GetItemCount '/// check if all properties have the right count, and depend on each other ///'
if x <> 8 then '/// 'Color Resolution' listbox contains eight items ///'
warnlog "Color Resolution Count is wrong; should be:8, is:" & x x = Farbaufloesung.GetItemCount
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 + "'"
'/// 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 <> TRUE then warnlog "'RLE coding' is not checkable :-("
else
if RLEKodierung.IsEnabled <> FALSE then warnlog "'RLE coding' is checkable :-("
endif endif
for i = 1 to x next i
Farbaufloesung.Select i '/// if Mode 'original' is selected, DPI///'
sleep 1 Original.Check
Printlog " - " & i & ": '" &Farbaufloesung.GetSelText & "'" if DPI.IsEnabled then warnlog " :-("
if ((i > 3) AND (i < 8)) then if Breite.IsEnabled then warnlog " :-("
if ( RLEKodierung.IsEnabled() ) then if Hoehe.IsEnabled then warnlog " :-("
warnlog "'RLE coding' is not checkable :-(" Aufloesung.Check
else
warnlog "'RLE coding' is checkable :-("
endif
endif
next i
Original.Check
if DPI.IsEnabled then
warnlog " :-("
endif
if Breite.IsEnabled then
warnlog " :-("
endif
if Hoehe.IsEnabled then
warnlog " :-("
endif
Aufloesung.Check
x = DPI.GetItemCount x = DPI.GetItemCount
if x <> 4 then '/// 'DPI' listbox contains eight items ///'
warnlog "'DPI' Count is wrong; should be:4, is:" & x if x <> 4 then warnlog "'DPI' Count is wrong; should be:4, is:" + x
endif
for i = 1 to x for i = 1 to x
DPI.Select i DPI.Select i
Printlog " - " & i & ": '" &DPI.GetSelText & "'" Printlog " - " + i + ": '" +DPI.GetSelText + "'"
next i next i
if Breite.IsEnabled then if Breite.IsEnabled then warnlog " :-("
warnlog " :-(" if Hoehe.IsEnabled then warnlog " :-("
endif Groesse.Check
if Hoehe.IsEnabled then if DPI.IsEnabled then warnlog " :-("
warnlog " :-("
endif
Groesse.Check
if DPI.IsEnabled then
warnlog " :-("
endif
Breite.More Breite.More
Hoehe.Less Hoehe.Less
Sleep 1 Sleep 1
BMPOptionen.Cancel '/// leave dialog with cancel -> there has to be no file created! ///'
sleep 5 BMPOptionen.Cancel
if ( dir(OutputGrafikTBO&".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed sleep 5
Printlog "ok :-)" if ( dir(OutputGrafikTBO+".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
else Printlog "ok :-)"
warnlog "Dialog was canceled, but file got saved, too :-( - i35177" else
endif warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
else endif
Warnlog "No BMP-Option-Dialog!" else
i=5 Warnlog "No BMP-Option-Dialog!"
end if i=5
sleep 2 end if
Kontext "Active" sleep 2
if Active.Exists(2) then Kontext "Active"
Warnlog "BMP-Exportfilter has a problem" if Active.Exists(2) then
Active.OK Warnlog "BMP-Exportfilter has a problem"
end if Active.OK
end if end if
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then end if
Kontext "BMPOptionen" Printlog "'/// now save it realy and load the file afterwards ///'"
if BMPOptionen.Exists (2) then if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
Farbaufloesung.Select 7 Kontext "BMPOptionen"
RLEKodierung.Check if BMPOptionen.Exists (2) then
Aufloesung.Check Farbaufloesung.Select 7
DPI.Select 3 RLEKodierung.Check
BMPOptionen.OK Aufloesung.Check
sleep 5 DPI.Select 3
endif BMPOptionen.OK
if ( dir(OutputGrafikTBO&".bmp") <> "") then sleep 5
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO&".bmp" & "'" endif
else if ( dir(OutputGrafikTBO+".bmp") <> "") then
warnlog "File didn't get saved :-(" Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+".bmp" + "'"
endif else
hCloseDocument () warnlog "File didn't get saved :-("
sleep 5 endif
hNewDocument() hCloseDocument ()
sleep 5 sleep 5
Call hGrafikEinfuegen ( OutputGrafikTBO&".bmp" ) hNewDocument()
endif sleep 5
hCloseDocument () Call hGrafikEinfuegen ( OutputGrafikTBO+".bmp" )
qaerrorlog "#i93258#" 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
hNewDocument() '' check if the document is writable
hTypeKeys "<TAB>" 'if fIsDocumentWritable = false then
gMouseClick 50, 50 ' ' make the document writable and check if it's succesfull
hRechteckErstellen ( 10, 10, 30, 40 ) ' if fMakeDocumentWritable = false then
if hCallExport (OutputGrafikTBO & "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then ' warnlog "The document can't be make writeable. Test stopped."
Kontext "BMPOptionen" ' goto endsub
if BMPOptionen.Exists (2) then ' endif
Groesse.Check '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
Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then
Groesse.Check
Breite.SetText "9" Breite.SetText "9"
Hoehe.SetText "9" Hoehe.SetText "9"
Groesse.Check 'Press "Size" one more time in order to make the change go through" Groesse.Check 'Press "Size" one more time in order to make the change go through"
sx1 = Breite.GetText sx1 = Breite.GetText
sY = Hoehe.GetText sY = Hoehe.GetText
BMPOptionen.OK BMPOptionen.OK
sleep 5 sleep 5
endif endif
if ( dir(OutputGrafikTBO & "2" & ".bmp") <> "") then if ( dir(OutputGrafikTBO + "2"+".bmp") <> "") then
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & ".bmp" & "'" Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+".bmp" + "'"
else else
warnlog "File didn't get saved :-(" warnlog "File didn't get saved :-("
endif endif
hCloseDocument () hCloseDocument ()
sleep 5 sleep 5
hFileOpen (OutputGrafikTBO & "2" & ".bmp") hFileOpen (OutputGrafikTBO + "2"+".bmp")
kontext "Filterauswahl" kontext "Filterauswahl"
if Filterauswahl.exists then if Filterauswahl.exists then
Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted." Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
Filterauswahl.Cancel Filterauswahl.Cancel
goto endsub goto endsub
endif endif
kontext "DocumentDraw" kontext "DocumentDraw"
DocumentDraw.TypeKeys ("<escape><tab>") DocumentDraw.TypeKeys ("<escape><tab>")
qaerrorlog "#i92902: Export to bmp: bmp options not respected" qaerrorlog "#i92902: Export to bmp: bmp options not respected"
'ContextOriginalSize
endif 'bTemp = FALSE
if hCallExport (OutputGrafikTBO & "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then 'fGetSizeXY sx1, sY, bTemp
Kontext "BMPOptionen" 'if (bTemp = FALSE) then
if BMPOptionen.Exists (2) then ' warnlog "Selected original size NOT OK :-("
Groesse.Check 'endif
endif
if hCallExport (OutputGrafikTBO + "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
Kontext "BMPOptionen"
if BMPOptionen.Exists (2) then
Groesse.Check
sX2 = Breite.GetText sX2 = Breite.GetText
if (LiberalMeasurement(sx1, sX2)) <> TRUE then if (LiberalMeasurement(sx1, sX2)) <> TRUE then
if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) 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 else
warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'" warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
endif endif
endif endif
sY2 = Hoehe.GetText sY2 = Hoehe.GetText
if (LiberalMeasurement(sY, sY2)) <> TRUE then if (LiberalMeasurement(sY, sY2)) <> TRUE then
if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) 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 else
warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'" warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
endif endif
endif endif
BMPOptionen.Cancel BMPOptionen.Cancel
sleep 5 sleep 5
endif endif
endif endif
call hCloseDocument call hCloseDocument
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
@@ -960,8 +1036,8 @@ testcase tEMF
endif endif
call hCloseDocument call hCloseDocument
endcase 'tEMF
endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tMET testcase tMET
@@ -1157,8 +1233,8 @@ testcase tMET
endif endif
call hCloseDocument call hCloseDocument
endcase 'tMET
endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tSWF testcase tSWF
@@ -1182,8 +1258,8 @@ testcase tSWF
endif endif
call hCloseDocument call hCloseDocument
endcase 'tSWF
endcase
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
testcase tWMF testcase tWMF
@@ -1359,6 +1435,6 @@ testcase tWMF
endif endif
call hCloseDocument call hCloseDocument
endcase 'tWMF
endcase
'------------------------------------------------------------------------- '-------------------------------------------------------------------------

View File

@@ -45,329 +45,369 @@ testcase tiFormatArea
Dim Zaehler Dim Zaehler
dim Entf$ dim Entf$
FormatArea hNewDocument '/// New impress document ///'
Kontext hRechteckErstellen (20,20,60,60) '/// create rectangle ///'
active.SetPage TabArea Printlog " - Change Format" '/// change format for the rectangle ///'
Kontext "TabArea" FormatArea
Kontext Kontext
active.SetPage TabSchatten active.SetPage TabArea
kontext "TabSchatten" Kontext "TabArea"
Sleep 3 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" Printlog " - Test various formats"
Kontext FormatArea '/// Format area, check if changes are saved for this object ///'
active.SetPage TabArea Kontext
Kontext "TabArea" active.SetPage TabArea
if NOT FillOptions.GetSelIndex = 5 then Kontext "TabArea"
Warnlog "Bitmap is not checked" if NOT FillOptions.GetSelIndex = 5 then
else Warnlog "Bitmap is not checked"
if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex else
if NOT Tile.IsChecked then Warnlog "Tile is not checked" if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex
' if Original.IsChecked then Warnlog "Original is not checked" if NOT Tile.IsChecked then Warnlog "Tile is not checked"
' if NOT Relativ.IsChecked then Warnlog "Relative is not checked" ' if Original.IsChecked then Warnlog "Original is not checked"
' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText ' if NOT Relativ.IsChecked then Warnlog "Relative is not checked"
' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText ' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText
' if NOT Zeile.IsChecked then Warnlog "Line is not checked" ' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText
' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText ' if NOT Zeile.IsChecked then Warnlog "Line is not checked"
Kontext ' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText
active.SetPage TabSchatten Kontext
kontext "TabSchatten" active.SetPage TabSchatten
if NOT Anzeigen.IsChecked then kontext "TabSchatten"
Warnlog "Show shadows is not checked" if NOT Anzeigen.IsChecked then
else Warnlog "Show shadows is not checked"
if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText else
if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText
end if if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex
end if end if
TabSchatten.Cancel end if
TabSchatten.Cancel
endcase
hCloseDocument '/// close document ///'
endcase 'tiFormatArea
'--------------------------------------------------------
testcase tdFormatArea1 testcase tdFormatArea1
Dim i Dim i
Dim j Dim j
Dim k Dim k
Dim m Dim m
Dim n Dim n
Dim Winkel_1 as string Dim Winkel_1 as string
Dim ZaehlerFarbe Dim ZaehlerFarbe
Dim ZaehlerVerlauf Dim ZaehlerVerlauf
Dim ZaehlerSchraffur Dim ZaehlerSchraffur
Dim ZaehlerBitmap Dim ZaehlerBitmap
Dim ColorName$ Dim ColorName$
ColorName$ = "Bullshit" ColorName$ = "Bullshit"
dim Zaehler as integer dim Zaehler as integer
sleep 3 Call hNewDocument '/// new document ///'
sleep 2 sleep 3
Kontext Call hRechteckErstellen (30,30,70,70) '/// create rectangle ///'
Active.SetPage TabArea sleep 2
Kontext "TabArea" FormatArea '/// format area ///'
sleep 2 Kontext
TabArea.OK Active.SetPage TabArea
sleep 1 Kontext "TabArea"
FormatArea FillOptions.Select 1 '/// Select no fill ///'
Kontext sleep 2
Active.SetPage TabArea TabArea.OK
Kontext "TabArea" sleep 1
ZaehlerVerlauf = GradientList.GetItemCount FormatArea
for j = 1 To 2 Kontext
GradientList.Select j Active.SetPage TabArea
TabArea.OK Kontext "TabArea"
FormatArea sleep 1 '/// control if changes are still there after closing and reopening dialog ///'
Kontext FillOptions.Select 3'/// check gradient and select 1 ///'
Active.SetPage TabArea ZaehlerVerlauf = GradientList.GetItemCount
Kontext "TabArea" for j = 1 To 2
PrintLog GradientList.GetSelText GradientList.Select j
next j TabArea.OK
HatchingList.GetItemCount FormatArea
ZaehlerSchraffur = HatchingList.GetItemCount Kontext
for k=1 to 2'ZaehlerSchraffur Active.SetPage TabArea
HatchingList.Select k Kontext "TabArea"
TabArea.OK PrintLog GradientList.GetSelText
FormatArea next j
Kontext FillOptions.Select 4 '/// select hatching, control after closing and reopening dialog if changes are recognized ///'
Active.SetPage TabArea HatchingList.GetItemCount
Kontext "TabArea" ZaehlerSchraffur = HatchingList.GetItemCount
PrintLog HatchingList.GetSelText for k=1 to 2'ZaehlerSchraffur
next k HatchingList.Select k
TabArea.OK
FormatArea
Kontext
Active.SetPage TabArea
Kontext "TabArea"
PrintLog HatchingList.GetSelText
next k
BitmapList.GetItemCount FillOptions.Select 5 '/// check bitmap, control if changes are permanent after closing and reopening dialog ///'
ZaehlerBitmap = BitmapList.GetItemCount BitmapList.GetItemCount
for n=1 to ZaehlerBitmap ZaehlerBitmap = BitmapList.GetItemCount
BitmapList.Select n for n=1 to ZaehlerBitmap
TabArea.OK BitmapList.Select n
FormatArea TabArea.OK
sleep 1 FormatArea
Kontext sleep 1
Active.SetPage TabArea Kontext
Kontext "TabArea" Active.SetPage TabArea
PrintLog BitmapList.GetSelText Kontext "TabArea"
next n PrintLog BitmapList.GetSelText
next n
' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated" if Tile.IsChecked = False Then Tile.Check '/// check tile ///'
' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated" ' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated"
' if Relativ.IsChecked = False Then ' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated"
' SetClipboard Breite.GetText ' if Relativ.IsChecked = False Then
' Relativ.Check ' SetClipboard Breite.GetText
' If Breite.GetText = GetClipboardText Then ' Relativ.Check
' WarnLog " Relative isnt working" ' If Breite.GetText = GetClipboardText Then
' else ' WarnLog " Relative isnt working"
' PrintLog " Relative works" ' else
' end if ' PrintLog " Relative works"
' end if ' end if
' ' end if
' if Kacheln.IsChecked = True Then Kacheln.UnCheck '
' Anpassen.Check ' if Kacheln.IsChecked = True Then Kacheln.UnCheck
' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden" ' Anpassen.Check
' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert" ' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden"
' Anpassen.Uncheck ' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert"
' Original.Check ' Anpassen.Uncheck
' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht" ' Original.Check
' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert" ' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht"
' Kacheln.Check ' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert"
' setClipboard XOffset.GetText ' Kacheln.Check
' XOffset.More 3 ' setClipboard XOffset.GetText
' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert" ' XOffset.More 3
' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht" ' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert"
' SetClipboard YOffset.GetText ' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht"
' YOffset.More 5 ' SetClipboard YOffset.GetText
' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert" ' YOffset.More 5
' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht" ' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert"
' PrintLog " TabArea fertig" ' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht"
Kontext ' PrintLog " TabArea fertig"
Active.SetPage TabSchatten Kontext
Kontext "TabSchatten" Active.SetPage TabSchatten
sleep 1 Kontext "TabSchatten"
sleep 1 sleep 1
PrintLog " Show shadow works" if Anzeigen.IsChecked = True Then Anzeigen.UnCheck '/// uncheck shadow ///'
else sleep 1
WarnLog " Show shadow does not work" if Entfernung.IsEnabled = False Then '/// check if shadow related controls are disabled with no shadow ///'
end if PrintLog " Show shadow works"
else
WarnLog " Show shadow does not work"
end if
Entfernung.More 4 Anzeigen.Check '/// check shadow ///'
if GetClipboardText = Entfernung.GetText Then SetClipboard Entfernung.GetText '/// change distance ///'
WarnLog " Distance does not work" Entfernung.More 4
else if GetClipboardText = Entfernung.GetText Then
PrintLog " Distance does work" WarnLog " Distance does not work"
end if else
PrintLog " Distance does work"
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
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
WarnLog " Color selection not changed"
end if
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
Farbmodell.Select 1
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"
B.SetText "90"
catch
warnlog "RGB text fields are not enabled :-("
endcatch
Aendern.Click
TabFarben.OK
Kontext "DocumentDraw"
FormatArea
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
if (R.GetText = "50" And G.GetText = "10" And B.GetText = "90") Then
PrintLog "Changes in RGB done"
else
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
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
TabFarben.OK
FormatArea
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
TabFarben.OK
FormatArea
Kontext
Active.SetPage TabFarbverlaeufe
Kontext "TabFarbverlaeufe"
TabFarbverlaeufe.OK
sleep 2
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 FormatArea
Kontext sleep 2
Active.SetPage TabArea Kontext
Kontext "TabArea" Active.SetPage TabTransparenz
FillOptions.Select 2 Kontext "TabTransparenz"
if ColourList.GetSelText = "Bullshit" Then KeineTransparenz.Check '/// check if controls are disabled if transparence is disabled ///'
PrintLog " Color selection changed " Printlog "- No transparency is checked, all controls should be disabled."
else if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled"
WarnLog " Color selection not changed" if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled"
end if if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled"
Kontext if MFZentrumY.IsEnabled Then Warnlog "- Center Y enabled"
Active.SetPage TabFarben if MFWinkel.IsEnabled Then Warnlog "- Angle enabled"
Kontext "TabFarben" if MFRand.IsEnabled Then Warnlog "- Border enabled"
Farbmodell.Select 1 if MFStartwert.IsEnabled Then Warnlog "- Start value enabled"
if MFEndwert.IsEnabled Then Warnlog "- End value enabled"
Kontext LineareTransparenz.Check '/// check linear tranparency ///'
Kontext "TabFarben" Printlog "- Set transparency to linear, all controls should be enabled now" '/// control if related controls are now enabled ///'
printlog " Selected colourmodel RGB?: "+Farbmodell.GetSelText sleep 1
if left(Farbmodell.GetSelText,1) <> "R" then warnlog "not RGB selected ? :-(" MFLinTransparenz.ToMax '/// change values of controls ///'
try if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct"
R.SetText "50" MFLinTransparenz.ToMin
G.SetText "10" if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct"
B.SetText "90" if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Gradient enabled"
catch if MFZentrumX.IsEnabled Then Warnlog "- Centrum X enabled"
warnlog "RGB text fields are not enabled :-(" if MFZentrumY.IsEnabled Then Warnlog "- Centrum Y enabled"
endcatch if MFWinkel.IsEnabled Then Warnlog "- Angle enabled"
Aendern.Click if MFRand.IsEnabled Then Warnlog "- Border enabled"
TabFarben.OK if MFStartwert.IsEnabled Then Warnlog "- Start value enabled"
Kontext "DocumentDraw" if MFEndwert.IsEnabled Then Warnlog "- End value enabled"
Transparenzverlauf.Check
Printlog "- Gradient for transprency enabled"
if MFLinTransparenz.IsEnabled = "false" Then Warnlog "- Transparency disabled"
if TransparenzverlaufTyp.IsEnabled = "false" Then Warnlog "- Gradient disabled"
if MFZentrumX.IsEnabled = "false" Then Warnlog "- Center X disabled"
if MFZentrumY.IsEnabled = "false" Then Warnlog "- Center Y disabled"
if MFWinkel.IsEnabled = "false" Then Warnlog "- Anlge disabled"
if MFRand.IsEnabled = "false" Then Warnlog "- Border disabled"
if MFStartwert.IsEnabled = "false" Then Warnlog "- Start value disabled"
if MFEndwert.IsEnabled = "false" Then Warnlog "- End value disabled"
Printlog "- Check if changed values are saved"
Zaehler=TransparenzverlaufTyp.GetItemCount
for i=1 to Zaehler
TransparenzverlaufTyp.Select i
SetClipboard Transparenzverlauftyp.GetSelText
TabTransparenz.OK
sleep 2
FormatArea FormatArea
Kontext sleep 1
Active.SetPage TabFarben Kontext
Kontext "TabFarben" Active.SetPage TabTransparenz '/// check if values are saved after closing and reopening dialog ///'
if (R.GetText = "50" And G.GetText = "10" And B.GetText = "90") Then Kontext "TabTransparenz"
PrintLog "Changes in RGB done" if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency"
else next i
WarnLog " Chancges in RGB values not recognized, instead of R=50 , G=10 und B=90 it is " +R.GetText + " " + G.GetText + " " + B.GetText TransparenzverlaufTyp.Select 2
if MFZentrumX.IsEnabled Then Warnlog "- Center X should not be enabled"
if MFZentrumY.IsEnabled Then Warnlog "- Center Y should not be enabled"
MFWinkel.SetText "45"
Winkel_1 = MFWinkel.GetText
TabTransparenz.OK
sleep 2
FormatArea
sleep 2
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
if TransparenzverlaufTyp.GetSelIndex <>2 Then
Warnlog "- Second menu-item is not choosen"
end if end if
Farbe.Select 10 TransparenzverlaufTyp.Select 3
Hinzufuegen.Click if MFWinkel.GetText <> Winkel_1 then Warnlog "- The inserted value is not accepted"
Farbe.Select "Brighter" if MFWinkel.GetText <> Winkel_1 Then TransparenzverlaufTyp.Select 3
Kontext "Active" if MFWinkel.IsEnabled Then Warnlog " - Angle should not be active when Radial is choosen"
Active.Yes sleep 1
Kontext MFZentrumX.SetText "30"
Active.SetPage TabFarben MFZentrumY.SetText "30"
Kontext "TabFarben" TabTransparenz.OK
Kontext "FarbeDlg"
FarbeDlg.OK
sleep 2 sleep 2
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
TabFarben.OK
FormatArea
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
TabFarben.OK
FormatArea
Kontext
Active.SetPage TabFarbverlaeufe
Kontext "TabFarbverlaeufe"
TabFarbverlaeufe.OK
sleep 2
FormatArea FormatArea
sleep 2 sleep 2
Kontext Kontext
Active.SetPage TabTransparenz Active.SetPage TabTransparenz
Kontext "TabTransparenz" Kontext "TabTransparenz"
Printlog "- No transparency is checked, all controls should be disabled." if MFZentrumX.GetText <> "30%" Then Warnlog "- Setted value for Center X is not applied."
if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled" if MFZentrumY.GetText <> "30%" Then Warnlog "- Setted value for Center Y is not applied."
if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled" MFRand.SetText "10"
if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled" MFStartwert.SetText "20"
if MFZentrumY.IsEnabled Then Warnlog "- Center Y enabled" MFEndwert.SetText "30"
if MFWinkel.IsEnabled Then Warnlog "- Angle enabled" TabTransparenz.OK
if MFRand.IsEnabled Then Warnlog "- Border enabled" sleep 2
if MFStartwert.IsEnabled Then Warnlog "- Start value enabled" FormatArea
if MFEndwert.IsEnabled Then Warnlog "- End value enabled" sleep 2
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
if MFRand.GetText <> "10%" Then Warnlog "- Border-value was not set."
if MFEndwert.GetText <> "30%" Then Warnlog "- End-value was not set."
if MFStartwert.GetText <> "20%" Then Warnlog "- Start-value was not set."
TabTransparenz.OK
sleep 1 Call hCloseDocument '/// close document ///'
if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct"
MFLinTransparenz.ToMin
if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct"
if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Gradient enabled"
if MFZentrumX.IsEnabled Then Warnlog "- Centrum X enabled"
if MFZentrumY.IsEnabled Then Warnlog "- Centrum Y enabled"
if MFWinkel.IsEnabled Then Warnlog "- Angle enabled"
if MFRand.IsEnabled Then Warnlog "- Border enabled"
if MFStartwert.IsEnabled Then Warnlog "- Start value enabled"
if MFEndwert.IsEnabled Then Warnlog "- End value enabled"
Transparenzverlauf.Check endcase 'tdFormatArea1
Printlog "- Gradient for transprency enabled"
if MFLinTransparenz.IsEnabled = "false" Then Warnlog "- Transparency disabled"
if TransparenzverlaufTyp.IsEnabled = "false" Then Warnlog "- Gradient disabled"
if MFZentrumX.IsEnabled = "false" Then Warnlog "- Center X disabled"
if MFZentrumY.IsEnabled = "false" Then Warnlog "- Center Y disabled"
if MFWinkel.IsEnabled = "false" Then Warnlog "- Anlge disabled"
if MFRand.IsEnabled = "false" Then Warnlog "- Border disabled"
if MFStartwert.IsEnabled = "false" Then Warnlog "- Start value disabled"
if MFEndwert.IsEnabled = "false" Then Warnlog "- End value disabled"
Printlog "- Check if changed values are saved"
Zaehler=TransparenzverlaufTyp.GetItemCount
for i=1 to Zaehler
TransparenzverlaufTyp.Select i
SetClipboard Transparenzverlauftyp.GetSelText
TabTransparenz.OK
sleep 2
FormatArea
sleep 1
Kontext
Kontext "TabTransparenz"
if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency"
next i
TransparenzverlaufTyp.Select 2
if MFZentrumX.IsEnabled Then Warnlog "- Center X should not be enabled"
if MFZentrumY.IsEnabled Then Warnlog "- Center Y should not be enabled"
MFWinkel.SetText "45"
Winkel_1 = MFWinkel.GetText
TabTransparenz.OK
sleep 2
FormatArea
sleep 2
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
if TransparenzverlaufTyp.GetSelIndex <>2 Then
Warnlog "- Second menu-item is not choosen"
end if
TransparenzverlaufTyp.Select 3
if MFWinkel.GetText <> Winkel_1 then Warnlog "- The inserted value is not accepted"
if MFWinkel.GetText <> Winkel_1 Then TransparenzverlaufTyp.Select 3
if MFWinkel.IsEnabled Then Warnlog " - Angle should not be active when Radial is choosen"
sleep 1
MFZentrumX.SetText "30"
MFZentrumY.SetText "30"
TabTransparenz.OK
sleep 2
FormatArea
sleep 2
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
if MFZentrumX.GetText <> "30%" Then Warnlog "- Setted value for Center X is not applied."
if MFZentrumY.GetText <> "30%" Then Warnlog "- Setted value for Center Y is not applied."
MFRand.SetText "10"
MFStartwert.SetText "20"
MFEndwert.SetText "30"
TabTransparenz.OK
sleep 2
FormatArea
sleep 2
Kontext
Active.SetPage TabTransparenz
Kontext "TabTransparenz"
if MFRand.GetText <> "10%" Then Warnlog "- Border-value was not set."
if MFEndwert.GetText <> "30%" Then Warnlog "- End-value was not set."
if MFStartwert.GetText <> "20%" Then Warnlog "- Start-value was not set."
TabTransparenz.OK
endcase

View File

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

View File

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

View File

@@ -50,15 +50,15 @@ testcase tiEditUndo
Dim sDatei as string Dim sDatei as string
Dim Ueber_Text_1 as string Dim Ueber_Text_1 as string
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
end if end if
sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
hFileOpen ConvertPath (sDatei) hFileOpen ConvertPath (sDatei)
sleep 5 sleep 5
printlog "Checking for readonly state. If so, make it editable." printlog "Checking for readonly state. If so, make it editable."
@@ -69,16 +69,18 @@ testcase tiEditUndo
ContextPositionAndSize ContextPositionAndSize
Kontext Kontext
if Messagebox.exists (5) then if Messagebox.exists (5) then
Messagebox.SetPage TabPositionAndSize Messagebox.SetPage TabPositionAndSize
else else
print "what" print "what"
endif endif
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
Ueber_Text_1=PositionX.GetText '/// defining variable for original position of object ///'
TabPositionAndSize.Cancel TabPositionAndSize.Cancel
sleep 2 sleep 2
Kontext "Toolbar" Kontext "Toolbar"
Auswahl.Click Auswahl.Click
sleep 1 sleep 1
ContextArrangeBringBackward '/// Bring Object backward ///'
sleep 1 sleep 1
gMouseClick 60,60 gMouseClick 60,60
sleep 1 sleep 1
@@ -89,51 +91,56 @@ testcase tiEditUndo
Kontext "Toolbar" Kontext "Toolbar"
Auswahl.Click Auswahl.Click
sleep 1 sleep 1
ContextPositionAndSize '/// Open Position and Size dialog, checking position ///'
Kontext Kontext
Messagebox.SetPage TabPositionAndSize Messagebox.SetPage TabPositionAndSize
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
if PositionX=0 Then Warnlog " Command was not completely executed, and it could not be undone." if PositionX=0 Then Warnlog " Command was not completely executed, and it could not be undone."
TabPositionAndSize.Cancel TabPositionAndSize.Cancel
sleep 2 sleep 2
gMouseClick 60,60 gMouseClick 60,60
sleep 1 sleep 1
Sleep 2 EditUndo '/// Edit Undo for BringBackward ///'
gMouseClick 60,60 Sleep 2
sleep 1 gMouseClick 60,60
Kontext "Toolbar" sleep 1
Auswahl.Click Kontext "Toolbar"
hTypeKeys "<TAB><TAB>" Auswahl.Click
sleep 1 hTypeKeys "<TAB><TAB>"
Kontext "Toolbar" sleep 1
Auswahl.Click Kontext "Toolbar"
kontext Auswahl.Click
Messagebox.SetPage TabPositionAndSize ContextPositionAndSize '/// Again checking position using Position and Size dialog ///'
kontext "TabPositionAndSize" kontext
if PositionX.GetText = Ueber_Text_1 then Messagebox.SetPage TabPositionAndSize
printlog "OK, last order could be redone" kontext "TabPositionAndSize"
else if PositionX.GetText = Ueber_Text_1 then
warnlog "Last order could not be redone" printlog "OK, last order could be redone"
end if else
TabPositionAndSize.Cancel warnlog "Last order could not be redone"
end if
TabPositionAndSize.Cancel
Call hCloseDocument '/// Close document ///'
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiEditRedo testcase tiEditRedo
Dim Datei$ Dim Datei$
Dim Ueber_Text_1 Dim Ueber_Text_1
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
end if end if
Datei$ = gTesttoolPath + "graphics\required\input\leer."+ExtensionString Datei$ = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
hFileOpen ConvertPath (Datei$) '/// Open test document (leer.od?) ///'
sleep 3 sleep 3
' check if the document is writable ' check if the document is writable
if fIsDocumentWritable = false then if fIsDocumentWritable = false then
@@ -158,6 +165,7 @@ testcase tiEditRedo
sleep 1 sleep 1
hTypeKeys "<TAB>" hTypeKeys "<TAB>"
sleep 1 sleep 1
ContextArrangeBringBackward '/// move object behind other object ///'
sleep 1 sleep 1
gMouseClick 60,60 gMouseClick 60,60
sleep 1 sleep 1
@@ -166,38 +174,44 @@ testcase tiEditRedo
ContextPositionAndSize ContextPositionAndSize
sleep 1 sleep 1
Kontext Kontext
Messagebox.SetPage TabPositionAndSize '/// checking new position values ///'
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone" if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone"
TabPositionAndSize.Cancel TabPositionAndSize.Cancel
sleep 1 sleep 1
gMouseClick 60,60 gMouseClick 60,60
sleep 1 EditUndo '/// Edit Undo///'
hTypeKeys "<TAB>" sleep 1
sleep 1 hTypeKeys "<TAB>"
ContextPositionAndSize sleep 1
sleep 1 ContextPositionAndSize
kontext sleep 1
kontext "TabPositionAndSize" kontext
if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either" Messagebox.SetPage TabPositionAndSize '/// checking again position ///'
TabPositionAndSize.Cancel kontext "TabPositionAndSize"
sleep 2 if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either"
sleep 2 TabPositionAndSize.Cancel
gMouseClick 60,60 sleep 2
sleep 2 EditRedo '/// Edit Redo ///'
hTypeKeys "<TAB>" sleep 2
sleep 2 gMouseClick 60,60
ContextPositionAndSize sleep 2
sleep 1 hTypeKeys "<TAB>"
kontext sleep 2
Messagebox.SetPage TabPositionAndSize ContextPositionAndSize
kontext "TabPositionAndSize" sleep 1
printlog "Action Undo repeated" kontext
else Messagebox.SetPage TabPositionAndSize
warnlog "Action Undo not repeated" kontext "TabPositionAndSize"
end if if PositionX.GetText <> Ueber_Text_1 then '/// checking position ///'
TabPositionAndSize.OK printlog "Action Undo repeated"
sleep 1 else
sleep 1 warnlog "Action Undo not repeated"
end if
TabPositionAndSize.OK
sleep 1
call hCloseDocument '/// close document ///'
sleep 1
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
@@ -205,64 +219,81 @@ testcase tiEditClipboard
Dim Ueber_Text_4 as string Dim Ueber_Text_4 as string
dim sTemp as string dim sTemp as string
'/// open application ///'
Call hNewDocument Call hNewDocument
sleep 1 sleep 1
SetClipboard "" SetClipboard ""
'/// Create rectangle ///'
Call hRechteckErstellen ( 65, 65, 80, 80 ) Call hRechteckErstellen ( 65, 65, 80, 80 )
sleep 1 sleep 1
'///+ RightClick onto rectangle///'
gMouseClick 70,70 gMouseClick 70,70
sleep 1 sleep 1
Ueber_Text_4 = fGetPositionX() '/// Get values for position variables ///'
Sleep 1 Sleep 1
'/// <b> Edit->Copy </b> ///'
EditCopy EditCopy
'///+ Type Key [Deletee] ///'
hTypeKeys "<DELETE>" hTypeKeys "<DELETE>"
'///+ <i> Edit->Paste </i> ///'
EditPaste EditPaste
sleep 1 sleep 1
'///+ Edit->Select All ///'
EditSelectAll EditSelectAll
sTemp = fGetPositionX() sTemp = fGetPositionX()
printlog "OK EditCopy and EditPaste" if LiberalMeasurement(sTemp, Ueber_Text_4) then '/// TabPositionAndSize: comparing position with original position ///'
else printlog "OK EditCopy and EditPaste"
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'" else
end if warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
sleep 1 end if
hTypeKeys "<escape>" sleep 1
EditSelectAll '/// Type Keys [escape], + EditSelectAll (to deselect object and to select again) ///'
sleep 2 hTypeKeys "<escape>"
EditCut EditSelectAll
sleep 1 sleep 2
hTypeKeys "<TAB>" '/// <b> Edit->Cut </b>///'
try EditCut
ContextPositionAndSize sleep 1
kontext hTypeKeys "<TAB>"
Messagebox.SetPage TabPositionAndSize try
Kontext "TabPositionAndSize" '///+ - Format->Position And Size -> HAS TO FAIL / IS NOT AVAILABLE !!! '///'
if TabPositionAndSize.NOTexists then ContextPositionAndSize
warnlog "TabPositionAndSize isn't up ?!!" kontext
endif '///+ - select TabPage 'Position And Size' ///'
TabPositionAndSize.Ok Messagebox.SetPage TabPositionAndSize
warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!" Kontext "TabPositionAndSize"
catch if TabPositionAndSize.NOTexists then
Printlog " - There is no object in the document anymore :-)" warnlog "TabPositionAndSize isn't up ?!!"
endcatch endif
sleep 1 '///+ - Ok dialog 'Position And Size' ///'
EditPaste TabPositionAndSize.Ok
sleep 2 warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!"
sTemp = fGetPositionX() catch
if LiberalMeasurement(sTemp, Ueber_Text_4) then Printlog " - There is no object in the document anymore :-)"
printlog "OK Edit paste" endcatch
else sleep 1
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'" '///+ <i> Edit->Paste </i> ///'
end if EditPaste
sleep 3 sleep 2
Call hCloseDocument sTemp = fGetPositionX()
if LiberalMeasurement(sTemp, Ueber_Text_4) then
printlog "OK Edit paste"
else
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
end if
sleep 3
'/// close application ///'
Call hCloseDocument
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiEditPasteSpecial_HTML testcase tiEditPasteSpecial_HTML
dim Zaehler as integer dim Zaehler as integer
Kontext "Standardbar" Kontext "Standardbar"
sleep 1 sleep 1
Call hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\frame1.htm") '/// Load html document ///'
sleep 5 sleep 5
autoexecute=false autoexecute=false
Kontext "DocumentWriter" Kontext "DocumentWriter"
@@ -271,137 +302,173 @@ testcase tiEditPasteSpecial_HTML
autoexecute=true autoexecute=true
EditSelectAll EditSelectAll
sleep 3 sleep 3
EditCopy '/// Copy selection ///'
Sleep 2 Sleep 2
FileClose '/// Close document ///'
sleep 3 sleep 3
Call hNewDocument '/// Create new Impress document ///'
sleep 1 sleep 1
EditPasteSpecial '/// Edit paste special ///'
sleep 1 sleep 1
Kontext "InhaltEinfuegen" Kontext "InhaltEinfuegen"
For Zaehler = 1 to Auswahl.GetItemCount For Zaehler = 1 to Auswahl.GetItemCount
Auswahl.select Zaehler Auswahl.select Zaehler
printlog Zaehler, ". Selection = ", Auswahl.GetSelText printlog Zaehler, ". Selection = ", Auswahl.GetSelText
next Zaehler next Zaehler
warnlog "formats for inserting Html <> 4" if Auswahl.GetItemCount <> 4 then '/// Controlling number of possible formats ///'
else warnlog "formats for inserting Html <> 4"
printlog "OK 4 formats for HTML-Document" else
end if printlog "OK 4 formats for HTML-Document"
end if
sleep 3
sleep 3 sleep 3
try InhaltEinfuegen.OK '/// Paste clipboard content ///'
catch sleep 3
Warnlog "- Nothing inserted into document" try
endcatch EditCopy '/// Copy object back into clipboard ///'
sleep 3 catch
sleep 3 Warnlog "- Nothing inserted into document"
endcatch
sleep 3
Call hCloseDocument '/// Close document ///'
sleep 3
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tdEditPasteSpecial_Text testcase tdEditPasteSpecial_Text
printlog "Insert 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 sleep 1
Kontext "InhaltEinfuegen" Kontext "InhaltEinfuegen"
Auswahl.Select 1 '/// select list entree 1 ///'
printlog "Selection = ", Auswahl.GetSelText printlog "Selection = ", Auswahl.GetSelText
sleep 1 sleep 1
if Auswahl.GetItemCount <> 1 then if Auswahl.GetItemCount <> 1 then
warnlog "Selectionformat <> 1" warnlog "Selectionformat <> 1"
else else
printlog "Format Text OK" printlog "Format Text OK"
end if end if
InhaltEinfuegen.OK '/// close dialog ///'
sleep 1 sleep 1
Call hCloseDocument '/// close document ///'
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tdEditPasteSpecial_Graphic testcase tdEditPasteSpecial_Graphic
dim Zaehler as integer dim Zaehler as integer
call hNewDocument '/// ^new document ///'
printlog "Insert graphic file" printlog "Insert graphic file"
InsertGraphicsFromFile '/// insert graphic (sample.bmp)///'
Kontext "GrafikEinfuegenDlg" Kontext "GrafikEinfuegenDlg"
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
Oeffnen.Click Oeffnen.Click
sleep 1 sleep 1
EditSelectAll '/// select graphic ///'
EditCut '/// cut graphic ///'
EditPasteSpecial '/// edit paste special ///'
sleep 1 sleep 1
Kontext "InhaltEinfuegen" Kontext "InhaltEinfuegen"
For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
Auswahl.select Zaehler Auswahl.select Zaehler
printlog Zaehler, ". Selection = ", Auswahl.GetSelText printlog Zaehler, ". Selection = ", Auswahl.GetSelText
next Zaehler next Zaehler
warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///'
else warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount
printlog "There are " + Auswahl.GetItemCount + " formats for graphic files" else
end if printlog "There are " + Auswahl.GetItemCount + " formats for graphic files"
gMouseClick 90,90 end if
sleep 1 InhaltEinfuegen.OK '/// insert graphic from clipboard ///'
gMouseClick 90,90
sleep 1
Call hCloseDocument '/// close document ///'
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tdEditPasteSpecial_Circle testcase tdEditPasteSpecial_Circle
dim Zaehler as integer dim Zaehler as integer
sleep 5 call hNewDocument '/// new document ///'
Kontext "Toolbar" sleep 5
Ellipsen.Click printlog "Insert circle" '/// create circle ///'
sleep 3 Kontext "Toolbar"
gMouseMove (20,20,80,80) Ellipsen.Click
sleep 1 sleep 3
hTypeKeys "<escape>" gMouseMove (20,20,80,80)
sleep 2 sleep 1
sleep 5 hTypeKeys "<escape>"
sleep 1 sleep 2
sleep 1 EditSelectAll '/// select circle ///'
Kontext "InhaltEinfuegen" sleep 5
Auswahl.select Zaehler EditCut '/// cut circle ///'
printlog Zaehler, ". Selection = ", Auswahl.GetSelText sleep 1
next Zaehler EditPasteSpecial '/// edit paste special ///'
warnlog "Number of possible formats <> 4" sleep 1
else Kontext "InhaltEinfuegen"
printlog "There are 4 formats for circle" if EinfuegenAls.IsVisible Then EinfuegenAls.Check '/// check "EinfuegenAls" ///'
end if For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
sleep 1 Auswahl.select Zaehler
sleep 1 printlog Zaehler, ". Selection = ", Auswahl.GetSelText
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 endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiEditPasteSpecial testcase tiEditPasteSpecial
dim i as integer dim i as integer
dim x as integer dim x as integer
' warnlog "TODOTBO: from draw, impress, math..." ' warnlog "TODOTBO: from draw, impress, math..."
gApplication = "WRITER" '/// go into writer, type a text, select all, Edit->Cut, close writer ///'
call hNewDocument '/// go into application to test, insert every format you can get from Edit->Paste->Special :-) ///'
kontext "DocumentWriter" gApplication = "WRITER"
DocumentWriter.TypeKeys "abc<shift home>" call hNewDocument
editcut kontext "DocumentWriter"
call hCloseDocument DocumentWriter.TypeKeys "abc<shift home>"
gApplication = "IMPRESS" editcut
call hNewDocument call hCloseDocument
sleep 1 gApplication = "IMPRESS"
call hNewDocument
sleep 1
Printlog " get count of possibilities: " Printlog " get count of possibilities: "
EditPasteSpecial EditPasteSpecial
sleep 1 sleep 1
Kontext "InhaltEinfuegen" Kontext "InhaltEinfuegen"
x = Auswahl.GetItemCount x = Auswahl.GetItemCount
for i = 1 to x for i = 1 to x
printlog " - " + i + " - " + Auswahl.GetItemText (i) printlog " - " + i + " - " + Auswahl.GetItemText (i)
next i next i
InhaltEinfuegen.Cancel InhaltEinfuegen.Cancel
Printlog " insert every possibility" Printlog " insert every possibility"
for i = 1 to x for i = 1 to x
Printlog " - processing number: "+i Printlog " - processing number: "+i
EditPasteSpecial EditPasteSpecial
sleep 1 sleep 1
Kontext "InhaltEinfuegen" Kontext "InhaltEinfuegen"
Auswahl.Select i Auswahl.Select i
sleep 1 sleep 1
InhaltEinfuegen.OK InhaltEinfuegen.OK
sleep 1 sleep 1
next i next i
Call hCloseDocument '/// close document ///'
endcase endcase
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------

View File

@@ -58,257 +58,315 @@
' Call tdContextConvertIntoMetaFile ' Call tdContextConvertIntoMetaFile
testcase tiModifyConvertToPolygon testcase tiModifyConvertToPolygon
Dim PosX as string Dim PosX as string
Dim PosY as string Dim PosY as string
Dim Maxanzahl as string Dim Maxanzahl as string
Dim Minanzahl as string Dim Minanzahl as string
Call hNewDocument Call hNewDocument
sleep 3 sleep 3
hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30) hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30)
sleep 1 sleep 1
hTypeKeys "<Escape>" hTypeKeys "<Escape>"
sleep 1 sleep 1
EditSelectAll EditSelectAll
sleep 1 sleep 1
ContextConvertIntoPolygon ContextConvertIntoPolygon
sleep 1 sleep 1
ContextPositionAndSize ContextPositionAndSize
Kontext Kontext
Active.SetPage TabPositionAndSize Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
PosX = Width.GetText PosX = Width.GetText
PosY = Height.GetText PosY = Height.GetText
TabPositionAndSize.OK TabPositionAndSize.OK
sleep 1 sleep 1
FormatCharacter FormatCharacter
Kontext Kontext
Active.SetPage TabFont Active.SetPage TabFont
Kontext "TabFont" Kontext "TabFont"
sleep 1 sleep 1
try try
Size.SetText "96" Size.SetText "96"
catch catch
if (gAsianSup OR gCTLSup) then if (gAsianSup OR gCTLSup) then
try try
SizeWest.SetText "96" SizeWest.SetText "96"
catch catch
Warnlog "Asian or ctl support is enabled, but Size of font is not accessable :-(" Warnlog "Asian or ctl support is enabled, but Size of font is not accessable :-("
endcatch endcatch
else else
Warnlog "Asian or ctl support is NOT enabled, but Size of font is not accessable :-(" Warnlog "Asian or ctl support is NOT enabled, but Size of font is not accessable :-("
try try
SizeWest.SetText "96" SizeWest.SetText "96"
qaErrorLog "SizeWest. works" qaErrorLog "SizeWest. works"
catch catch
endcatch endcatch
try try
SizeEast.SetText "96" SizeEast.SetText "96"
qaErrorLog "SizeEast. works" qaErrorLog "SizeEast. works"
catch catch
endcatch endcatch
try try
Size.SetText "96" Size.SetText "96"
qaErrorLog "Size. works" qaErrorLog "Size. works"
catch catch
endcatch endcatch
try try
SizeCTL.SetText "96" SizeCTL.SetText "96"
qaErrorLog "SizeCTL. works" qaErrorLog "SizeCTL. works"
catch catch
endcatch endcatch
endif endif
endcatch endcatch
TabFont.OK TabFont.OK
sleep 1 sleep 1
ContextPositionAndSize ContextPositionAndSize
Kontext Kontext
Active.SetPage TabPositionAndSize Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
if ( Width.GetText = PosX or Height.GetText = PosY ) Then '/// compare width and heigth to control is it is still text ///'
Printlog "- Text converted into polygon" if ( Width.GetText = PosX or Height.GetText = PosY ) Then
else Printlog "- Text converted into polygon"
Warnlog "- Convert into polygon does not work." else
end if Warnlog "- Convert into polygon does not work."
TabPositionAndSize.OK end if
sleep 1 TabPositionAndSize.OK
sleep 1
Call hCloseDocument Call hCloseDocument
Printlog "-------------------------------------------------end" Printlog "-------------------------------------------------end"
Call hNewDocument
sleep 3
Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" )
sleep 3
ContextConvertIntoPolygon
Kontext "UmwandelnInPolygon"
Farbanzahl.ToMax
MaxAnzahl = Farbanzahl.GetText
Farbanzahl.More 1
If Maxanzahl < Farbanzahl.GetText Then Warnlog "- Maximum value could be raised."
MinAnzahl = Farbanzahl.GetText
If Farbanzahl.GetText < Minanzahl then Warnlog "- Minimum value could be lowered."
Farbanzahl.SetText "2"
Vorschau.Click
sleep 5
UmwandelnInPolygon.OK
sleep 5
Printlog "- object vectorized."
'TBO: verify nasty bug about asian/ctl support
ToolsOptions
call hToolsOptions ("Languagesettings", "Languages")
printlog "Asian: '" + Aktivieren.IsChecked + "'"
printlog "CTL : '" + ComplexScriptEnabled.IsChecked + "'"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
'-----------------------------------------------
Call hCloseDocument
endcase
Call hNewDocument
sleep 3
'/// insert graphic (input\\impress\\grafik\\sample.bmp)///'
Call hGrafikEinfuegen ConvertPath ( gTesttoolPath + "global\input\graf_inp\enter.bmp" )
sleep 3
ContextConvertIntoPolygon
Kontext "UmwandelnInPolygon"
Farbanzahl.ToMax
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
sleep 5
UmwandelnInPolygon.OK
sleep 5
Printlog "- object vectorized."
'TBO: verify nasty bug about asian/ctl support
ToolsOptions
call hToolsOptions ("Languagesettings", "Languages")
printlog "Asian: '" + Aktivieren.IsChecked + "'"
printlog "CTL : '" + ComplexScriptEnabled.IsChecked + "'"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
'-----------------------------------------------
Call hCloseDocument
endcase 'tiModifyConvertToPolygon
'--------------------------------------------------------
testcase tdContextConvertIntoBitmap testcase tdContextConvertIntoBitmap
sleep 3
sleep 3 Call hNewDocument '/// new document ///'
kontext "Active" sleep 3
InsertGraphicsFromFile '/// insert graphic ///'
sleep 3
kontext "Active"
if Active.Exists Then if Active.Exists Then
Active.OK Active.OK
end if end if
sleep 5 sleep 5
Kontext "GrafikEinfuegenDlg" Kontext "GrafikEinfuegenDlg"
sleep 2 sleep 2
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf") '/// uses input\\impress\\grafik\\columbia.dxf ///
sleep 2 Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
Oeffnen.Click sleep 2
sleep 2 Oeffnen.Click
Kontext "Active" sleep 2
if Active.Exists Then Kontext "Active"
Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document" if Active.Exists Then
Active.OK Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document"
sleep 2 Active.OK
Call hCloseDocument sleep 2
goto endsub Call hCloseDocument
end if goto endsub
Kontext "DocumentImpress" end if
try Kontext "DocumentImpress"
try
ContextConvertIntoBitmap '/// convert dxf file to bitmap ///'
sleep 1 sleep 1
Printlog "- Convert into bitmap works" Printlog "- Convert into bitmap works"
catch catch
Warnlog "- Convert into bitmap does not work" Warnlog "- Convert into bitmap does not work"
endcatch endcatch
sleep 2 sleep 2
endcase Call hCloseDocument '/// close document ///'
endcase 'tdContextConvertIntoBitmap
'--------------------------------------------------------
testcase tiAendernUmwandelnInKurve testcase tiAendernUmwandelnInKurve
Printlog " ----- ContextConvertIntoCurve testen" Printlog " ----- ContextConvertIntoCurve testen"
Call hNewDocument '/// New impress document///'
sleep 2 Call hTextrahmenErstellen ("I test,test,test,test only, if it works for you",20,20,60,30) '/// create textbox///'
Kontext "DocumentImpress" sleep 2
sleep 2 Kontext "DocumentImpress"
sleep 2 gMouseDoubleClick 70,70 '/// deselect textbox ///'
sleep 3 sleep 2
gMouseClick 30,15 EditSelectAll '/// select textbox ///'
sleep 2
ContextConvertIntoCurve '/// convert into curve ///'
sleep 3
gMouseClick 30,15
try 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" Warnlog " - Convert into curve, seperate letters should not be selectable anymore"
catch catch
Printlog " - Text converted into a curve" Printlog " - Text converted into a curve"
endcatch endcatch
endcase
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnInKurve
'--------------------------------------------------------
testcase tiAendernUmwandelnInPolygonGrafik testcase tiAendernUmwandelnInPolygonGrafik
Printlog "- Context/ConvertIntoPolygon" Printlog "- Context/ConvertIntoPolygon"
Call hNewDocument '/// new document ///'
InsertGraphicsFromFile '/// insert graphic (desp.bmp) ///'
Kontext "GrafikEinfuegenDlg" Kontext "GrafikEinfuegenDlg"
Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" ) '///use graphic : input\\impress\\grafik\\desp.bmp ///
Oeffnen.Click Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" )
sleep 3 Oeffnen.Click
Kontext "DocumentImpress" sleep 3
EditSelectAll Kontext "DocumentImpress"
sleep 1 EditSelectAll
sleep 1
Kontext "UmwandelnInPolygon"
Printlog "- Testing vectorize dialog"
if Farbanzahl.GetText <> "32" Then Warnlog "- Maximum value for color depth should be 32, but it is: " + Farbanzahl.GetText
sleep 1
if Farbanzahl.GetText <> "8" Then Warnlog "- Minimum value for color depth should be 8 but it is: " + Farbanzahl.GetText
sleep 2
sleep 2
if Punktreduktion.GetText <> "32 Pixel" Then Warnlog "- Maximum value should be 32, but it is: " + Punktreduktion.GetText
sleep 1
sleep 1
if Punktreduktion.GetText <> "0 Pixel" Then Warnlog "- Minimum value should be 0, but it is: " + Punktreduktion.GetText
if Not Kachelgroesse.IsEnabled Then
Printlog "- Control disabled."
else
Warnlog "- Control should be disabled if Fill is not checked."
end if
sleep 2
sleep 5
endcase
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
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnInPolygonGrafik
'--------------------------------------------------------
testcase tiAendernUmwandelnIn3D testcase tiAendernUmwandelnIn3D
Printlog "- Convert into 3D" Printlog "- Convert into 3D"
Call hNewDocument Call hNewDocument
sleep 2 sleep 1 '/// new impress document ///'
gMouseclick 35,35 hRechteckErstellen (10,10,40,40) '/// create rectangle ///'
sleep 1 '/// convert into 3D ///'
try sleep 2
Printlog "- Convert into 3D works" gMouseclick 35,35
catch sleep 1
Warnlog "- Convert into 3D does not work" try
endcatch ContextConvertInto3D '/// try to access convert ito 3d a 2nd time, should be impossible using a 3d object as source ///'
endcase Printlog "- Convert into 3D works"
catch
Warnlog "- Convert into 3D does not work"
endcatch
Call hCloseDocument '/// close document '///
endcase 'tiAendernUmwandelnIn3D
'--------------------------------------------------------
testcase tiAendernUmwandelnIn3DRotationskoerper testcase tiAendernUmwandelnIn3DRotationskoerper
Printlog "- ConvertInto3DRotationobject" Printlog "- ConvertInto3DRotationobject"
Dim PosX Dim PosX
Dim PosY Dim PosY
Kontext "DocumentImpress"
sleep 1
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
PosX = PositionX.GetText
PosY = PositionY.GetText
TabPositionAndSize.OK
sleep 1
Kontext "DocumentImpress"
sleep 2
ContextPositionAndSize
Kontext
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 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"
PosX = PositionX.GetText
PosY = PositionY.GetText
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
Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnIn3DRotationskoerper
'--------------------------------------------------------
testcase tiAendernUmwandelnInMetaFile testcase tiAendernUmwandelnInMetaFile
Printlog "- ConvertIntoMetaFile"
Printlog "- ConvertIntoMetaFile"
Call hNewDocument '/// new document ///'
sleep 3 sleep 3
InsertGraphicsFromFile '/// insert graphic ///'
sleep 1 sleep 1
kontext "Active" kontext "Active"
sleep 1 sleep 1
if Active.Exists Then if Active.Exists Then
Active.OK Active.OK
end if end if
sleep 1 sleep 1
Kontext "GrafikEinfuegenDlg" Kontext "GrafikEinfuegenDlg"
sleep 2 sleep 2
'/// uses input\\impress\\grafik\\desp.gif") ///
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif") Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif")
sleep 2 sleep 2
Oeffnen.Click Oeffnen.Click
sleep 5 sleep 5
Kontext "DocumentImpress" Kontext "DocumentImpress"
try try
ContextConvertIntoMetafile '/// convert bitmap into metafile ///'
sleep 2 sleep 2
Printlog "- Convert into Metafile does work" Printlog "- Convert into Metafile does work"
catch catch
Warnlog "- Convert into Metafile does not work" Warnlog "- Convert into Metafile does not work"
endcatch endcatch
sleep 2 sleep 2
endcase Call hCloseDocument '/// close document ///'
endcase 'tiAendernUmwandelnInMetaFile

View File

@@ -49,144 +49,224 @@ testcase tCrossfading
dim CounterForX as integer dim CounterForX as integer
dim anothercounter as integer dim anothercounter as integer
Call hNewDocument '/// New Impress document ///'
gMouseClick 50,50 gMouseClick 50,50
sleep 1 sleep 1
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
gMouseClick 90,90 gMouseClick 90,90
sleep 1 Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1 sleep 1
EditSelectAll '/// Select all ///'
sleep 1
EditCrossFading '/// Choose Edit / CrossFading ///'
kontext "Ueberblenden" kontext "Ueberblenden"
X = Schritte.GetText ' /// Get counter-value and save it in X ///' X = Schritte.GetText ' /// Get counter-value and save it in X ///'
printlog "Steps before we start the test: " + X printlog "Steps before we start the test: " + X
printlog "Schritte.GetText= " + Schritte.GetText printlog "Schritte.GetText= " + Schritte.GetText
Schritte.ToMin Schritte.ToMin
if Schritte.GetText <> "1" then qaerrorlog "Could not change the step-number to 1." if Schritte.GetText <> "1" then qaerrorlog "Could not change the step-number to 1."
for I = 2 to 10 ' /// How many steps do you want? ///' for I = 2 to 10 ' /// How many steps do you want? ///'
Schritte.More 1 Schritte.More 1
if Schritte.GetText <> I then qaerrorlog "Could not change the step-number to" + I if Schritte.GetText <> I then qaerrorlog "Could not change the step-number to" + I
Ueberblenden.OK Ueberblenden.OK
sleep 1 sleep 1
try try
catch FormatUngroupDraw '/// open context menu and ungroup objects ///'
qaerrorlog "Could not ungroup objects" catch
endcatch qaerrorlog "Could not ungroup objects"
sleep 1 endcatch
sleep 1
try hTypeKeys "<TAB>" '/// Should make the first object active ///'
ContextPositionAndSize
catch '/// Get position and dimensions of elements ///'
qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?" try
endcatch ContextPositionAndSize
kontext catch
active.SetPage TabPositionAndSize qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?"
sleep 1 endcatch
kontext "TabPositionAndSize" kontext
if TabPositionAndSize.exists (5) then active.SetPage TabPositionAndSize
CounterForX=0 sleep 1
CheckX=0 kontext "TabPositionAndSize"
TabPositionAndSize.OK if TabPositionAndSize.exists (5) then
else CounterForX=0
qaerrorlog "Couldn't switch tab page :-( " CheckX=0
endif 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 ///'
if Y > anothercounter then warnlog "Too many steps, something is wrong." for Y = 1 to anothercounter '/// How many times we should step to (hopefully) get back to the first one ///'
try if Y > anothercounter then warnlog "Too many steps, something is wrong."
catch try
errolog "Could not step to the next object" hTypeKeys "<TAB>" '/// Step to the next object ///'
endcatch catch
' Printlog "- Get position and dimensions of elements" errolog "Could not step to the next object"
sleep 1 endcatch
Kontext ' Printlog "- Get position and dimensions of elements"
Active.SetPage TabPositionAndSize ContextPositionAndSize '/// Open Position and Size for this object ///'
Kontext "TabPositionAndSize" sleep 1
sleep 1 Kontext
TabPositionAndSize.OK Active.SetPage TabPositionAndSize
Kontext "DocumentDraw" Kontext "TabPositionAndSize"
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." CheckX=PositionX.GetText '/// Get Position X for this object ///'
printlog "Number of objects: " + anothercounter sleep 1
printlog "" TabPositionAndSize.OK
endif 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 ///'
sleep 1 EditSelectAll '/// Select all ///'
gMouseClick 90,90 EditDelete '/// Delete all ///'
sleep 1 sleep 1
sleep 1 Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
sleep 2 gMouseClick 90,90
kontext "Ueberblenden" Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create rectangle ///'
next I 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 ///'
for Z = 1 to X -1 Schritte.ToMin '/// Select minimum value for number of steps ///'
next Z for Z = 1 to X -1
printlog "Value has been restored to: " + Schritte.GetText Schritte.More '/// Raise the value for number of steps with one ///'
printlog "X is now: " + X next Z
Attributierung.UnCheck printlog "Value has been restored to: " + Schritte.GetText
Ueberblenden.OK printlog "X is now: " + X
sleep 1 Attributierung.UnCheck
Kontext "DocumentDraw" Ueberblenden.OK
sleep 1 sleep 1
gMouseClick 90,90 Kontext "DocumentDraw"
sleep 1 EditSelectAll '/// Select all ///'
Kontext "Ueberblenden" EditDelete '/// Delete all ///'
if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked." sleep 1
sleep 1 Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
Kontext "DocumentDraw" gMouseClick 90,90
sleep 1 Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
gMouseClick 90,90 EditSelectAll '/// Select all ///'
sleep 1 sleep 1
Kontext "Ueberblenden" EditCrossFading '/// Choose Edit / CrossFading ///'
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked." Kontext "Ueberblenden"
sleep 1 if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked."
Kontext "DocumentDraw" GleicheOrientierung.UnCheck '/// Uncheck "same orienation" ///' -????
sleep 1 Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
sleep 1 sleep 1
gMouseClick 90,90 Kontext "DocumentDraw"
sleep 1 EditSelectAll '/// Select all ///'
Kontext "Ueberblenden" EditDelete '/// Delete all ///'
if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again." sleep 1
Ueberblenden.OK Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
sleep 1 gMouseClick 90,90
Kontext "DocumentDraw" Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
sleep 1 EditSelectAll '/// Select all ///'
gMouseClick 90,90 sleep 1
sleep 1 EditCrossFading '/// Choose Edit / CrossFading ///'
Kontext "Ueberblenden" Kontext "Ueberblenden"
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again." if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked."
sleep 1 Attributierung.Check '/// Check "Attributing" ///' - ???
Kontext "DocumentDraw" Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
gMouseClick 90,90 sleep 1
sleep 1 Kontext "DocumentDraw"
Kontext "Ueberblenden" EditSelectAll '/// Select all ///'
if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again." sleep 1
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"
catch
printlog "CrossFading could not be selected when more than two objects selected: Correct."
endcatch
try
EditSelectAll '/// Select all ///'
EditDelete '/// Delete all ///'
catch
warnlog "Could not select and delete all objects."
endcatch
sleep 1 printlog "End of test"
gMouseClick 90,90
gMouseClick 90,90
sleep 1
sleep 1
try
sleep 2
If active = "Ueberblenden" then
qaerrorlog "CrossFading should NOT be selectable since more than two objects is selected."
kontext "Ueberblenden"
endif
sleep 2
Kontext "DocumentDraw"
catch
printlog "CrossFading could not be selected when more than two objects selected: Correct."
endcatch
try
catch
warnlog "Could not select and delete all objects."
endcatch
printlog "End of test"
endcase
Call hCloseDocument '/// Close document ///'
endcase 'tCrossfading

View File

@@ -46,10 +46,12 @@
testcase t_Introduction testcase t_Introduction
gApplication = "IMPRESS" gApplication = "IMPRESS"
'///Open new presentation
printlog "Open new presentation" printlog "Open new presentation"
Call hNewDocument Call hNewDocument
'///Open the Gallery
printlog "Open the Gallery" printlog "Open the Gallery"
ToolsGallery ToolsGallery
Sleep (1) Sleep (1)
@@ -57,7 +59,8 @@ testcase t_Introduction
if Gallery.NotExists(2) then if Gallery.NotExists(2) then
ToolsGallery ToolsGallery
end if end if
'///Choose computer theme and insert the third image
printlog "Choose an item from the gallery" printlog "Choose an item from the gallery"
Gallerys.Select(2) Gallerys.Select(2)
View.TypeKeys "<HOME><RIGHT><RIGHT>" View.TypeKeys "<HOME><RIGHT><RIGHT>"
@@ -67,6 +70,7 @@ testcase t_Introduction
sleep 2 sleep 2
MenuSelect(MenuGetItemID(1)) 'Copy MenuSelect(MenuGetItemID(1)) 'Copy
sleep 2 sleep 2
'///+ - Check that we really got a copy of the object ///'
kontext "DocumentImpress" kontext "DocumentImpress"
DocumentImpress.OpenContextMenu(true) DocumentImpress.OpenContextMenu(true)
sleep 2 sleep 2
@@ -74,10 +78,10 @@ testcase t_Introduction
sleep 2 sleep 2
Kontext "ExportierenDlg" Kontext "ExportierenDlg"
if ExportierenDlg.IsVisible(5) then if ExportierenDlg.IsVisible(5) then
printlog " Gallery-object correctly copied into Slide." printlog " Gallery-object correctly copied into Slide."
ExportierenDlg.Close ExportierenDlg.Close
else else
warnlog " Doesn't seem like we copied anything from the Gallery... ?" warnlog " Doesn't seem like we copied anything from the Gallery... ?"
endif endif
printlog "Delete the item" printlog "Delete the item"
kontext "DocumentImpress" kontext "DocumentImpress"
@@ -94,13 +98,15 @@ testcase t_Introduction
catch catch
Warnlog "Insert graphic doesn't work" Warnlog "Insert graphic doesn't work"
endcatch endcatch
'///Resize object
printlog "Resize object" printlog "Resize object"
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseClick (10, 10) gMouseClick (10, 10)
sleep 1 sleep 1
EditSelectAll EditSelectAll
sleep 1 sleep 1
ContextPositionAndSize '/// Format-position and size
Kontext Kontext
Active.SetPage TabPositionAndSize Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
@@ -109,7 +115,8 @@ testcase t_Introduction
SizePosition.TypeKeys "<DOWN> <RIGHT>" SizePosition.TypeKeys "<DOWN> <RIGHT>"
Width.SetText CStr((CInt(Width.GetText)) * 2) Width.SetText CStr((CInt(Width.GetText)) * 2)
TabPositionAndSize.OK TabPositionAndSize.OK
'///Break object
printlog "Break object" printlog "Break object"
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseClick (10, 10) gMouseClick (10, 10)
@@ -117,7 +124,8 @@ testcase t_Introduction
EditSelectAll EditSelectAll
sleep 1 sleep 1
hOpenContextMenu '(when the object is marked) hOpenContextMenu '(when the object is marked)
hMenuSelectNr(13) hMenuSelectNr(13)
'/// Select part of object and make it black
printlog "Select part of object and make it black" printlog "Select part of object and make it black"
DocumentImpress.TypeKeys "<SHIFT TAB>" DocumentImpress.TypeKeys "<SHIFT TAB>"
FormatArea FormatArea
@@ -127,13 +135,15 @@ testcase t_Introduction
FillOptions.Select 2 FillOptions.Select 2
ColourList.Select 1 ColourList.Select 1
TabArea.OK TabArea.OK
'///Group the objects
printlog "Group the object" printlog "Group the object"
kontext "DocumentImpress" kontext "DocumentImpress"
DocumentImpress.TypeKeys "<MOD1 A>" DocumentImpress.TypeKeys "<MOD1 A>"
hOpenContextMenu '(when the object is marked) hOpenContextMenu '(when the object is marked)
hMenuSelectNr(12) hMenuSelectNr(12)
'///Add Layout "Title Only"
Printlog "Add Layout" Printlog "Add Layout"
kontext "Tasks" kontext "Tasks"
if (NOT Tasks.exists) then if (NOT Tasks.exists) then
@@ -143,21 +153,23 @@ testcase t_Introduction
Kontext "LayoutsPreview" Kontext "LayoutsPreview"
LayoutsPreview.TypeKeys "<HOME> <DOWN> <DOWN> <RETURN>" LayoutsPreview.TypeKeys "<HOME> <DOWN> <DOWN> <RETURN>"
sleep (5) sleep (5)
'///Add a background
Printlog "Add background" Printlog "Add background"
Kontext "Tasks" Kontext "Tasks"
printlog "Deselect all tabs from view menu in task pane except the needed." printlog "Deselect all tabs from view menu in task pane except the needed."
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(5)) MenuSelect(MenuGetItemID(5))
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(4)) MenuSelect(MenuGetItemID(4))
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(3)) MenuSelect(MenuGetItemID(3))
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(2)) MenuSelect(MenuGetItemID(2))
Kontext "AvailableForUsePreview" Kontext "AvailableForUsePreview"
AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>" AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
sleep (5) sleep (5)
'///Add a transition effect
Printlog "Add a transition effect" Printlog "Add a transition effect"
Kontext "Tasks" Kontext "Tasks"
View.OpenMenu View.OpenMenu
@@ -167,44 +179,45 @@ testcase t_Introduction
TransitionSound.GetItemCount 'needed for select TransitionSound.GetItemCount 'needed for select
Sleep 1 Sleep 1
TransitionSound.Select 4 TransitionSound.Select 4
'///Close the document
Printlog "Close the document" Printlog "Close the document"
Call hCloseDocument Call hCloseDocument
endcase 't_Introduction endcase 't_Introduction
'-------------------------------------------------------------------- '--------------------------------------------------------------------
testcase t_Interoperability testcase t_Interoperability
Dim sTemplatename as string Dim sTemplatename as string
gApplication = "IMPRESS" gApplication = "IMPRESS"
'///Open PowerPoint presentation
printlog "Open PowerPoint presentation" printlog "Open PowerPoint presentation"
hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/dotNetOverview.ppt")) hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/dotNetOverview.ppt"))
Call sMakeReadOnlyDocumentEditable Call sMakeReadOnlyDocumentEditable
'Save the name of the origin background (taken from last slide) 'Save the name of the origin background (taken from last slide)
Kontext "DocumentImpress" Kontext "DocumentImpress"
DocumentImpress.TypeKeys "<END>" DocumentImpress.TypeKeys "<END>"
sleep (4) sleep (4)
sTemplatename = DocumentImpress.StatusGetText (6) sTemplatename = DocumentImpress.StatusGetText (6)
printlog " Background = " & sTemplatename 'Debugcode printlog " Background = " & sTemplatename 'Debugcode
printlog "Choose a masterpage from right pane" printlog "Choose a masterpage from right pane"
Kontext "Tasks" Kontext "Tasks"
printlog "Deselect all tabs accept the Master Pages" printlog "Deselect all tabs accept the Master Pages"
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(5)) MenuSelect(MenuGetItemID(5))
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(4)) MenuSelect(MenuGetItemID(4))
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(3)) MenuSelect(MenuGetItemID(3))
View.OpenMenu View.OpenMenu
MenuSelect(MenuGetItemID(2)) MenuSelect(MenuGetItemID(2))
sleep 2 sleep 2
Kontext "AvailableForUsePreview" Kontext "AvailableForUsePreview"
AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>" AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
sleep (5) sleep (5)
@@ -212,10 +225,11 @@ testcase t_Interoperability
Kontext "DocumentImpress" Kontext "DocumentImpress"
printlog " Background is " & DocumentImpress.StatusGetText (6) 'Debugcode printlog " Background is " & DocumentImpress.StatusGetText (6) 'Debugcode
if DocumentImpress.StatusGetText (6) = sTemplatename then if DocumentImpress.StatusGetText (6) = sTemplatename then
warnlog "The background is not changed" warnlog "The background is not changed"
else printlog " Background has been changed" else printlog " Background has been changed"
endif endif
'///Switch back to original background
printlog "Switch back to original background" printlog "Switch back to original background"
Kontext "Tasks" Kontext "Tasks"
Kontext "AvailableForUsePreview" Kontext "AvailableForUsePreview"
@@ -223,10 +237,11 @@ testcase t_Interoperability
sleep (5) sleep (5)
Kontext "DocumentImpress" Kontext "DocumentImpress"
if DocumentImpress.StatusGetText (6) = sTemplatename then if DocumentImpress.StatusGetText (6) = sTemplatename then
printlog " The background has been set back to default" printlog " The background has been set back to default"
else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename
endif endif
'///Resort slides
printlog "Resort slides" printlog "Resort slides"
Kontext "DocumentImpress" Kontext "DocumentImpress"
Kontext "Slides" Kontext "Slides"
@@ -238,28 +253,29 @@ testcase t_Interoperability
Kontext "SlidesControl" Kontext "SlidesControl"
SlidesControl.TypeKeys "<Mod1 V>" SlidesControl.TypeKeys "<Mod1 V>"
kontext "InsertPaste" kontext "InsertPaste"
if InsertPaste.Exists(1) then if InsertPaste.Exists(1) then
Before.Check Before.Check
InsertPaste.OK InsertPaste.OK
endif endif
Printlog " Verify that the slide was moved correctly" Printlog " Verify that the slide was moved correctly"
Kontext "Slides" Kontext "Slides"
SlidesControl.TypeKeys "<PAGEUP>" SlidesControl.TypeKeys "<PAGEUP>"
SlidesControl.TypeKeys "<SHIFT F10>" SlidesControl.TypeKeys "<SHIFT F10>"
if hMenuFindSelect(27268, true, 3) = false then if hMenuFindSelect(27268, true, 3) = false then
Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
Call hCloseDocument Call hCloseDocument
Goto Endsub Goto Endsub
endif endif
kontext "NameDlgPage" kontext "NameDlgPage"
if NameField.GetText <> ".NET Enterprise Federation" then if NameField.GetText <> ".NET Enterprise Federation" then
Warnlog "Wrong slide found! Expected no 3, but found " + NameField.GetText + "." Warnlog "Wrong slide found! Expected no 3, but found " + NameField.GetText + "."
else else
Printlog " The slide was correctly moved" Printlog " The slide was correctly moved"
endif endif
NameDlgPage.OK NameDlgPage.OK
sleep 1 sleep 1
'///Switch views
printlog "Switch views" printlog "Switch views"
ViewWorkspaceOutlineView ViewWorkspaceOutlineView
sleep (2) sleep (2)
@@ -270,8 +286,8 @@ testcase t_Interoperability
DocumentImpressOutlineView.TypeKeys "<Mod1 C>" DocumentImpressOutlineView.TypeKeys "<Mod1 C>"
sleep (5) sleep (5)
if getclipboard() <> ".NET Enterprise" then if getclipboard() <> ".NET Enterprise" then
warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'." warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'."
else printlog " Switching to Outlineview was successfull" else printlog " Switching to Outlineview was successfull"
endif endif
catch catch
warnlog "Switching to Outlineview was not successfull" warnlog "Switching to Outlineview was not successfull"
@@ -319,7 +335,8 @@ testcase t_Interoperability
catch catch
warnlog "Switching to Drawingview was not successfull" warnlog "Switching to Drawingview was not successfull"
endcatch endcatch
'///Travel through the presentation by left pane
printlog "Travel through the presentation by left pane to slide 7" printlog "Travel through the presentation by left pane to slide 7"
Kontext "DocumentImpress" Kontext "DocumentImpress"
DocumentImpress.TypeKeys "<HOME><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN>" DocumentImpress.TypeKeys "<HOME><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN>"
@@ -328,31 +345,31 @@ testcase t_Interoperability
Kontext "SlidesControl" Kontext "SlidesControl"
SlidesControl.OpenContextMenu SlidesControl.OpenContextMenu
if hMenuFindSelect(27268, true, 3) = false then if hMenuFindSelect(27268, true, 3) = false then
Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends." Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
Call hCloseDocument Call hCloseDocument
Goto Endsub Goto Endsub
endif endif
kontext "NameDlgPage" kontext "NameDlgPage"
if NameField.GetText <> "Visual Studio.NET The complete development environment for building distributed applications for Windows and the Web" then if NameField.GetText <> "Visual Studio.NET The complete development environment for building distributed applications for Windows and the Web" then
Warnlog "Wrong slide found! Expected no 7, but found " + NameField.GetText + "." Warnlog "Wrong slide found! Expected no 7, but found " + NameField.GetText + "."
else Printlog " Slide 7 is reached" else Printlog " Slide 7 is reached"
endif endif
NameDlgPage.OK NameDlgPage.OK
sleep 1 sleep 1
printlog "Autoshape support" printlog "Autoshape support"
Kontext "DocumentImpress" Kontext "DocumentImpress"
DocumentImpress.TypeKeys "<TAB>" DocumentImpress.TypeKeys "<TAB>"
try try
Kontext "ExtrusionObjectBar" Kontext "ExtrusionObjectBar"
printlog "Checking if ExtrusionObjectBar is already open." printlog "Checking if ExtrusionObjectBar is already open."
if ExtrusionObjectBar.Exists then if ExtrusionObjectBar.Exists then
printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
else else
printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
printlog "Opening ExtrusionObjectBar." printlog "Opening ExtrusionObjectBar."
ViewToolbarsThreeDSettings ViewToolbarsThreeDSettings
endif endif
ExtrusionTiltRight.Click ExtrusionTiltRight.Click
printlog " An autoshape was found and turned right" printlog " An autoshape was found and turned right"
catch catch
@@ -360,22 +377,23 @@ testcase t_Interoperability
endcatch endcatch
printlog "Close document" printlog "Close document"
Call hCloseDocument Call hCloseDocument
endcase 't_Interoperability endcase 't_Interoperability
'-------------------------------------------------------------------- '--------------------------------------------------------------------
testcase t_DrawingEngine testcase t_DrawingEngine
Dim sGroupPosition as string Dim sGroupPosition as string
Dim sObjectPosition as string Dim sObjectPosition as string
gApplication = "DRAW" gApplication = "DRAW"
'///Open a drawing
printlog "Open a drawing" printlog "Open a drawing"
hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg")) hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg"))
Call sMakeReadOnlyDocumentEditable Call sMakeReadOnlyDocumentEditable
'///Select grouped object and enter group
printlog "Select group" printlog "Select group"
Kontext "DocumentDraw" Kontext "DocumentDraw"
DocumentDraw.TypeKeys "<TAB><TAB>" DocumentDraw.TypeKeys "<TAB><TAB>"
@@ -392,7 +410,8 @@ testcase t_DrawingEngine
Kontext "DocumentDraw" Kontext "DocumentDraw"
FormatEditGroupDraw FormatEditGroupDraw
sleep 1 sleep 1
'///Select and move single object
printlog "Select and move single object" printlog "Select and move single object"
printlog " Select object" printlog " Select object"
Kontext "DocumentDraw" Kontext "DocumentDraw"
@@ -403,8 +422,8 @@ testcase t_DrawingEngine
MenuSelect(MenuGetItemID(15)) 'Select NAME from context MenuSelect(MenuGetItemID(15)) 'Select NAME from context
kontext "NameDlgObject" kontext "NameDlgObject"
if NameField.GetText <> "Chair" then if NameField.GetText <> "Chair" then
Warnlog "Wrong object selected!" Warnlog "Wrong object selected!"
else Printlog " The correct object is selected" else Printlog " The correct object is selected"
endif endif
NameDlgObject.OK NameDlgObject.OK
sleep 1 sleep 1
@@ -421,12 +440,13 @@ testcase t_DrawingEngine
DocumentDraw.TypeKeys "<UP><UP><UP>" DocumentDraw.TypeKeys "<UP><UP><UP>"
sleep (5) sleep (5)
printlog " Verify that the object was moved" printlog " Verify that the object was moved"
ContextPositionAndSize '/// Format-position and size
Kontext Kontext
Active.SetPage TabPositionAndSize Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
if PositionY.GetText <> sObjectPosition then if PositionY.GetText <> sObjectPosition then
printlog " Single object was moved" printlog " Single object was moved"
else warnlog "The object has not been moved" else warnlog "The object has not been moved"
endif endif
TabPositionAndSize.OK TabPositionAndSize.OK
printlog " Exit group" printlog " Exit group"
@@ -438,11 +458,12 @@ testcase t_DrawingEngine
Active.SetPage TabPositionAndSize Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize" Kontext "TabPositionAndSize"
if PositionY.GetText = sGroupPosition then if PositionY.GetText = sGroupPosition then
printlog " Group is still on position" printlog " Group is still on position"
else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText
endif endif
TabPositionAndSize.OK TabPositionAndSize.OK
'///Close document
printlog "Close document" printlog "Close document"
Call hCloseDocument Call hCloseDocument

View File

@@ -49,181 +49,241 @@
' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") ' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
testcase tEditDuplicate testcase tEditDuplicate
dim Ueber_Text_1 dim Ueber_Text_1
dim Zaehler dim Zaehler
Kontext "Duplizieren" Call hNewDocument '/// New Impress document ///'
Ueber_Text_1 = AnzahlAnKopien.GetText Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
sleep 1 EditSelectAll '/// Select rectangle ///'
For Zaehler = 1 to 8 EditDuplicate '/// Edit-duplicate ///'
sleep 1 Kontext "Duplizieren"
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 ///'
Case 1: XAchse.SetText "0,0" Select Case Zaehler '/// Setting values for axis and angles ///'
YAchse.SetText "0,45" Case 1: XAchse.SetText "0,0"
Hoehe.SetText "-0,1" YAchse.SetText "0,45"
Breite.SetText "-0,1" Hoehe.SetText "-0,1"
Drehwinkel.SetText "3" Breite.SetText "-0,1"
Anfang.Select Int((Anfang.GetItemCount * Rnd)+1) Drehwinkel.SetText "3"
Case 2,6: XAchse.SetText "0,6" Anfang.Select Int((Anfang.GetItemCount * Rnd)+1)
YAchse.SetText "0,0" Case 2,6: XAchse.SetText "0,6"
Hoehe.SetText "0,15" YAchse.SetText "0,0"
Breite.SetText "0,01" Hoehe.SetText "0,15"
Drehwinkel.SetText "353" Breite.SetText "0,01"
Case 3,7: XAchse.SetText "0,0" Drehwinkel.SetText "353"
YAchse.SetText "-0,4" Case 3,7: XAchse.SetText "0,0"
Hoehe.SetText "-0,1" YAchse.SetText "-0,4"
Breite.SetText "0,06" Hoehe.SetText "-0,1"
Drehwinkel.SetText "11" Breite.SetText "0,06"
Case 4,8: XAchse.SetText "-0,6" Drehwinkel.SetText "11"
YAchse.SetText "0,0" Case 4,8: XAchse.SetText "-0,6"
Hoehe.SetText "0,05" YAchse.SetText "0,0"
Breite.SetText "-0,08" Hoehe.SetText "0,05"
Drehwinkel.SetText "347" Breite.SetText "-0,08"
Case 5: XAchse.SetText "0,1" Drehwinkel.SetText "347"
YAchse.SetText "0,48" Case 5: XAchse.SetText "0,1"
Hoehe.SetText "-0,05" YAchse.SetText "0,48"
Breite.SetText "-0,05" Hoehe.SetText "-0,05"
Drehwinkel.SetText "355" Breite.SetText "-0,05"
Drehwinkel.SetText "355"
End Select End Select
Ende.Select Int((Ende.GetItemCount * Rnd)+1) Ende.Select Int((Ende.GetItemCount * Rnd)+1)
Duplizieren.OK '/// Execute Duplicate ///'
sleep 1 sleep 1
Next Zaehler Next Zaehler
sleep 2 sleep 2
endcase Call hCloseDocument '/// Close document ///'
endcase 'tEditDuplicate
'---------------------------------------------------------
testcase tEditFields testcase tEditFields
Call hNewDocument
sleep 3 Call hNewDocument
sleep 1 sleep 3
sleep 2 InsertFieldsDateFix '/// Insert Date-Fix ///'
sleep 2 EditSelectAll '/// Select inserted field ///'
Kontext "FeldbefehlBearbeitenDraw" sleep 1
sleep 2 hTypeKeys "<F2>" '/// Go into edit mode (F2) ///'
If FeldtypFix.Ischecked then 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" Printlog "OK FieldtypeFix checkable"
else else
warnlog "FieldtypeFix not checkable" warnlog "FieldtypeFix not checkable"
end if end if
sleep 1 FeldtypVariabel.Check '/// check field type variabel///'
If FeldtypVariabel.Ischecked then sleep 1
Printlog "OK FieldtypeVariabel enabled" If FeldtypVariabel.Ischecked then
else Printlog "OK FieldtypeVariabel enabled"
warnlog "FieldtypeVariabel not enabled" else
end if warnlog "FieldtypeVariabel not enabled"
end if
' For Zaehler = 1 to FeldtypFormat.GetItemCount ' For Zaehler = 1 to FeldtypFormat.GetItemCount
' FeldTypFormat.Select Zaehler ' FeldTypFormat.Select Zaehler
' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText ' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText
' Next Zaehler ' Next Zaehler
sleep 2 FeldbefehlBearbeitenDraw.OK '/// close edit fields dialog ///'
sleep 2 sleep 2
endcase Call hCloseDocument '/// close document ///'
sleep 2
endcase 'tEditFields
'--------------------------------------------------------
testcase tEditDeleteSlide testcase tEditDeleteSlide
dim Ueber_Text_1 as string
dim Ueber_Text_2 as string
dim Ueber_Text_3 as string
sleep 3
sleep 1
kontext
Messagebox.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
TabPositionAndSize.OK
sleep 2
hTypekeys "<Pagedown>"
sleep 2
sleep 1
sleep 1
Ueber_Text_2 = "OK Page was closed"
Ueber_Text_3 = "Page was not closed"
sleep 1
endcase
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
Call hCloseDocument '/// close document ///'
endcase 'tEditDeleteSlide
'--------------------------------------------------------
testcase tEditLinks testcase tEditLinks
Kontext "GrafikEinfuegenDlg"
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp") Call hNewDocument '/// New document ///'
Oeffnen.Click InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///'
sleep 3 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" Kontext "VerknuepfungenBearbeiten"
sleep 1
'Aendern 'kann man noch den Dialog aufrufen...
Loesen.Click Loesen.Click
sleep 1 sleep 1
Kontext Kontext
Messagebox.Yes Messagebox.Yes
sleep 1 VerknuepfungenBearbeiten.Close
try warnlog "Break link does not work"
Kontext "VerknuepfungenBearbeiten" catch
Loesen.Click printlog "OK Link broken"
sleep 1 endcatch
Kontext Call hCloseDocument '/// close document ///'
Messagebox.Yes
VerknuepfungenBearbeiten.Close endcase 'tEditLinks
warnlog "Break link does not work" '---------------------------------------------------------
catch
printlog "OK Link broken"
endcatch
endcase
testcase tdEditDeleteLayer testcase tdEditDeleteLayer
dim Ueber_Text_1 as string
dim Ueber_Text_2 as string
dim Ueber_Text_3 as string
sleep 2
sleep 1
ViewLayer
kontext
active.SetPage TabPositionAndSize
kontext "TabPositionAndSize"
Ueber_Text_1 = PositionX.GetText
TabPositionAndSize.OK
Kontext "EbeneEinfuegenDlg"
EbeneEinfuegenDlg.OK
sleep 1
sleep 1
Kontext
Active.Yes
sleep 1
Ueber_Text_3 = "Layer was not deleted"
Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
sleep 1
endcase
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
Call hCloseDocument '/// close document ///'
endcase 'tdEditDeleteLayer
'--------------------------------------------------------
testcase tEditObjectEdit testcase tEditObjectEdit
Dim Schrieb as string
Schrieb = gOLEWriter Dim Schrieb as string
if Schrieb = "" then
warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
else
Call hNewDocument Schrieb = gOLEWriter
Kontext "OLEObjektEinfuegen" if Schrieb = "" then
sleep 3 warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
if ObjektTyp.GetItemCount = 0 Then else
Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
sleep 1
OleObjektEinfuegen.Cancel
sleep 1
else
ObjektTyp.Select Schrieb Call hNewDocument
sleep 1 sleep 1 '/// new document ///'
OLEObjektEinfuegen.OK InsertObjectOLEObject '/// insert writer ole object ///'
sleep 3 ' Changed from Sleep 1 to Sleep 3 Kontext "OLEObjektEinfuegen"
gMouseMove 10,10,90,90 sleep 3
sleep 1 if ObjektTyp.GetItemCount = 0 Then
EditSelectAll Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
sleep 1
OleObjektEinfuegen.Cancel
sleep 1
else
try ObjektTyp.Select Schrieb
sleep 2 sleep 1
catch OLEObjektEinfuegen.OK
Warnlog "- The EditObjectEdit did not work" sleep 3 ' Changed from Sleep 1 to Sleep 3
endcatch gMouseMove 10,10,90,90
sleep 1
EditSelectAll
try
EditObjectEdit 'keine ID '/// try edit-objects ///'
sleep 2
catch
Warnlog "- The EditObjectEdit did not work"
endcatch
gMouseClick 90,90 gMouseClick 90,90
end if end if
sleep 1 sleep 1
endif Call hCloseDocument '/// close document ///'
endcase endif
endcase 'tEditObjectEdit

View File

@@ -41,54 +41,54 @@
' #1 tiEditSearchAndReplaceBUGS ' #1 tiEditSearchAndReplaceBUGS
'* '*
'\********************************************************************************** '\**********************************************************************************
testcase tiEditSearchAndReplace testcase tiEditSearchAndReplace
Dim sFile 'as string '/// This test tests the 'Search and Replace' -dialogue. ///'
Dim sExpression(2) as string ' Expression to look for: ... Replace with Dim sFile 'as string
dim sExt as string Dim sExpression(2) as string ' Expression to look for: ... Replace with
dim sExt as string
Select Case Ucase(gApplication) Select Case Ucase(gApplication)
case "DRAW" : sExt = ".odg" case "DRAW" : sExt = ".odg"
case "IMPRESS" : sExt = ".odp" case "IMPRESS" : sExt = ".odp"
end select end select
'First we need some errornes words to replace. (sExpression) 'First we need some errornes words to replace. (sExpression)
'sExpression(1) has to be 3 times in the document 'sExpression(1) has to be 3 times in the document
select case iSprache select case iSprache
case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz" case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz"
case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese
case 07 : qaerrorlog "No files for Russian yet, will use english instead." case 07 : qaerrorlog "No files for Russian yet, will use english instead."
sExpression(1) = "Alle" : sExpression(2) = "Allz" sExpression(1) = "Alle" : sExpression(2) = "Allz"
case 30 : ' Greek case 30 : ' Greek
case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands
case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French
case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish
case 35 : ' Finnish case 35 : ' Finnish
case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria
case 37 : ' Catalan case 37 : ' Catalan
case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian
case 42 : ' Czech case 42 : ' Czech
case 43 : ' Slowak case 43 : ' Slowak
case 44 : ' English (GB) case 44 : ' English (GB)
case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish
case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish
case 47 : ' Norwegian case 47 : ' Norwegian
case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish
case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German
case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil) case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil)
case 66 : ' Thai 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 82 : ' Korean
' case 86 : ' Chinese (simplified) ' case 86 : ' Chinese (simplified)
' case 88 : ' Chinese (traditional) ' case 88 : ' Chinese (traditional)
case 90 : ' Turkish case 90 : ' Turkish
case 91 : ' Hindi case 91 : ' Hindi
case 96 : ' Arab case 96 : ' Arab
case 97 : ' Hebrew case 97 : ' Hebrew
case else : 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" printlog " :-) Will use English instead"
sExpression(1) = "Alle" : sExpression(2) = "Allz" sExpression(1) = "Alle" : sExpression(2) = "Allz"
end select end select
if ((bAsianLan) OR (iSprache = 07)) then if ((bAsianLan) OR (iSprache = 07)) then
@@ -113,61 +113,74 @@ testcase tiEditSearchAndReplace
Messagebox.OK Messagebox.OK
end if end if
sleep 2 sleep 2
hTypeKeys "<MOD1 HOME>" '/// Select the text ///'
'/// Edit-Find & Replace I///'
EditSearchAndReplace EditSearchAndReplace
sleep 1 sleep 1
Kontext "FindAndReplace" Kontext "FindAndReplace"
'/// Clap the 'more options'-part open ///'
More.Click More.Click
'/// verify, that search is done without 'similarity search' !!! ///'
if SimilaritySearch.IsChecked = TRUE then if SimilaritySearch.IsChecked = TRUE then
SimilaritySearch.UnCheck SimilaritySearch.UnCheck
warnlog "'Similar search' checkbox was enabled! It shouldn't be the default!" warnlog "'Similar search' checkbox was enabled! It shouldn't be the default!"
end if 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" Kontext "Messagebox"
if Messagebox.Exists(2) then if Messagebox.Exists(2) then
Printlog Messagebox.GetText Printlog Messagebox.GetText
Messagebox.OK Messagebox.OK
end if end if
sleep 1 sleep 1
Kontext "FindAndReplace" Kontext "FindAndReplace"
SearchNow.Click '/// 2nd search for text ///'
Kontext "Messagebox" Kontext "Messagebox"
if Messagebox.Exists(2) then if Messagebox.Exists(2) then
Printlog Messagebox.GetText Printlog Messagebox.GetText
Messagebox.OK Messagebox.OK
end if end if
sleep 1 sleep 1
Kontext "FindAndReplace" Kontext "FindAndReplace"
SearchNow.Click '/// 3th search for text///'
Kontext "Messagebox" Kontext "Messagebox"
if Messagebox.Exists(2) then if Messagebox.Exists(2) then
Printlog Messagebox.GetText Printlog Messagebox.GetText
Messagebox.OK Messagebox.OK
end if end if
sleep 1 sleep 1
Kontext "FindAndReplace" Kontext "FindAndReplace"
SearchNow.Click '/// 4th search for text; but it is no more available!///'
sleep 2 sleep 2
kontext "Messagebox" kontext "Messagebox"
if Messagebox.Exists Then if Messagebox.Exists Then
Printlog "- The word was found 3 times: '" + messagebox.gettext + "'" Printlog "- The word was found 3 times: '" + messagebox.gettext + "'"
Messagebox.OK Messagebox.OK
else else
SearchNow.Click '/// 5th search for word 1///'
kontext kontext
if Messagebox.Exists (5) Then if Messagebox.Exists (5) Then
Printlog "?: "+Messagebox.gettext Printlog "?: "+Messagebox.gettext
Warnlog "- No MsgBox appeared: 'changed'" Warnlog "- No MsgBox appeared: 'changed'"
Messagebox.OK Messagebox.OK
endif endif
Warnlog "- No MsgBox appeared: 'changed'" Warnlog "- No MsgBox appeared: 'changed'"
end if end if
'/// Replace all ///'
Kontext "FindAndReplace" Kontext "FindAndReplace"
sleep 1 sleep 1
ReplaceAll.Click ReplaceAll.Click
Kontext "Messagebox" Kontext "Messagebox"
if Not Messagebox.Exists (2) then if Not Messagebox.Exists (2) then
' Warnlog " Not all words are replaced" ' there never was a mesagebox ! (compared to 5.2) ' Warnlog " Not all words are replaced" ' there never was a mesagebox ! (compared to 5.2)
else else
printlog messagebox.gettext printlog messagebox.gettext
qaerrorlog "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" qaerrorlog "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
@@ -175,6 +188,7 @@ testcase tiEditSearchAndReplace
end if end if
Kontext "FindAndReplace" Kontext "FindAndReplace"
sleep 2 sleep 2
SearchNow.Click '/// Search for word 1 to check if all words are replaced ///'
Kontext "Messagebox" Kontext "Messagebox"
if Not Messagebox.Exists then if Not Messagebox.Exists then
Warnlog " Not all words are replaced (Replace All)" Warnlog " Not all words are replaced (Replace All)"
@@ -186,13 +200,17 @@ testcase tiEditSearchAndReplace
FindAndReplace.Close FindAndReplace.Close
sleep 3 sleep 3
'/// Edit-Find & Replace II ///'
gMouseClick 50,50 gMouseClick 50,50
sleep 1 sleep 1
hTypeKeys "<MOD1 HOME>" hTypeKeys "<MOD1 HOME>"
EditSearchAndReplace EditSearchAndReplace
sleep 1 sleep 1
Kontext "FindAndReplace" Kontext "FindAndReplace"
SearchFor.SetText sExpression(2) '/// Search for word 2 ///'
ReplaceWith.SetText sExpression(1) '/// Replace with word 1 ///'
Replace.Click '/// Replace 1 ///'
Kontext "Messagebox" Kontext "Messagebox"
if Messagebox.Exists(4) Then if Messagebox.Exists(4) Then
Kontext "Messagebox" Kontext "Messagebox"
@@ -204,6 +222,7 @@ testcase tiEditSearchAndReplace
Kontext "FindAndReplace" Kontext "FindAndReplace"
sleep 1 sleep 1
SearchNow.Click '/// 2nd search for word 2 ///'
Kontext "Messagebox" Kontext "Messagebox"
if Messagebox.Exists(2) Then if Messagebox.Exists(2) Then
Warnlog " All words got replaced, but only the 1st should have been" Warnlog " All words got replaced, but only the 1st should have been"
@@ -214,6 +233,7 @@ testcase tiEditSearchAndReplace
Printlog " Word replaced" Printlog " Word replaced"
end if end if
'/// Replace all ///'
Kontext "FindAndReplace" Kontext "FindAndReplace"
ReplaceAll.Click ReplaceAll.Click
kontext "Messagebox" kontext "Messagebox"
@@ -223,6 +243,7 @@ testcase tiEditSearchAndReplace
Printlog "- No messagebox after replace all" Printlog "- No messagebox after replace all"
end if end if
'/// Search for word 2 to check if all are replaced ///'
Kontext "FindAndReplace" Kontext "FindAndReplace"
SearchNow.Click SearchNow.Click
kontext "Messagebox" kontext "Messagebox"
@@ -237,98 +258,111 @@ testcase tiEditSearchAndReplace
More.Click More.Click
FindAndReplace.Close FindAndReplace.Close
sleep 2 sleep 2
'/// Close document ///'
Call hCloseDocument Call hCloseDocument
endcase
endcase 'tiEditSearchAndReplace
'--------------------------------------------------------
testcase tiEditSearchAndReplaceBUGS testcase tiEditSearchAndReplaceBUGS
dim i as integer
dim bTemp as boolean
Call hNewDocument '/// inspired by bugs: 101974, 101975, 101976 ///'
sleep 3 dim i as integer
EditSearchAndReplace dim bTemp as boolean
Kontext "FindAndReplace"
if FindAndReplace.Exists (5) then
Printlog "Dialog for Search&Replace could be opened :-)"
else
Warnlog "Dialog for Search&Replace could NOT be opened :-("
endif
for i = 1 to 6 '/// open application ///'
Printlog "- " + i + " View->Workspace->... ------------------------------------------------------" Call hNewDocument
try sleep 3
select case i '/// Edit->Search and Replace ///'
EditSearchAndReplace
Kontext "FindAndReplace"
if FindAndReplace.Exists (5) then
Printlog "Dialog for Search&Replace could be opened :-)"
else
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
select case i
case 1:Printlog " Drawing" case 1:Printlog " Drawing"
ViewWorkspaceDrawingView ViewWorkspaceDrawingView
case 2:Printlog " Outline" case 2:Printlog " Outline"
ViewWorkspaceOutlineView ViewWorkspaceOutlineView
case 3:Printlog " Slides" case 3:Printlog " Slides"
ViewWorkspaceSlidesView ViewWorkspaceSlidesView
case 4:Printlog " Notes" case 4:Printlog " Notes"
ViewWorkspaceNotesView ViewWorkspaceNotesView
case 5:Printlog " Handout" case 5:Printlog " Handout"
' this is done this way, to regcognize BUGID:101975 ' this is done this way, to regcognize BUGID:101975
ViewWorkspaceHandoutView ViewWorkspaceHandoutView
case 6:Printlog " Drawing" case 6:Printlog " Drawing"
ViewWorkspaceDrawingView ViewWorkspaceDrawingView
end select
catch
Warnlog "Couldn't excecute the last view ^^^^^^^^^ :-("
Printlog "Will close the search&replace dialog as a workaround and then try to switch to the view again"
Kontext "FindAndReplace"
FindAndReplace.close
sleep 5
try
select case i
case 1:ViewWorkspaceDrawingView
case 2:ViewWorkspaceOutlineView
case 3:ViewWorkspaceSlidesView
case 4:ViewWorkspaceNotesView
case 5:ViewWorkspaceHandoutView
end select end select
catch catch
Warnlog "Couldn't excecute the last view ^^^^^^^^^ :-(" Warnlog "Couldn't really switch the view :-("
Printlog "Will close the search&replace dialog as a workaround and then try to switch to the view again" endcatch
Kontext "FindAndReplace" endcatch
FindAndReplace.close sleep 5
sleep 5 Kontext "FindAndReplace"
'///+ if not already open, open. edit->search and replace ///'
if (FindAndReplace.exists <> TRUE) then
try
EditSearchAndReplace
catch
endcatch
endif
if (FindAndReplace.exists <> TRUE) then
if (i=3) then
' SlideView
else
Warnlog "Search and replace was not open, and could not be opened :-("
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 try
select case i active.ok
case 1:ViewWorkspaceDrawingView
case 2:ViewWorkspaceOutlineView
case 3:ViewWorkspaceSlidesView
case 4:ViewWorkspaceNotesView
case 5:ViewWorkspaceHandoutView
end select
catch catch
Warnlog "Couldn't really switch the view :-(" active.yes
sleep 2
if active.exists(5) then
Printlog "Active: '" + active.GetText + "'"
active.ok
endif
endcatch endcatch
endcatch else
sleep 5 ' this is done this way, to regcognize BUGID:101974
Kontext "FindAndReplace" Warnlog "No message about 'search key not found' :-("
if (FindAndReplace.exists <> TRUE) then endif
try endif
EditSearchAndReplace next i
catch Kontext "FindAndReplace"
endcatch FindAndReplace.cancel
endif '/// close application ///'
if (FindAndReplace.exists <> TRUE) then Call hCloseDocument
if (i=3) then
' SlideView endcase 'tiEditSearchAndReplaceBUGS
else
Warnlog "Search and replace was not open, and could not be opened :-("
endif
else
Kontext "FindAndReplace"
SearchFor.SetText "a"
SearchNow.Click
sleep 5
kontext
if active.exists(5) then
Printlog "Active: '" + active.GetText + "'"
try
active.ok
catch
active.yes
sleep 2
if active.exists(5) then
Printlog "Active: '" + active.GetText + "'"
active.ok
endif
endcatch
else
' this is done this way, to regcognize BUGID:101974
Warnlog "No message about 'search key not found' :-("
endif
endif
next i
Kontext "FindAndReplace"
FindAndReplace.cancel
Call hCloseDocument
endcase

File diff suppressed because it is too large Load Diff

View File

@@ -40,60 +40,73 @@
'\******************************************************************** '\********************************************************************
testcase tiGruppierung testcase tiGruppierung
Dim PosX 'Variable fuer PositionX Dim PosX 'Variable fuer PositionX
sleep 3 Call hNewDocument '/// new document ///'
Kontext "DocumentImpress" sleep 3
sleep 2 Kontext "DocumentImpress"
sleep 1 sleep 2
sleep 1 hRechteckErstellen (20,20,40,40) '/// create rectangle ///'
sleep 1 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" Printlog "- Created 3 rectangles for group testing"
if (gApplication = "DRAW") then gMouseClick (50,50) '/// Put the mouse-marker in the middle of the screen ///'
hOpenContextMenu EditSelectAll '/// select all rectangles ///'
if (gApplication = "DRAW") then
hOpenContextMenu
sleep(2) sleep(2)
hMenuSelectNr(12) ' Select "Group" hMenuSelectNr(12) ' Select "Group"
sleep(2) sleep(2)
else else
endif FormatGroupDraw '/// open context menue and group rectangles ///'
sleep 1 endif
sleep 1
Printlog "- Get position and dimensions of elements" Printlog "- Get position and dimensions of elements"
sleep 1 ContextPositionAndSize '/// get dimensions of group ///'
Kontext sleep 1
Active.SetPage TabPositionAndSize Kontext
Kontext "TabPositionAndSize" Active.SetPage TabPositionAndSize
sleep 1 Kontext "TabPositionAndSize"
PosX=PositionX.GetText sleep 1
TabPositionAndSize.OK PosX=PositionX.GetText
sleep 1 TabPositionAndSize.OK
Kontext "DocumentImpress" sleep 1
gMouseClick 35,35 Kontext "DocumentImpress"
sleep 1 gMouseClick 35,35
sleep 3 sleep 1
try hTypeKeys "<F3>" '/// entering group using key "F3" ///'
sleep 1 sleep 3
Warnlog "- Entering the group, no object within the group should have been selected" try
catch EditCut '/// cut rectangle out of document ///'
Printlog "- entered group, nothing selected" sleep 1
endcatch Warnlog "- Entering the group, no object within the group should have been selected"
gMouseClick (35,35) catch
gMouseMove (30,30,60,60) Printlog "- entered group, nothing selected"
sleep 1 endcatch
Printlog "- Exit group" gMouseClick (35,35)
' sleep 1 gMouseMove (30,30,60,60)
' hMenuSelectNr (13) sleep 1
' would be better to call the slot TBO! Printlog "- Exit group"
ContextPositionAndSize ' DocumentImpress.OpenContextMenu '/// leave group, compare dimensions ///'
sleep 1 ' sleep 1
Kontext ' hMenuSelectNr (13)
Active.SetPage TabPositionAndSize hTypeKeys "<mod1 F3>" '/// exit group using key "strg F3" ///'
Kontext "TabPositionAndSize" ' would be better to call the slot TBO!
sleep 1 ContextPositionAndSize
if PosX = PositionX.GetText then sleep 1
Warnlog "- No change in position for X axis, even we changed position of 1 object within the group" Kontext
TabPositionAndSize.OK Active.SetPage TabPositionAndSize
else Kontext "TabPositionAndSize"
Printlog "- Moving within the group works" sleep 1
TabPositionAndSize.OK if PosX = PositionX.GetText then
end if Warnlog "- No change in position for X axis, even we changed position of 1 object within the group"
TabPositionAndSize.OK
else
Printlog "- Moving within the group works"
TabPositionAndSize.OK
end if
Call hCloseDocument '/// close document ///'
endcase endcase

View File

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

View File

@@ -39,8 +39,8 @@
' #1 tiFormatLine ' #1 tiFormatLine
' #1 tLineConnect ' #1 tLineConnect
'\************************************************************************************* '\*************************************************************************************
testcase tiFormatLine testcase tiFormatLine
Dim ZaehlerStil Dim ZaehlerStil
Dim ZaehlerFarbe Dim ZaehlerFarbe
Dim ZaehlerTransp Dim ZaehlerTransp
@@ -49,66 +49,85 @@ testcase tiFormatLine
Dim k 'Variable fuer Transparenz (Anzahl) Dim k 'Variable fuer Transparenz (Anzahl)
Dim l Dim l
Dim ZaehlerStilLinks Dim ZaehlerStilLinks
Call hNewDocument '/// New impress document
sleep 3 sleep 3
Call hRechteckErstellen (10,10,60,60) '/// create rectangle
sleep 2 sleep 2
FormatLine '/// open Format line dialog
Kontext Kontext
Active.SetPage TabLinie '///Open TabLine Tabpage
Kontext "TabLinie" Kontext "TabLinie"
sleep 2 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 ZaehlerStil = Stil.GetItemCount
ZaehlerFarbe = Farbe.GetItemCount ZaehlerFarbe = Farbe.GetItemCount
wait 10 for i=1 to ZaehlerStil '/// Apply every style to the rectangle ///'
Stil.Select i wait 10
wait 10 Stil.Select i
wait 10
TabLinie.OK '/// Closing dialog with ok
' Kontext "DocumentImpress" ' Kontext "DocumentImpress"
FormatLine '///Open TabLine Tabpage
Kontext
Active.SetPage TabLinie
Kontext "TabLinie"
next i
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
Active.SetPage TabLinie Active.SetPage TabLinie '/// TabLine ///'
Kontext "TabLinie" Kontext "TabLinie"
next i StilLinks.GetItemCount
ZaehlerStilLinks=StilLinks.GetItemCount
PrintLog "-- " + Farbe.GetSelText for l=1 to ZaehlerStilLinks '/// Apply all line end styles///'
wait 10 wait 10
Farbe.Select j if EndenSynchronisieren.IsChecked=False Then EndenSynchronisieren.Check '/// check synchronize ///'
wait 10 wait 10
TabLinie.OK StilLinks.Select l
' Kontext "DocumentImpress" if StilLinks.GetSelText<>StilRechts.GetSelText Then
FormatLine WarnLog " Ends not synchronized. " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText '/// check if style is automatically applied for both ends ///'
Kontext else
Active.SetPage TabLinie PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText
Kontext "TabLinie" end if
next j EndenSynchronisieren.UnCheck
Breite.Less 2 next l
for k=1 to 6 ZentriertLinks.Check
next k if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work"
TabLinie.OK i = CornerStyle.GetItemCount
'--------------------------------------- if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i
sleep 2 for i = 1 to 4
sleep 2
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
CornerStyle.Select i CornerStyle.Select i
if CornerStyle.GetSelIndex <> i then warnlog "Corner Styles was: " + CornerStyle.GetSelIndex + ", should have been " + i if CornerStyle.GetSelIndex <> i then warnlog "Corner Styles was: " + CornerStyle.GetSelIndex + ", should have been " + i
Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText
next i next i
TabLinie.OK TabLinie.OK
'------------------------------------------ '------------------------------------------
@@ -117,12 +136,15 @@ for i = 1 to 4
Kontext Kontext
Active.SetPage TabLinienstile Active.SetPage TabLinienstile
Kontext "TabLinienstile" Kontext "TabLinienstile"
Hinzufuegen.Click '/// Add new line style ///'
Kontext "NameDlg" Kontext "NameDlg"
Eingabefeld.SetText "Testlinie2" '/// insert name of style (Testlinie2) ///'
NameDlg.OK NameDlg.OK
sleep 1 sleep 1
Kontext Kontext
Active.SetPage TabLinienstile Active.SetPage TabLinienstile
Kontext "TabLinienstile" Kontext "TabLinienstile"
Loeschen.Click '/// delete created style ///'
Kontext "Active" Kontext "Active"
Active.Yes Active.Yes
Kontext Kontext
@@ -135,148 +157,169 @@ for i = 1 to 4
LaengeLinks.More 3 LaengeLinks.More 3
LaengeRechts.More 3 LaengeRechts.More 3
Abstand.SetText "0,1" Abstand.SetText "0,1"
if AnLinienbreite.IsChecked = True Then AnLinienbreite.Click '/// all fields changed in TabLinienstile ///'
PrintLog " All controls could be manipulated." PrintLog " All controls could be manipulated."
TypLinks.Select 1 TypLinks.Select 1
TypRechts.Select 1 TypRechts.Select 1
WarnLog " A point where you can change its length is not a point anymore" if LaengeLinks.IsEnabled And LaengeRechts.IsEnabled =True Then '/// check if its possible to apply a length to a point ///'
else WarnLog " A point where you can change its length is not a point anymore"
end if else
sleep 1 PrintLog " Line style pint tested" '/// All styles for points are changed ///'
try end if
Linienstil.Select 1
catch
Warnlog "- The list for line styles is empty"
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
Hinzufuegen.Click
Kontext "NameDlg"
sleep 1 sleep 1
Eingabefeld.SetText "Delete" try
Linienstil.Select 1
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"
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 NameDlg.OK
end if Kontext
endcatch Active.SetPage TabLinienstile
Kontext Kontext "TabLinienstile"
Active.SetPage TabLinienstile TabLinienstile.OK
Kontext "TabLinienstile" sleep 2
sleep 1 FormatLine
TabLinienstile.OK Kontext
'-------------------------------------------- Active.SetPage TabLinienstile
sleep 2 Kontext "TabLinienstile"
sleep 2 try
FormatLine Aendern.Click
Kontext catch
Active.SetPage TabLinienenden Hinzufuegen.Click
Kontext "TabLinienenden" endcatch
sleep 2 Kontext "NameDlg"
Kontext "Linienstil" if Eingabefeld.GetText <> GetClipboardText Then WarnLog "No changes for Line style" '/// check if changed style is in list ///'
sleep 1 NameDlg.Cancel
Kontext sleep 2
Active.SetPage TabLinienenden Kontext
Kontext "TabLinienenden" Active.SetPage TabLinienstile
sleep 1 Kontext "TabLinienstile"
Liste.GetItemCount sleep 1
Liste.Select 3 try
Kontext "NameDlg" Loeschen.Click '/// delete changed style ///'
NameDlg.OK Kontext "Active"
Active.Yes
Kontext sleep 3
Active.SetPage TabLinienenden catch
Kontext "TabLinienenden" if Linienstile.GetItemCount = 0 Then
Kontext "Active" Hinzufuegen.Click
Printlog Active.GetText Kontext "NameDlg"
Active.OK sleep 1
Kontext "NameDlg" Eingabefeld.SetText "Delete"
Eingabefeld.SetText Eingabefeld.GetText + "1" NameDlg.OK
PrintLog " Name inserted" end if
NameDlg.OK endcatch
Kontext
Kontext Active.SetPage TabLinienstile
if active.GetRt=304 then Kontext "TabLinienstile"
active.ok sleep 1
Kontext "NameDlg" TabLinienstile.OK
Eingabefeld.SetText Eingabefeld.GetText + "1" '--------------------------------------------
PrintLog " Name inserted" sleep 2
NameDlg.OK Call hRechteckErstellen (40,40,80,50) '/// create rectangle ///'
endif sleep 2
if active.GetRt=304 then FormatLine
active.ok Kontext
warnlog "still not a valid name :-(" Active.SetPage TabLinienenden
endif Kontext "TabLinienenden"
Kontext sleep 2
Active.SetPage TabLinienenden Kontext "Linienstil"
Kontext "TabLinienenden" if Linienstil.Exists then Aendern.Click '/// change style ///'
Kontext "Active" sleep 1
Active.Yes Kontext
Active.SetPage TabLinienenden
Kontext Kontext "TabLinienenden"
Active.SetPage TabLinienenden sleep 1
Kontext "TabLinienenden" Liste.GetItemCount
sleep 1 Liste.Select 3
sleep 1 Hinzufuegen.Click '/// add style ///'
Kontext "SpeichernDlg" Kontext "NameDlg"
sleep 1 NameDlg.OK
SpeichernDlg.Cancel
Kontext
Kontext "TabLinienenden" Active.SetPage TabLinienenden
TabLinienenden.Cancel Kontext "TabLinienenden"
sleep 2 Aendern.Click '/// change style ///'
Kontext "Active"
'sleep 2 Printlog Active.GetText
'sleep 2 Active.OK
Kontext "NameDlg"
'kontext "Toolbar" Eingabefeld.SetText Eingabefeld.GetText + "1"
'Kurven.Click PrintLog " Name inserted"
'sleep 1 NameDlg.OK
'if (gApplication = "DRAW") then
' Kontext "DocumentDraw" Kontext
' gMouseMove (30,50, 40,60) if active.GetRt=304 then
' sleep 1 active.ok
'else Kontext "NameDlg"
' Kontext "DocumentImpress" Eingabefeld.SetText Eingabefeld.GetText + "1"
' gMouseMove (30,50, 40,60) PrintLog " Name inserted"
' sleep 1 NameDlg.OK
'endif endif
'FormatLine if active.GetRt=304 then
'Kontext active.ok
'Active.SetPage TabSchatten warnlog "still not a valid name :-("
endif
' FormatLine.Cancel Kontext
Active.SetPage TabLinienenden
Kontext "TabLinienenden"
Loeschen.Click '/// delete style ///'
Kontext "Active"
Active.Yes
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
'///New part for line
'EditSelectAll '/// Select all objects in document ///'
'sleep 2
'hTypeKeys "<DELETE>" '/// Delete objects ///'
'sleep 2
'/// 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 ///'
endcase 'tiFormatLine endcase 'tiFormatLine
'-------------------------------------------------------------------------------' '-------------------------------------------------------------------------------'
testcase tLineConnect testcase tLineConnect
@@ -287,55 +330,58 @@ testcase tLineConnect
Dim i as integer Dim i as integer
Dim cname as string Dim cname as string
Dim cfirst as integer Dim cfirst as integer
if bAsianLan then if bAsianLan then
QaErrorLog "tLineConnect ends because Asian languages are not fully supported." QaErrorLog "tLineConnect ends because Asian languages are not fully supported."
goto Endsub goto Endsub
end if end if
Call hNewDocument '/// New Impress / Draw document ///'
sleep 3 sleep 3
kontext "GraphicObjectbar" kontext "GraphicObjectbar"
if GraphicObjectbar.Exists then if GraphicObjectbar.Exists then
if GraphicObjectbar.isDocked = False then if GraphicObjectbar.isDocked = False then
GraphicObjectbar.Move 900,900 GraphicObjectbar.Move 900,900
endif endif
endif endif
kontext "Gluepointsobjectbar" kontext "Gluepointsobjectbar"
if Gluepointsobjectbar.Exists then if Gluepointsobjectbar.Exists then
if Gluepointsobjectbar.isDocked = false then if Gluepointsobjectbar.isDocked = false then
Gluepointsobjectbar.Move 900,900 Gluepointsobjectbar.Move 900,900
endif endif
endif endif
kontext "Optionsbar" kontext "Optionsbar"
if Optionsbar.Exists then if Optionsbar.Exists then
if Optionsbar.isDocked = false then if Optionsbar.isDocked = false then
Optionsbar.Move 900,900 Optionsbar.Move 900,900
end if end if
endif endif
'/// Create 2 lines ///'
kontext "Toolbar" kontext "Toolbar"
Kurven.Click Kurven.Click
sleep 1 sleep 1
if (gApplication = "DRAW") then if (gApplication = "DRAW") then
Kontext "DocumentDraw" Kontext "DocumentDraw"
gMouseMove (30,50, 40,60) gMouseMove (30,50, 40,60)
sleep 1 sleep 1
kontext "Toolbar" kontext "Toolbar"
Kurven.Click Kurven.Click
Kontext "DocumentDraw" Kontext "DocumentDraw"
gMouseMove (70,50, 60,60) gMouseMove (70,50, 60,60)
else else
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseMove (30,50, 40,60) gMouseMove (30,50, 40,60)
sleep 1 sleep 1
kontext "Toolbar" kontext "Toolbar"
Kurven.Click Kurven.Click
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseMove (70,50, 60,60) gMouseMove (70,50, 60,60)
endif endif
printlog "'" + (gApplication) +"'" printlog "'" + (gApplication) +"'"
'/// Check the amount of objects ///'
gMouseClick (10, 10) gMouseClick (10, 10)
sleep 1 sleep 1
EditSelectAll EditSelectAll
@@ -346,8 +392,8 @@ testcase tLineConnect
kontext "DocumentDraw" kontext "DocumentDraw"
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
endif endif
if bAsianLan then if bAsianLan then
value1 = left(StatusBarText,(InStr(StatusBarText, "2" ))) value1 = left(StatusBarText,(InStr(StatusBarText, "2" )))
if value1 <> 2 then if value1 <> 2 then
warnlog "UH? There is supposed to be two objects visible, but was: " + value1 + " and the StatusBarText said: " + StatusBarText + "." warnlog "UH? There is supposed to be two objects visible, but was: " + value1 + " and the StatusBarText said: " + StatusBarText + "."
end if end if
@@ -358,117 +404,130 @@ testcase tLineConnect
warnlog "UH? There is supposed to be two objects visible, but we found " + value1 + " objects." warnlog "UH? There is supposed to be two objects visible, but we found " + value1 + " objects."
end if end if
end if end if
'/// Connect the two objects selected ///'
hOpenContextMenu hOpenContextMenu
sleep 1 sleep 1
hMenuSelectNr(13) hMenuSelectNr(13)
sleep 1 sleep 1
'/// Check the amount of objects ///'
gMouseClick (10, 10) gMouseClick (10, 10)
sleep 1 sleep 1
EditSelectAll EditSelectAll
sleep 1 sleep 1
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1)) StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
else else
kontext "DocumentDraw" kontext "DocumentDraw"
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
endif endif
value2 = left(StatusBarText,1) value2 = left(StatusBarText,1)
printlog "StatusBarText was: " + StatusBarText printlog "StatusBarText was: " + StatusBarText
'/// if same as the first value = wrong ///'
if value1 = value2 then if value1 = value2 then
warnlog "Expected to find one object, but found " + value2 + " instead." warnlog "Expected to find one object, but found " + value2 + " instead."
endif endif
if value2 = "2" then if value2 = "2" then
warnlog "Connect was not successful. We should have one object, but have " + value2 + " instead." warnlog "Connect was not successful. We should have one object, but have " + value2 + " instead."
endif endif
'/// unmark the objects, thereafter mark them again ///'
gMouseClick (10, 10) gMouseClick (10, 10)
sleep 1 sleep 1
EditSelectAll EditSelectAll
sleep 1 sleep 1
'/// Break them from eachother ///'
hOpenContextMenu hOpenContextMenu
sleep 1 sleep 1
hMenuSelectNr(11) hMenuSelectNr(11)
sleep 1 sleep 1
'/// unmark the objects, thereafter mark them again ///'
gMouseClick (10, 10) gMouseClick (10, 10)
sleep 1 sleep 1
EditSelectAll EditSelectAll
sleep 1 sleep 1
'/// Check the amount of objects ///'
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1)) StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
else else
kontext "DocumentDraw" kontext "DocumentDraw"
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1)) StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
endif endif
value3 = left(StatusBarText,1) value3 = left(StatusBarText,1)
printlog "StatusBarText was: " + StatusBarText printlog "StatusBarText was: " + StatusBarText
'/// if the same as any of the ones before: Wrong ///'
if (value3 = value1 OR value3 = value2) then if (value3 = value1 OR value3 = value2) then
warnlog "Expected to find three objects, but found " + value3 + " instead." warnlog "Expected to find three objects, but found " + value3 + " instead."
endif endif
'/// if 3 objects, then everything is ok ///'
if value3 = 3 then if value3 = 3 then
printlog "Found three objects. Means the test was successful." printlog "Found three objects. Means the test was successful."
else else
warnlog "Wrong value, expected three objects, but found " + value3 + "." warnlog "Wrong value, expected three objects, but found " + value3 + "."
endif endif
'/// Go through the different Corner-styles ///'
hOpenContextMenu hOpenContextMenu
hMenuSelectNr(2) 'Choose "Line" hMenuSelectNr(2) 'Choose "Line"
Kontext "TabLinie" Kontext "TabLinie"
cfirst = CornerStyle.GetSelIndex cfirst = CornerStyle.GetSelIndex
For i = 1 to CornerStyle.GetItemCount For i = 1 to CornerStyle.GetItemCount
Kontext "TabLinie" Kontext "TabLinie"
if (i > 1) AND (cname <> CornerStyle.GetSelText) then if (i > 1) AND (cname <> CornerStyle.GetSelText) then
warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText
endif endif
CornerStyle.Select i CornerStyle.Select i
cname = CornerStyle.GetSelText cname = CornerStyle.GetSelText
Printlog " Found and selected Corner-Style: " + cname Printlog " Found and selected Corner-Style: " + cname
TabLinie.Ok TabLinie.Ok
sleep 1 sleep 1
hOpenContextMenu hOpenContextMenu
hMenuSelectNr(2) 'Choose "Line" hMenuSelectNr(2) 'Choose "Line"
Next i Next i
Kontext "TabLinie" Kontext "TabLinie"
CornerStyle.Select cfirst CornerStyle.Select cfirst
TabLinie.Ok TabLinie.Ok
'/// And a nice finish to make life a bit happier for anyone who looks at the test ///'
kontext "Toolbar" kontext "Toolbar"
Ellipsen.Click Ellipsen.Click
if (gApplication = "DRAW") then if (gApplication = "DRAW") then
Kontext "DocumentDraw" Kontext "DocumentDraw"
gMouseMove (40,40, 50,30) gMouseMove (40,40, 50,30)
sleep 1 sleep 1
kontext "Toolbar" kontext "Toolbar"
Ellipsen.Click Ellipsen.Click
Kontext "DocumentDraw" Kontext "DocumentDraw"
gMouseMove (51,40, 61,30) gMouseMove (51,40, 61,30)
kontext "Toolbar" kontext "Toolbar"
Ellipsen.Click Ellipsen.Click
Kontext "DocumentDraw" Kontext "DocumentDraw"
gMouseMove (48,43, 53,50) gMouseMove (48,43, 53,50)
else else
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseMove (40,40, 50,30) gMouseMove (40,40, 50,30)
sleep 1 sleep 1
kontext "Toolbar" kontext "Toolbar"
Ellipsen.Click Ellipsen.Click
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseMove (51,40, 61,30) gMouseMove (51,40, 61,30)
kontext "Toolbar" kontext "Toolbar"
Ellipsen.Click Ellipsen.Click
Kontext "DocumentImpress" Kontext "DocumentImpress"
gMouseMove (48,43, 53,50) gMouseMove (48,43, 53,50)
endif endif
gMouseClick (10, 10) gMouseClick (10, 10)
'/// Close the document ///'
hCloseDocument hCloseDocument
'/// Endcase ///'
endcase 'tiLineConnect endcase 'tiLineConnect
'-------------------------------------------------------------------------------' '-------------------------------------------------------------------------------'

View File

@@ -50,121 +50,137 @@
' #1 tSaveLoadLayoutChart ' #1 tSaveLoadLayoutChart
' #1 tSaveLoadLayoutSpreadsheet ' #1 tSaveLoadLayoutSpreadsheet
'\************************************************************************************* '\*************************************************************************************
testcase tFileOpenSaveEtc testcase tFileOpenSaveEtc
Dim Dokument$ Dim Dokument$
Dim Dokument2$ Dim Dokument2$
Dokument$ = ConvertPath ( gOfficePath + "user\work\test1") Dokument$ = ConvertPath ( gOfficePath + "user\work\test1")
Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2") Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2")
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
end if end if
if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp") '/// delete previous created documents: 'user\\work\\test1*.od?' ///'
if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg") if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp")
if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg")
hNewDocument '/// open application ///'
gMouseclick 90,90 hNewDocument
Call hTextrahmenErstellen ( "This is a test",20,20,40,30 ) gMouseclick 90,90
hFileSaveAsKill (Dokument$ + "." + ExtensionString) '/// create a textframe with content ///'
Sleep 10 Call hTextrahmenErstellen ( "This is a test",20,20,40,30 )
hCloseDocument '/// save file as 'test1' ///'
printlog "- Document Saved and Closed" hFileSaveAsKill (Dokument$ + "." + ExtensionString)
Sleep 10
'/// close Document ///'
hCloseDocument
printlog "- Document Saved and Closed"
hFileOpen (Dokument$ + "." + ExtensionString) '/// load document 'test1' ///'
hFileOpen (Dokument$ + "." + ExtensionString)
Sleep 10 Sleep 10
hCloseDocument '/// close Document ///'
printlog "- document Loaded and closed" hCloseDocument
Sleep 10 printlog "- document Loaded and closed"
hFileOpen (Dokument$ + "." + ExtensionString) Sleep 10
' check if the document is writable '/// load document 'test1' ///'
if fIsDocumentWritable = false then hFileOpen (Dokument$ + "." + ExtensionString)
' make the document writable and check if it's succesfull ' check if the document is writable
if fMakeDocumentWritable = false then if fIsDocumentWritable = false then
warnlog "The document can't be make writeable. Test stopped." ' make the document writable and check if it's succesfull
goto endsub if fMakeDocumentWritable = false then
endif warnlog "The document can't be make writeable. Test stopped."
endif goto endsub
Sleep 10 endif
gMouseclick 90,90 endif
Call hTextrahmenerstellen ( "Change",60,60,80,80 ) Sleep 10
FileClose gMouseclick 90,90
Kontext ' message about 'something changed should i [overwrite discard cancel]?' '/// create another textbox with content ///'
if Messagebox.exists (5) then Call hTextrahmenerstellen ( "Change",60,60,80,80 )
printlog "2:"+messagebox.gettext '/// File->Close needn't work, just say CANCEL to the question about saving changes! ///'
Messagebox.Cancel FileClose
else Kontext ' message about 'something changed should i [overwrite discard cancel]?'
Warnlog "Mesagebox is missing :-(" if Messagebox.exists (5) then
endif printlog "2:"+messagebox.gettext
printlog "- Document loaded, changed and closed discarding all changes" Messagebox.Cancel
else
printlog "- Last version" Warnlog "Mesagebox is missing :-("
try endif
catch printlog "- Document loaded, changed and closed discarding all changes"
kontext "documentimpress"
try
catch
warnlog "Damn reload ?? Why ? BREAKPOINT! File reload doesn't work. Create new object and try again :-("
endcatch
endcatch
Kontext
Messagebox.Yes
Sleep 10
gMouseDoubleClick 70,70
hTypeKeys "<Down>", 3
hTypeKeys "<SHIFT LEFT>",10
hTypeKeys "<MOD1 C>"
Sleep 1
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"
gMouseclick 90,90
sleep 1
FileSaveAs
Kontext "SpeichernDlg"
Dateiname.SetText Dokument2$
Speichern.Click
kontext "AlienWarning"
if AlienWarning.exists(5) then
warnlog "#i41983# Alien Warning on export not allowed"
AlienWarning.OK
endif
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
sleep 10
Kontext "Messagebox"
if Messagebox.Exists Then
Warnlog "- Document saved, but Msgbox appeared, even no changes were made: " + Messagebox.GetText
Messagebox.Yes
end if
sleep 2
printlog "- Loading write protected file"
Kontext "OeffnenDlg"
Dateiname.SetText (Dokument2$ + "." + ExtensionString)
NurLesen.Check
Oeffnen.Click
Sleep 10
' check if the document is writable
try
hTypeKeys "<SHIFT LEFT>",5
hTypeKeys "<MOD1 C>"
sleep 1
if GetClipboardText = "Hello" then Warnlog "Write protected document could be edited"
catch
Printlog "- Write protected document could not be edited"
endcatch
sleep 5
endcase
'********************************************************************************************
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
endcatch
Kontext
Messagebox.Yes
Sleep 10
gMouseDoubleClick 70,70
hTypeKeys "<Down>", 3
hTypeKeys "<SHIFT LEFT>",10
hTypeKeys "<MOD1 C>"
Sleep 1
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
Kontext "SpeichernDlg"
Dateiname.SetText Dokument2$
Speichern.Click
kontext "AlienWarning"
if AlienWarning.exists(5) then
warnlog "#i41983# Alien Warning on export not allowed"
AlienWarning.OK
endif
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
FileClose '/// Close document ///'
sleep 10
Kontext "Messagebox"
if Messagebox.Exists Then
Warnlog "- Document saved, but Msgbox appeared, even no changes were made: " + Messagebox.GetText
Messagebox.Yes
end if
sleep 2
printlog "- Loading write protected file"
FileOpen '/// Open write protected file ///'
Kontext "OeffnenDlg"
Dateiname.SetText (Dokument2$ + "." + ExtensionString)
NurLesen.Check
Oeffnen.Click
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
if GetClipboardText = "Hello" then Warnlog "Write protected document could be edited"
catch
Printlog "- Write protected document could not be edited"
endcatch
sleep 5
FileClose '/// Close document ///'
endcase 'tFileOpenSaveEtc
'--------------------------------------------------------
testcase tFileProperties testcase tFileProperties
qaerrorlog "#i88163#, File/properties/user defined fields get mixed up." qaerrorlog "#i88163#, File/properties/user defined fields get mixed up."
goto endsub goto endsub
Call hNewDocument Call hNewDocument
@@ -322,146 +338,161 @@ testcase tFileOpenImport
endcase endcase
'******************************************************************************************** '********************************************************************************************
testcase tTestDXF255CharBug testcase tTestDXF255CharBug
dim q as integer
call hNewDocument '/// tries to load a DXF-document which has a string-leght of 255 characters. ///'
sleep 1 dim q as integer
kontext "Active" call hNewDocument
sleep 1 InsertGraphicsFromFile '/// insert graphic ///'
sleep 1
kontext "Active"
sleep 1
if Active.Exists Then if Active.Exists Then
Active.OK Active.OK
end if end if
sleep 1 sleep 1
Kontext "GrafikEinfuegenDlg" Kontext "GrafikEinfuegenDlg"
sleep 2 sleep 2
Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) '/// Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) ///'
Oeffnen.Click Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
Sleep 2 Oeffnen.Click
Sleep 2
if gApplication = "DRAW" then if gApplication = "DRAW" then
Kontext "Documentdraw" Kontext "Documentdraw"
if Documentdraw.exists(5) then if Documentdraw.exists(5) then
Documentdraw.TypeKeys ("<Tab>") Documentdraw.TypeKeys ("<Tab>")
else else
warnlog "Not loaded in draw" warnlog "Not loaded in draw"
endif endif
else '(Impress) else '(Impress)
Kontext "DocumentImpress" Kontext "DocumentImpress"
if DocumentImpress.exists(5) then if DocumentImpress.exists(5) then
DocumentImpress.TypeKeys ("<Tab>") DocumentImpress.TypeKeys ("<Tab>")
else else
warnlog "Not loaded in impress" warnlog "Not loaded in impress"
endif endif
endif endif
try
ContextPositionAndSize
kontext
messagebox.setpage TabPositionAndSize
sleep 1
TabPositionAndSize.Close
catch
warnlog "DXF-Document could not be loaded :-("
endcatch
Call hCloseDocument
endcase
try
ContextPositionAndSize
kontext
messagebox.setpage TabPositionAndSize
sleep 1
TabPositionAndSize.Close
catch
warnlog "DXF-Document could not be loaded :-("
endcatch
Call hCloseDocument
endcase 'tTestDXF255CharBug
'******************************************************************************************** '********************************************************************************************
testcase tDeletedTemplate testcase tDeletedTemplate
dim i as integer dim i as integer
dim Dokument1$ dim Dokument1$
dim Dokument2$ dim Dokument2$
dim SavedActiveMessage as string dim SavedActiveMessage as string
dim found as boolean dim found as boolean
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
end if end if
Dokument1$ = ConvertPath ( gOfficePath + "user\work\test1." & ExtensionString) Dokument1$ = ConvertPath ( gOfficePath + "user\work\test1." & ExtensionString)
Dokument2$ = ConvertPath ( gOfficePath + "user\work\test2." & ExtensionString) Dokument2$ = ConvertPath ( gOfficePath + "user\work\test2." & ExtensionString)
'/// delete previous created documents: 'user\\work\\test*.odp' ///'
if Dir (Dokument1$) <> "" then kill Dokument1$
if Dir (Dokument2$) <> "" then kill Dokument2$
if Dir (Dokument1$) <> "" then kill Dokument1$ '/// open application ///'
if Dir (Dokument2$) <> "" then kill Dokument2$ 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"
hNewDocument '/// open application again ///'
gMouseclick 90,90 hNewDocument
Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 ) gMouseclick 90,90
hFileSaveAsKill (Dokument1$) '/// create another textframe with content ///'
Sleep 10 Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 )
hCloseDocument '/// save file as 'test2.odp' ///'
printlog "- Document 'test1.odp' Saved and Closed" hFileSaveAsKill (Dokument2$)
Sleep 10
'/// close Document ///'
hCloseDocument
printlog "- Document 'test2.odp' Saved and Closed"
hNewDocument '/// Delete the first file ///'
gMouseclick 90,90 try
Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 ) kill Dokument1$
hFileSaveAsKill (Dokument2$) Printlog " Correctly deleted the file: " + Dokument1$
Sleep 10 catch
hCloseDocument warnlog "Could not delete the file: " + Dokument1$
printlog "- Document 'test2.odp' Saved and Closed" endcatch
try '/// File => New => Presentation ///'
kill Dokument1$ FileAutopilotPresentation '/// new document-autopilot ///'
Printlog " Correctly deleted the file: " + Dokument1$ Kontext "AutopilotPraesentation1"
catch sleep 5
warnlog "Could not delete the file: " + Dokument1$ Existingpresentation.Check
endcatch sleep 5
kontext "active"
Kontext "AutopilotPraesentation1" if active.exists then
sleep 5 SavedActiveMessage = Active.GetText
Existingpresentation.Check QaErrorLog "Message: " + SavedActiveMessage
sleep 5 active.ok
kontext "active" Kontext "AutopilotPraesentation1"
if active.exists then if Existinglist.GetSelText = "test1.odp" then
SavedActiveMessage = Active.GetText warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
QaErrorLog "Message: " + SavedActiveMessage endif
active.ok SavedActiveMessage = ""
Kontext "AutopilotPraesentation1" endif
if Existinglist.GetSelText = "test1.odp" then Kontext "AutopilotPraesentation1"
warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage Existinglist.TypeKeys "<HOME>"
endif sleep 5
SavedActiveMessage = "" found = false
endif for i = 1 to Existinglist.GetItemCount
Kontext "AutopilotPraesentation1" kontext "active"
Existinglist.TypeKeys "<HOME>" if active.exists then
sleep 5 SavedActiveMessage = Active.GetText
found = false active.ok
for i = 1 to Existinglist.GetItemCount endif
kontext "active" Kontext "AutopilotPraesentation1"
if active.exists then if Existinglist.GetSelText = "test1.odp" then
SavedActiveMessage = Active.GetText found = true
active.ok if SavedActiveMessage <> "" then
endif warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
Kontext "AutopilotPraesentation1" else
if Existinglist.GetSelText = "test1.odp" then warnlog " The deleted File was found. However without any messagebox."
found = true endif
if SavedActiveMessage <> "" then endif
warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage Existinglist.TypeKeys "<DOWN>"
else sleep 5
warnlog " The deleted File was found. However without any messagebox." next i
endif if found = true then warnlog " An error-message showed up. Eventually a result of '138498'"
endif AutopilotPraesentation1.Cancel
Existinglist.TypeKeys "<DOWN>" Sleep 2
sleep 5 '/// Delete the second file ///'
next i try
if found = true then warnlog " An error-message showed up. Eventually a result of '138498'" kill Dokument2$
AutopilotPraesentation1.Cancel Printlog " Correctly deleted the file: " + Dokument2$
Sleep 2 catch
try warnlog "Could not delete the file: " + Dokument2$
kill Dokument2$ endcatch
Printlog " Correctly deleted the file: " + Dokument2$
catch
warnlog "Could not delete the file: " + Dokument2$
endcatch
endcase
endcase 'tDeletedTemplate
'**************************************************************************************************** '****************************************************************************************************
testcase tSaveLoadLayoutEmpty testcase tSaveLoadLayoutEmpty

View File

@@ -45,193 +45,218 @@ testcase g_mediaplayer
dim timevalue2 dim timevalue2
dim timevalue3 dim timevalue3
dim timecounter, iWaitIndex, timefound as integer dim timecounter, iWaitIndex, timefound as integer
if iSprache <> 39 then if iSprache <> 39 then
Printlog "- MediaPlayer" Printlog "- MediaPlayer"
if gPlatgroup = "unx" then if gPlatgroup = "unx" then
QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed." QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed."
goto endsub goto endsub
endif endif
Datei$ = ConvertPath (convertPath (gTesttoolPath + "graphics\required\input\29secsound.wav")) Datei$ = ConvertPath (convertPath (gTesttoolPath + "graphics\required\input\29secsound.wav"))
'/// Open New Document ///'
Call hNewDocument Call hNewDocument
sleep 2 sleep 2
'/// Check if the Media Player already exists - if so - close it ///'
kontext "mPlayer" kontext "mPlayer"
if mPlayer.exists then ' Close the MediaPlayer if mPlayer.exists then ' Close the MediaPlayer
warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA." warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA."
ToolsMediaPlayer ToolsMediaPlayer
printlog "Closed the Media Player" printlog "Closed the Media Player"
endif endif
'/// Tools - MediaPlayer ///'
ToolsMediaPlayer ToolsMediaPlayer
sleep 2 sleep 2
'/// Open file ///' 'a bigger / longer one
kontext "mPlayer" kontext "mPlayer"
if mPlayer.exists then if mPlayer.exists then
printlog "The MediaPlayer was open." printlog "The MediaPlayer was open."
else else
warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test." warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test."
goto endsub Call hCloseDocument '/// Close document ///'
goto endsub
endif endif
Mopen.Click Mopen.Click
kontext "OeffnenDlg" kontext "OeffnenDlg"
Pfad.SetText Datei$ Pfad.SetText Datei$
Oeffnen.Click 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 iWaitIndex = 0
do while OeffnenDlg.Exists AND iWaitIndex < 10 do while OeffnenDlg.Exists AND iWaitIndex < 10
sleep (1) sleep (1)
iWaitIndex = iWaitIndex + 1 iWaitIndex = iWaitIndex + 1
loop loop
kontext "Active" kontext "Active"
if Active.exists then if Active.exists then
Warnlog "Error when opening file. Last dialogue said: " + Active.GetText Warnlog "Error when opening file. Last dialogue said: " + Active.GetText
Active.OK Active.OK
kontext "Mplayer" kontext "Mplayer"
ToolsMediaPlayer ToolsMediaPlayer
goto endsub Call hCloseDocument '/// close document ///'
goto endsub
else else
kontext "Mplayer" kontext "Mplayer"
if Mplayer.exists then printlog "Media Player was opened." if Mplayer.exists then printlog "Media Player was opened."
endif
timevalue1 = mTimeedit.GetText
sleep 2
mStop.Click
printlog "Just pressed stop."
sleep 1
timevalue2 = mTimeedit.GetText
sleep 2
timevalue3 = mTimeedit.GetText
printlog "The time was: " + mTimeedit.GetText
if timevalue1 = timevalue2 AND timevalue2 = timevalue3 then
if gtSYSName <> "WinXP" then '("Solaris x86" OR "Linux" OR "Solaris") then
warnlog "The sound doesnt seem to be played at all. And since the test is run on a platform which needs extra libraries, the test ends now."
kontext "Mplayer"
if Mplayer.Exists(3) then
ToolsMediaPlayer
endif
goto endsub
else
warnlog "The sound doesnt seem to be played at all, but I will continue the test. The platform was: " + gtSYSName
endif
else
if timevalue1 <> timevalue2 AND timevalue2 = timevalue3 then
Printlog "the stop-button seemed to work. Good."
else
warnlog "Very strange. The first value was: " + timevalue1 + ". Second: " + timevalue2 + ". Third: " + timevalue3
endif
endif
' Save value
timevalue1 = mTimeedit.GetText
' Press 'Play'
mPlay.Click
sleep 2
timevalue2 = mTimeedit.GetText
printlog "The time was: " + mTimeedit.GetText
if timevalue1 = timevalue2 then
warnlog "The play-button didnt seem to work" ' Because the time did not change.
else
Printlog "the play-button seemed to work. Good."
endif
mPlay.Click
sleep 10
mPause.Click
printlog "Pause."
timevalue1 = mTimeedit.GetText
sleep 2
timevalue2 = mTimeedit.GetText
printlog "The time was: " + mTimeedit.GetText
if timevalue1 <> timevalue2 then
warnlog "The pause-button didnt seem to work"
else
Printlog "the pause-button seemed to work. Good."
endif
mStop.Click 'to get to the beginning.
sleep 1 'And make sure it's really the beginning.
timevalue1 = mTimeedit.GetText
if timevalue1 <> "00:00:00 / 00:00:29" then
warnlog "Expected the time to go back to 00:00:00, but was " + timevalue1 + " instead."
mStop.Click 'to make another try to get to the beginning again.
else
printlog "Sound stopped, time-value set to 00:00:00."
endif
printlog "We press 'Play'"
mPlay.Click 'to get it running
sleep 5
timefound = 0
for timecounter = 1 to 50000
timevalue1 = mTimeedit.GetText
if timevalue1 = "00:00:20 / 00:00:29" then
timecounter = 50000
timefound = 1
endif
if timevalue1 = "00:00:29 / 00:00:29" then
timecounter = 50000
timefound = 2
endif
next timecounter
if timefound = 1 then
Printlog "the time-counter seemed to work. Good."
elseif timefound = 2 then
warnlog "Contact the test-administrator, this test needs to be rewritten."
elseif timefound = 0 then
warnlog "Either the time didnt change, or the test-computer is too fast."
endif
'-Repeat
'Plays the file repeatedly.
mLoop.Click
'mVolume. 'Click
'-Volume slider
'Adjusts the volume.
mMute.Click
sleep 1
mMute.Click
'-Mute
'Turns sound off and on.
' mTimeslider. 'Click
'-Position slider
'Moves to a different position in the file.
'mZoomlistbox.
'-Zoom
'Adjusts the size of the movie playback.
mInsert.Click
sleep 10
ToolsMediaPlayer
if (gApplication = "IMPRESS") then
kontext "DocumentImpress"
else
kontext "DocumentDraw"
endif
hTypeKeys ("<escape><tab>")
hOpenContextMenu()
hMenuSelectNr(1)
Kontext "TabPositionAndSize"
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if Width.Exists then
Printlog "Position and Size came up, object inserted correctly."
TabPositionAndSize.OK
else
Warnlog "Position And Size didn't come up, was there no sound-object inserted?"
endif
sleep 2
else
qaerrorLog "#74350# - Different strings in g_mediaplayer under Italian."
endif endif
timevalue1 = mTimeedit.GetText
'/// Stop ///'
sleep 2
mStop.Click
printlog "Just pressed stop."
sleep 1
timevalue2 = mTimeedit.GetText
sleep 2
timevalue3 = mTimeedit.GetText
printlog "The time was: " + mTimeedit.GetText
if timevalue1 = timevalue2 AND timevalue2 = timevalue3 then
if gtSYSName <> "WinXP" then '("Solaris x86" OR "Linux" OR "Solaris") then
warnlog "The sound doesnt seem to be played at all. And since the test is run on a platform which needs extra libraries, the test ends now."
kontext "Mplayer"
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
endif
else
if timevalue1 <> timevalue2 AND timevalue2 = timevalue3 then
Printlog "the stop-button seemed to work. Good."
else
warnlog "Very strange. The first value was: " + timevalue1 + ". Second: " + timevalue2 + ". Third: " + timevalue3
endif
endif
'/// Play ///'
' Save value
timevalue1 = mTimeedit.GetText
' Press 'Play'
mPlay.Click
sleep 2
timevalue2 = mTimeedit.GetText
printlog "The time was: " + mTimeedit.GetText
if timevalue1 = timevalue2 then
warnlog "The play-button didnt seem to work" ' Because the time did not change.
else
Printlog "the play-button seemed to work. Good."
endif
'/// Pause ///'
mPlay.Click
sleep 10
mPause.Click
printlog "Pause."
timevalue1 = mTimeedit.GetText
sleep 2
timevalue2 = mTimeedit.GetText
printlog "The time was: " + mTimeedit.GetText
if timevalue1 <> timevalue2 then
warnlog "The pause-button didnt seem to work"
else
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
if timevalue1 <> "00:00:00 / 00:00:29" then
warnlog "Expected the time to go back to 00:00:00, but was " + timevalue1 + " instead."
mStop.Click 'to make another try to get to the beginning again.
else
printlog "Sound stopped, time-value set to 00:00:00."
endif
printlog "We press 'Play'"
mPlay.Click 'to get it running
sleep 5
timefound = 0
for timecounter = 1 to 50000
timevalue1 = mTimeedit.GetText
if timevalue1 = "00:00:20 / 00:00:29" then
timecounter = 50000
timefound = 1
endif
if timevalue1 = "00:00:29 / 00:00:29" then
timecounter = 50000
timefound = 2
endif
next timecounter
if timefound = 1 then
Printlog "the time-counter seemed to work. Good."
elseif timefound = 2 then
warnlog "Contact the test-administrator, this test needs to be rewritten."
elseif timefound = 0 then
warnlog "Either the time didnt change, or the test-computer is too fast."
endif
'-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
kontext "DocumentDraw"
endif
hTypeKeys ("<escape><tab>")
hOpenContextMenu()
hMenuSelectNr(1)
Kontext "TabPositionAndSize"
Kontext
Active.SetPage TabPositionAndSize
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
endcase endcase

View File

@@ -44,24 +44,28 @@
testcase tOLE_Copy testcase tOLE_Copy
qaerrorlog "not running due to reconstruction" qaerrorlog "not running due to reconstruction"
goto endsub goto endsub
printlog "Test to see if three different OLEs can be copied and identified correctly."
dim writerfilename1 as string dim writerfilename1 as string
writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg") writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg")
printlog "Open draw-file" & writerfilename1
FileOpen FileOpen
Kontext "OeffnenDlg" Kontext "OeffnenDlg"
sleep 1 sleep 1
Dateiname.SetText (writerfilename1) Dateiname.SetText (writerfilename1)
Oeffnen.Click Oeffnen.Click
Sleep 3 Sleep 3
printlog "When messagebox about Update all links shows up - press yes."
kontext "Messagebox" kontext "Messagebox"
if Messagebox.exists then if Messagebox.exists then
Messagebox.Yes Messagebox.Yes
endif endif
sleep 3 sleep 3
gApplication = "DRAW" gApplication = "DRAW"
printlog "Select first object. Use EditCopy to copy it to the clipboard"
sleep 1 sleep 1
kontext "DocumentDraw" kontext "DocumentDraw"
DocumentDraw.mousedown (10,10) DocumentDraw.mousedown (10,10)
@@ -69,49 +73,57 @@ testcase tOLE_Copy
sleep 1 sleep 1
DocumentDraw.Typekeys "<TAB>" DocumentDraw.Typekeys "<TAB>"
EditCopy EditCopy
printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
Call hCloseDocument Call hCloseDocument
gApplication = "IMPRESS" gApplication = "IMPRESS"
Call hNewDocument Call hNewDocument
EditPaste EditPaste
printlog "Select object and check via the Context-menu what it has been opened as."
sleep 1 sleep 1
Kontext "DocumentImpress" Kontext "DocumentImpress"
hTypekeys "<MOD1> A" hTypekeys "<MOD1> A"
hTypekeys "<RETURN>" hTypekeys "<RETURN>"
hOpenContextMenu hOpenContextMenu
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries." Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if end if
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3 sleep 3
MenuSelect (1) 'Default MenuSelect (1) 'Default
Kontext "RechenleisteCalc" Kontext "RechenleisteCalc"
if RechenleisteCalc.Exists then if RechenleisteCalc.Exists then
Printlog "This is a spreadsheet-Document. Good" Printlog "This is a spreadsheet-Document. Good"
endif endif
Kontext "DocumentImpress" Kontext "DocumentImpress"
printlog "Click outside the OLE to deactivate it. Then close the Document "
DocumentImpress.mousedown (10,10) DocumentImpress.mousedown (10,10)
DocumentImpress.mouseup (10,10) DocumentImpress.mouseup (10,10)
sleep 3 sleep 3
Call hCloseDocument Call hCloseDocument
printlog "Open Draw-file "
FileOpen FileOpen
Kontext "OeffnenDlg" Kontext "OeffnenDlg"
sleep 1 sleep 1
Dateiname.SetText (writerfilename1) Dateiname.SetText (writerfilename1)
Oeffnen.Click Oeffnen.Click
Sleep 3 Sleep 3
printlog " When messagebox about Update all links shows up - press yes."
kontext "Messagebox" kontext "Messagebox"
if Messagebox.exists then if Messagebox.exists then
Messagebox.Yes Messagebox.Yes
endif endif
sleep 3 sleep 3
printlog "Select second object. Use EditCopy to copy it to the clipboard."
gApplication = "DRAW" gApplication = "DRAW"
sleep 1 sleep 1
kontext "DocumentDraw" kontext "DocumentDraw"
@@ -120,43 +132,49 @@ testcase tOLE_Copy
sleep 1 sleep 1
DocumentDraw.Typekeys "<TAB><TAB>" DocumentDraw.Typekeys "<TAB><TAB>"
EditCopy EditCopy
printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
sleep 1 sleep 1
DocumentDraw.mousedown (10,10) DocumentDraw.mousedown (10,10)
DocumentDraw.mouseup (10,10) DocumentDraw.mouseup (10,10)
sleep 1 sleep 1
Call hCloseDocument Call hCloseDocument
gApplication = "IMPRESS" gApplication = "IMPRESS"
Call hNewDocument Call hNewDocument
EditPaste EditPaste
printlog "Select the object, and check via the Context-menu what it has been opened as."
sleep 1 sleep 1
Kontext "DocumentImpress" Kontext "DocumentImpress"
hTypekeys "<MOD1> A" hTypekeys "<MOD1> A"
hTypekeys "<RETURN>" hTypekeys "<RETURN>"
hOpenContextMenu hOpenContextMenu
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries." Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if end if
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3 sleep 3
MenuSelect (1) 'Default MenuSelect (1) 'Default
Kontext "RechenleisteCalc" Kontext "RechenleisteCalc"
if RechenleisteCalc.Exists then if RechenleisteCalc.Exists then
Printlog "This is a spreadsheet-Document. Good" Printlog "This is a spreadsheet-Document. Good"
endif endif
kontext "DocumentImpress" kontext "DocumentImpress"
sleep 1 sleep 1
DocumentImpress.mousedown (10,10) DocumentImpress.mousedown (10,10)
DocumentImpress.mouseup (10,10) DocumentImpress.mouseup (10,10)
sleep 1 sleep 1
printlog "Close document"
Call hCloseDocument Call hCloseDocument
printlog "Open draw-file"
FileOpen FileOpen
Kontext "OeffnenDlg" Kontext "OeffnenDlg"
sleep 1 sleep 1
@@ -164,11 +182,13 @@ testcase tOLE_Copy
Oeffnen.Click Oeffnen.Click
Sleep 3 Sleep 3
kontext "Messagebox" kontext "Messagebox"
printlog "When messagebox about Update all links shows up - press yes."
if Messagebox.exists then if Messagebox.exists then
Messagebox.Yes Messagebox.Yes
endif endif
sleep 3 sleep 3
printlog "Select third object. Use EditCopy to copy it to the clipboard."
gApplication = "DRAW" gApplication = "DRAW"
sleep 1 sleep 1
kontext "DocumentDraw" kontext "DocumentDraw"
@@ -177,7 +197,8 @@ testcase tOLE_Copy
sleep 1 sleep 1
DocumentDraw.Typekeys "<TAB><TAB><TAB>" DocumentDraw.Typekeys "<TAB><TAB><TAB>"
EditCopy EditCopy
printlog "Close the Document. Open new Impress-Document. Paste the OLE-Object."
sleep 1 sleep 1
DocumentDraw.mousedown (10,10) DocumentDraw.mousedown (10,10)
DocumentDraw.mouseup (10,10) DocumentDraw.mouseup (10,10)
@@ -187,37 +208,40 @@ testcase tOLE_Copy
gApplication = "IMPRESS" gApplication = "IMPRESS"
Call hNewDocument Call hNewDocument
EditPaste EditPaste
printlog "Select the object, and check via the Context-menu what it has been opened as."
Kontext "DocumentImpress" Kontext "DocumentImpress"
hTypekeys "<MOD1> A" hTypekeys "<MOD1> A"
hTypekeys "<RETURN>" hTypekeys "<RETURN>"
hOpenContextMenu hOpenContextMenu
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries." Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if end if
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3 sleep 3
MenuSelect (1) 'Default MenuSelect (1) 'Default
Kontext "RechenleisteCalc" Kontext "RechenleisteCalc"
if RechenleisteCalc.Exists then if RechenleisteCalc.Exists then
Printlog "This is a spreadsheet-Document. Good" Printlog "This is a spreadsheet-Document. Good"
endif endif
printlog "Close Context menu. Then close the Document"
Call hCloseDocument Call hCloseDocument
endcase 'tOLE_Copy endcase 'tOLE_Copy
'-----------------------------------------------------------------------------------------------------------' '-----------------------------------------------------------------------------------------------------------'
testcase tOLE_SaveLoad testcase tOLE_SaveLoad
printlog "Test to see if an OLE can be inserted, saved and loaded correctly." printlog "Test to see if an OLE can be inserted, saved and loaded correctly."
dim filename as string dim filename as string
dim filetype as string dim filetype as string
dim filetype2 as string dim filetype2 as string
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
@@ -229,13 +253,13 @@ testcase tOLE_SaveLoad
printlog "Insert->Object->OLE Object..." printlog "Insert->Object->OLE Object..."
InsertObjectOLEObject InsertObjectOLEObject
Kontext "OLEObjektInsert" Kontext "OLEObjektInsert"
printlog "Choose create new. Select Writer." printlog "Choose create new. Select Writer."
Objekttyp.Select 5 Objekttyp.Select 5
printlog "Click OK to close dialog and insert OLE." printlog "Click OK to close dialog and insert OLE."
OLEObjektInsert.OK OLEObjektInsert.OK
printlog "Deselect object." printlog "Deselect object."
sleep 1 sleep 1
kontext "DocumentImpress" kontext "DocumentImpress"
@@ -260,7 +284,7 @@ testcase tOLE_SaveLoad
Dateiname.Settext (filename) Dateiname.Settext (filename)
printlog "Saving as: " & filename printlog "Saving as: " & filename
Speichern.Click Speichern.Click
printlog "If the file already exists - press yes to overwrite it." printlog "If the file already exists - press yes to overwrite it."
Sleep 3 Sleep 3
kontext "Messagebox" kontext "Messagebox"
@@ -268,7 +292,7 @@ testcase tOLE_SaveLoad
Messagebox.Yes Messagebox.Yes
endif endif
Sleep 3 Sleep 3
printlog "Getting type of OLE from save as dialog." printlog "Getting type of OLE from save as dialog."
hOpenContextMenu hOpenContextMenu
hMenuSelectNr(-1) hMenuSelectNr(-1)
@@ -286,7 +310,7 @@ testcase tOLE_SaveLoad
Call hFileOpen (filename) Call hFileOpen (filename)
sleep 1 sleep 1
hTypekeys "<MOD1 A>" hTypekeys "<MOD1 A>"
hOpenContextMenu hOpenContextMenu
hMenuSelectNr(-1) hMenuSelectNr(-1)
Kontext "SpeichernDlg" Kontext "SpeichernDlg"
filetype2 = Dateityp.GetSelText filetype2 = Dateityp.GetSelText
@@ -303,25 +327,31 @@ testcase tOLE_SaveLoad
'FHA TODO 'FHA TODO
'testcase tOLE_DragDrop '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_DragDrop
endcase ' tOLE_Save endcase ' tOLE_Save
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiOpenOLECrash testcase tiOpenOLECrash
dim sFileodp as string dim sFileodp as string
dim oFile as string dim oFile as string
dim i as integer dim i as integer
printlog "Testing for bug nr: i70019"
printlog "Open Application"
Call hNewDocument Call hNewDocument
sleep 1 sleep 1
printlog "1. Open file: generic_de.ppt"
FileOpen FileOpen
sleep 1 sleep 1
Kontext "OeffnenDlg" Kontext "OeffnenDlg"
printlog " Use file: graphics\\optional\\input\\generic_de.ppt "
oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt") oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt")
Printlog "file: '" + oFile + "'" Printlog "file: '" + oFile + "'"
Dateiname.SetText (oFile) Dateiname.SetText (oFile)
printlog "2. Save this document as an *.odp -file."
Oeffnen.Click Oeffnen.Click
kontext "DocumentImpress" kontext "DocumentImpress"
i = 0 i = 0
@@ -336,7 +366,7 @@ testcase tiOpenOLECrash
if DocumentImpress.StatusIsProgress AND i > 19 then 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 endif
FileSaveAs FileSaveAs
Kontext "SpeichernDlg" Kontext "SpeichernDlg"
sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de")) sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de"))
@@ -347,16 +377,18 @@ testcase tiOpenOLECrash
if Messagebox.Exists(2) then if Messagebox.Exists(2) then
Messagebox.Yes Messagebox.Yes
Kontext "AlienWarning" Kontext "AlienWarning"
if AlienWarning.Exists(2) then if AlienWarning.Exists(2) then
Warnlog "Should not be any alienwarning when saving in our own format!" Warnlog "Should not be any alienwarning when saving in our own format!"
AlienWarning.OK AlienWarning.OK
end if end if
printlog "Saved as: " + sFileodp printlog "Saved as: " + sFileodp
end if end if
Sleep 3 Sleep 3
kontext "DocumentImpress" kontext "DocumentImpress"
printlog "3. Close Impress."
Call hCloseDocument Call hCloseDocument
printlog "4.Reopen the *.odp file again"
FileOpen FileOpen
Kontext "OeffnenDlg" Kontext "OeffnenDlg"
Dateiname.SetText (sFileodp + ".odp") Dateiname.SetText (sFileodp + ".odp")
@@ -367,7 +399,7 @@ testcase tiOpenOLECrash
Active.ok Active.ok
Warnlog "failed to open file? :-(" Warnlog "failed to open file? :-("
end if end if
i = 0 i = 0
do while (i < 20) do while (i < 20)
try try
@@ -378,40 +410,45 @@ testcase tiOpenOLECrash
endcatch endcatch
loop loop
if DocumentImpress.StatusIsProgress AND i > 19 then 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 endif
printlog "5. Right-click on the second slide and click on New slide. "
Kontext "Slides" Kontext "Slides"
SlidesControl.TypeKeys "<PAGEDOWN>" 'Goto second slide. (and get the focus right) SlidesControl.TypeKeys "<PAGEDOWN>" 'Goto second slide. (and get the focus right)
SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu (True) 'Open Context-menu SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu (True) 'Open Context-menu
hMenuSelectNr (1) 'New Slide 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 "<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>" hTypeKeys "<ESCAPE>"
gMouseClick 1,1 gMouseClick 1,1
hTypeKeys "<TAB><TAB>" '(to select the second object) hTypeKeys "<TAB><TAB>" '(to select the second object)
hTypeKeys "<RETURN>" hTypeKeys "<RETURN>"
sleep (2) sleep (2)
printlog "8. Choose OpenOffice.org 2.0 Formular"
Kontext "OLEObjektInsert" Kontext "OLEObjektInsert"
Objekttyp.Select (4) Objekttyp.Select (3)
sleep (2) 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 OLEObjektInsert.OK
sleep (2) sleep (2)
kontext "CommandsMath" kontext "CommandsMath"
Commands.TypeKeys "A over B + FACT 6 = x" 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... 'Comment: If I do this, the bug wont occur...
'hTypeKeys "<ESCAPE>" 'hTypeKeys "<ESCAPE>"
printlog "10. Click on the Save button."
kontext "Standardbar" kontext "Standardbar"
Speichern.Click Speichern.Click
printlog "11. Click on the X to close the window while the OLE-object still in Edit-mode."
Call hCloseDocument Call hCloseDocument
endcase endcase 'tiOpenOLECrash
'-----------------oooo-----------------oooo-----------------oooo-----------------

View File

@@ -40,434 +40,479 @@
' #1 tiShaddow ' #1 tiShaddow
'* '*
'\******************************************************************* '\*******************************************************************
testcase tiShaddow testcase tiShaddow
dim sFilter as string
dim i as integer
dim t as integer
dim q as integer
dim PosX as integer
dim PosY as integer
dim e as string
dim sFileName as string
dim ImageWidth as string
dim ImageHeight as string
dim shadowdistancevalue as string
dim shadowcolorvalue as string
dim shadowtransparencyvalue as string
dim linetype as string
dim linecolour as string
dim linewidth as string
dim cornerstyletype as string
dim sFilter as string
dim i as integer
dim t as integer
dim q as integer
dim PosX as integer
dim PosY as integer
dim e as string
dim sFileName as string
dim ImageWidth as string
dim ImageHeight as string
dim shadowdistancevalue as string
dim shadowcolorvalue as string
dim shadowtransparencyvalue as string
dim linetype as string
dim linecolour as string
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 if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
end if end if
Call hNewDocument '/// Open application ///'
sleep 1 Call hNewDocument
sleep 1
InsertGraphicsFromFile '/// Import picture ///'
sleep 3 InsertGraphicsFromFile
kontext "Active" sleep 3
if Active.Exists Then kontext "Active"
Active.OK if Active.Exists Then
end if Active.OK
sleep 5 end if
Kontext "GrafikEinfuegenDlg" sleep 5
sleep 2 Kontext "GrafikEinfuegenDlg"
Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif")) sleep 2
sleep 2 Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif"))
Oeffnen.Click sleep 2
printlog "Inserted file" Oeffnen.Click
sleep 2 printlog "Inserted file"
EditSelectAll sleep 2
sleep 3 '/// Select all ///'
FormatPositionAndSize EditSelectAll
kontext sleep 3
active.SetPage TabPositionAndSize '/// Check values and save them ///'
kontext "TabPositionAndSize" FormatPositionAndSize
ImageWidth = Width.GetText kontext
ImageHeight = Height.GetText active.SetPage TabPositionAndSize
printlog "Got values from position and size" kontext "TabPositionAndSize"
ProtectSize.Check ImageWidth = Width.GetText
TabPositionAndSize.Ok ImageHeight = Height.GetText
printlog "Got values from position and size"
'/// Check the "Protect Size"-button. And close dialogue. ///'
ProtectSize.Check
TabPositionAndSize.Ok
Kontext "GraphicObjectbar" '/// Add Shaddow via Toolbar-Button ///'
if GraphicObjectbar.Exists = FALSE then Kontext "GraphicObjectbar"
ViewToolbarsPicture if GraphicObjectbar.Exists = FALSE then
ViewToolbarsPicture
endif
if schatten.GetState(2) <> 0 then '0 = not pressed. 1 = pressed.
warnlog "Shaddow-button shouldnt have been checked"
end if
sleep 1
'/// click button 'Shadow' ///'
Schatten.Click
' '/// Check and save Shaddow-values via context-menu ///'
EditSelectAll
hOpenContextMenu
sleep(2)
if hMenuFindSelect(10142, true, 4) = false then
Warnlog "Context-Menu-entry `Area` was not found. Therefore the test ends."
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"
if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
if Anzeigen.GetState <> 1 then Warnlog "Anzeigen.GetState should be 1, but is: " + Anzeigen.GetState
Anzeigen.Check
else
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
shadowcolorvalue = Farbe.GetSelText
shadowtransparencyvalue = Transparenz.GetText
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"
if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
if Anzeigen.GetState <> 1 then Warnlog "should be active"
Anzeigen.Check
else
Warnlog "'Use Shadow' doesn't exist or isn't visible."
endif
if shadowdistancevalue <> Entfernung.GetText then
warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext
endif endif
if schatten.GetState(2) <> 0 then '0 = not pressed. 1 = pressed. if shadowcolorvalue <> Farbe.GetSelText then
warnlog "Shaddow-button shouldnt have been checked" warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.getSeltext
end if
sleep 1
Schatten.Click
EditSelectAll
hOpenContextMenu
sleep(2)
if hMenuFindSelect(10142, true, 4) = false then
Warnlog "Context-Menu-entry `Area` was not found. Therefore the test ends."
Call hCloseDocument
Goto Endsub
endif endif
sleep(2) if shadowtransparencyvalue <> Transparenz.GetText then
kontext "TabArea" warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
Kontext endif
active.SetPage TabSchatten TabSchatten.Ok
kontext "TabSchatten"
if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then '/// Add Cornerstyle via FormatLine ///'
if Anzeigen.GetState <> 1 then Warnlog "Anzeigen.GetState should be 1, but is: " + Anzeigen.GetState FormatLine
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
Stil.Select 2 ' Select Continuously.
linetype = Stil.GetItemText
Farbe.Select 2 ' Select Blue
linecolour = Farbe.GetItemText
Breite.More 3 ' Set Width to 3
linewidth = Breite.Gettext
CornerStyle.Select 4 ' Select number four: Beveled
cornerstyletype = CornerStyle.GetSelText
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
Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
Call hCloseDocument
Goto Endsub
endif
'Select "Position and Size"
sleep(2)
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
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
kontext "TabLinie"
if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
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"
Dateiname.SetText sFileName
printlog "Saving with filter: " + Dateityp.GetSelText
Speichern.Click
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Kontext "AlienWarning"
if AlienWarning.Exists(2) then AlienWarning.OK
printlog "Saved as: " + sFileName
catch
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
printlog "opened file successfully"
catch
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"
else
Printlog "Shaddowbutton activated, good."
endif
'/// Check the attributes for the picture ///'
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
Call hCloseDocument
Goto Endsub
endif
'Select "Position and Size"
sleep(2)
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
FormatArea
sleep 1
kontext "TabArea"
'/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
if Anzeigen.GetState <> 1 then Warnlog "Shaddow-checkbox should be active"
Anzeigen.Check Anzeigen.Check
else else
Warnlog "'Use Shadow' doesn't exist or isn't visible." Warnlog "'Use Shadow' doesn't exist or isn't visible."
endif endif
if shadowdistancevalue <> Entfernung.GetText then warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext
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
Entfernung.More ',2 '/// Check Transparency ///'
Transparenz.More ',2 Kontext
shadowdistancevalue = Entfernung.GetText Active.SetPage TabTransparenz
shadowcolorvalue = Farbe.GetSelText kontext "TabTransparenz"
shadowtransparencyvalue = Transparenz.GetText LineareTransparenz.Check
printlog "Got values from TabArea" shadowtransparencyvalue = MFLinTransparenz.GetText
TabSchatten.Ok
FormatArea sleep 2
sleep 1 Kontext
kontext "TabArea" active.SetPage TabSchatten
Kontext kontext "TabSchatten"
active.SetPage TabSchatten TabSchatten.Ok
kontext "TabSchatten"
if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then
if Anzeigen.GetState <> 1 then Warnlog "should be active"
Anzeigen.Check
else
Warnlog "'Use Shadow' doesn't exist or isn't visible."
endif
if shadowdistancevalue <> Entfernung.GetText then
warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext
endif
if shadowcolorvalue <> Farbe.GetSelText then
warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.getSeltext
endif
if shadowtransparencyvalue <> Transparenz.GetText then
warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
endif
TabSchatten.Ok
FormatLine '/// Check Cornerstyle via FormatLine ///'
Kontext FormatLine
Messagebox.SetPage TabLinie Kontext
kontext "TabLinie" Messagebox.SetPage TabLinie
Stil.Select 2 ' Select Continuously. kontext "TabLinie"
linetype = Stil.GetItemText if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
Farbe.Select 2 ' Select Blue if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
linecolour = Farbe.GetItemText if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
Breite.More 3 ' Set Width to 3 if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
linewidth = Breite.Gettext TabLinie.ok
CornerStyle.Select 4 ' Select number four: Beveled
cornerstyletype = CornerStyle.GetSelText
printlog "Cornerstyle is: " + CornerStyle.GetSelText '+ cornerstyletype
TabLinie.ok
hOpenContextmenu '/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
sleep(2) if (gApplication = "IMPRESS") then
if hMenuFindSelect(10087, true, 1) = false then ExtensionString = "ppt"
Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." else
Call hCloseDocument ExtensionString = "odg"
Goto Endsub end if
endif
'Select "Position and Size"
sleep(2)
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position Y differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
FormatLine sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
Kontext "GraphicObjectbar" FileSaveAs
if Schatten.GetState(2) <> 1 then Kontext "SpeichernDlg"
warnlog "Shaddow-button shouldnt have been checked" Dateiname.SetText sFileName
endif if (gApplication = "IMPRESS") then
Dateityp.Select 5 ' Powerpoint
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
else
Dateityp.Select 1
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1)
endif
Speichern.Click
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Kontext "AlienWarning"
if AlienWarning.Exists(2) then AlienWarning.OK
printlog "Saved as: " + sFileName
Sleep 3
sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) '/// Close the office and reload the file ///'
try FileClose
FileSaveAs Kontext "Messagebox"
Kontext "SpeichernDlg" if Messagebox.Exists(2) then Messagebox.Yes
Dateiname.SetText sFileName Sleep 3
printlog "Saving with filter: " + Dateityp.GetSelText '/// Open the saved file ///'
Speichern.Click hFileOpen (sFileName + "." + ExtensionString)
Kontext "Messagebox" printlog "File opened: " + sFileName + "." + ExtensionString
if Messagebox.Exists(2) then Messagebox.Yes Sleep 3
Kontext "AlienWarning" '/// Select all ///'
if AlienWarning.Exists(2) then AlienWarning.OK EditSelectAll
printlog "Saved as: " + sFileName
catch
warnlog "Error when saving file."
endcatch
FileClose '/// Check the attributes for the picture ///'
Kontext "Messagebox" hOpenContextmenu
if Messagebox.Exists(2) then Messagebox.Yes sleep(2)
Sleep 3 if hMenuFindSelect(10087, true, 1) = false then
try Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
hFileOpen sFileName + "." + ExtensionString Call hCloseDocument
Sleep 3 Goto Endsub
printlog "opened file successfully" endif
catch 'Select "Position and Size"
warnlog "Error when opening file." sleep(2)
endcatch Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
EditSelectAll '/// Check if transparency has disappeared and if the cornerstyle has changed ///'
sleep 2 FormatArea
Kontext
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
if (gApplication = "DRAW") then
if LineareTransparenz.Ischecked = FALSE then
warnlog "Transparency should have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
KeineTransparenz.Check
end if
endif
if (gApplication = "DRAW") then
if LineareTransparenz.Ischecked = FALSE then
warnlog "Transparency should have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
KeineTransparenz.Check
end if
endif
if (gApplication = "IMPRESS") then
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
endif
kontext "GraphicObjectbar" TabTransparenz.Cancel
if schatten.Getstate(2) <> 1 then
warnlog "The Shadow-button should be activated"
else
Printlog "Shaddowbutton activated, good."
endif
hOpenContextmenu '/// Check Cornerstyle via FormatLine ///'
sleep(2) FormatLine
if hMenuFindSelect(10087, true, 1) = false then Kontext
Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends." Messagebox.SetPage TabLinie
Call hCloseDocument kontext "TabLinie"
Goto Endsub if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
endif if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
'Select "Position and Size" if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
sleep(2) if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
Kontext TabLinie.ok
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
FormatArea '/// Remove the Shaddow, Transparency and Cornerstyle ///'
sleep 1 FormatArea
kontext "TabArea" Kontext
Kontext Messagebox.SetPage TabTransparenz
active.SetPage TabSchatten kontext "TabTransparenz"
kontext "TabSchatten" KeineTransparenz.Check
if Anzeigen.isVisible(5) AND Anzeigen.Exists(5) then sleep 1
if Anzeigen.GetState <> 1 then Warnlog "Shaddow-checkbox should be active" kontext "TabArea"
Anzeigen.Check '/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
else Kontext
Warnlog "'Use Shadow' doesn't exist or isn't visible." active.SetPage TabSchatten
endif kontext "TabSchatten"
if shadowdistancevalue <> Entfernung.GetText then warnlog "Distance value changed. Should be: " + shadowdistancevalue + ". But is: " + Entfernung.gettext Anzeigen.UnCheck
if shadowcolorvalue <> Farbe.GetSelText then warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.gettext TabSchatten.Ok
if shadowtransparencyvalue <> Transparenz.GetText then warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
Kontext '/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
Active.SetPage TabTransparenz if (gApplication = "IMPRESS") then
kontext "TabTransparenz" ExtensionString = "ppt"
LineareTransparenz.Check else
shadowtransparencyvalue = MFLinTransparenz.GetText ExtensionString = "odg"
end if
sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
FileSaveAs
Kontext "SpeichernDlg"
Dateiname.SetText sFileName
if (gApplication = "IMPRESS") then
Dateityp.Select 5 ' Powerpoint
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
else
Dateityp.Select 1
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1)
endif
Speichern.Click
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Kontext "AlienWarning"
if AlienWarning.Exists(2) then AlienWarning.OK
printlog "Saved as: " + sFileName
Sleep 3
sleep 2 '/// Close the office-session ///'
Kontext FileClose
active.SetPage TabSchatten Kontext "Messagebox"
kontext "TabSchatten" if Messagebox.Exists(2) then Messagebox.Yes
TabSchatten.Ok Sleep 3
'/// Open the saved file ///'
hFileOpen (sFileName + "." + ExtensionString)
printlog "File opened: " + sFileName + "." + ExtensionString
Sleep 3
'/// Select all ///'
EditSelectAll
FormatLine '/// Check the attributes for the picture ///'
Kontext hOpenContextmenu
Messagebox.SetPage TabLinie sleep(2)
kontext "TabLinie" if hMenuFindSelect(10087, true, 1) = false then
if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText Call hCloseDocument
if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText Goto Endsub
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText endif
TabLinie.ok 'Select "Position and Size"
sleep(2)
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
if (gApplication = "IMPRESS") then '/// Check if transparency has disappeared ///'
ExtensionString = "ppt" FormatArea
else Kontext
ExtensionString = "odg" Messagebox.SetPage TabTransparenz
end if kontext "TabTransparenz"
if LineareTransparenz.Ischecked <> FALSE then
warnlog "Transparency should NOT have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
LineareTransparenz.UnCheck
end if
TabTransparenz.Cancel
sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test")) '/// Check if the cornerstyle has changed via FormatLine ///'
FormatLine
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
FileSaveAs '/// Close application ///'
Kontext "SpeichernDlg" Call hCloseDocument
Dateiname.SetText sFileName Printlog "Finished Shaddow-test for " + gApplication
if (gApplication = "IMPRESS") then
Dateityp.Select 5 ' Powerpoint
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
else
Dateityp.Select 1
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1)
endif
Speichern.Click
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Kontext "AlienWarning"
if AlienWarning.Exists(2) then AlienWarning.OK
printlog "Saved as: " + sFileName
Sleep 3
FileClose
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
hFileOpen (sFileName + "." + ExtensionString)
printlog "File opened: " + sFileName + "." + ExtensionString
Sleep 3
EditSelectAll
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
Call hCloseDocument
Goto Endsub
endif
'Select "Position and Size"
sleep(2)
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
FormatArea
Kontext
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
if (gApplication = "DRAW") then
if LineareTransparenz.Ischecked = FALSE then
warnlog "Transparency should have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
KeineTransparenz.Check
end if
endif
if (gApplication = "DRAW") then
if LineareTransparenz.Ischecked = FALSE then
warnlog "Transparency should have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
KeineTransparenz.Check
end if
endif
if (gApplication = "IMPRESS") then
if LineareTransparenz.Ischecked <> FALSE then
warnlog "Transparency should NOT have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
KeineTransparenz.Check
end if
endif
TabTransparenz.Cancel
FormatLine
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
FormatArea
Kontext
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
KeineTransparenz.Check
sleep 1
kontext "TabArea"
Kontext
active.SetPage TabSchatten
kontext "TabSchatten"
Anzeigen.UnCheck
TabSchatten.Ok
if (gApplication = "IMPRESS") then
ExtensionString = "ppt"
else
ExtensionString = "odg"
end if
sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
FileSaveAs
Kontext "SpeichernDlg"
Dateiname.SetText sFileName
if (gApplication = "IMPRESS") then
Dateityp.Select 5 ' Powerpoint
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(5)
else
Dateityp.Select 1
printlog "Trying to save with filter: " + Dateityp.GetSelText + sFilter(1)
endif
Speichern.Click
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Kontext "AlienWarning"
if AlienWarning.Exists(2) then AlienWarning.OK
printlog "Saved as: " + sFileName
Sleep 3
FileClose
Kontext "Messagebox"
if Messagebox.Exists(2) then Messagebox.Yes
Sleep 3
hFileOpen (sFileName + "." + ExtensionString)
printlog "File opened: " + sFileName + "." + ExtensionString
Sleep 3
EditSelectAll
hOpenContextmenu
sleep(2)
if hMenuFindSelect(10087, true, 1) = false then
Warnlog "Context-Menu-entry `Position and Size` was not found. Therefore the test ends."
Call hCloseDocument
Goto Endsub
endif
'Select "Position and Size"
sleep(2)
Kontext
Active.SetPage TabPositionAndSize
Kontext "TabPositionAndSize"
if ImageWidth <> Width.GetText then warnlog "Position X differs. Should be: " + ImageWidth + " But is: " + Width.GetText
if ImageHeight <> Height.GetText then warnlog "Position X differs. Should be: " + ImageHeight + " But is: " + Height.GetText
TabPositionAndSize.OK
FormatArea
Kontext
Messagebox.SetPage TabTransparenz
kontext "TabTransparenz"
if LineareTransparenz.Ischecked <> FALSE then
warnlog "Transparency should NOT have been checked!"
if MFLinTransparenz.GetText <> shadowtransparencyvalue then warnlog "Transparency-value should NOT have changed"
LineareTransparenz.UnCheck
end if
TabTransparenz.Cancel
FormatLine
Kontext
Messagebox.SetPage TabLinie
kontext "TabLinie"
if linetype <> Stil.GetItemText then warnlog "Linetype should be: " + linetype + " But is: " + Stil.GetItemText
if linecolour <> Farbe.GetItemText then warnlog "Linecolour should be: " + linetype + " But is: " + Farbe.GetItemText
if linewidth <> Breite.GetText then warnlog "Linewidth should be: " + linewidth + " But is: " + Breite.GetText
if cornerstyletype <> CornerStyle.GetSelText then warnlog "CornerStyle should be: " + cornerstyletype + " But is: " + CornerStyle.GetSelText 'ItemText
TabLinie.ok
Call hCloseDocument
Printlog "Finished Shaddow-test for " + gApplication
endcase ' tiShaddow endcase ' tiShaddow

View File

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

View File

@@ -46,75 +46,83 @@
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiToolsThesaurus testcase tiToolsThesaurus
Dim DasWort$ Dim DasWort$
Dim ZaehlerBedeutung 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 ??///'
' As long as OOo has no modules for that, disabled '/// First we make sure we test a language where Thesa
if gOOO = True then ' As long as OOo has no modules for that, disabled
printlog "No spellchecking in OOo" if gOOO = True then
goto endsub printlog "No spellchecking in OOo"
endif goto endsub
endif
select case iSprache select case iSprache
case 01 : DasWort$ = "Hello" case 01 : DasWort$ = "Hello"
case 03 : DasWort$ = "Alo" case 03 : DasWort$ = "Alo"
case 07 : printlog "- No Thesaur for Russian available" case 07 : printlog "- No Thesaur for Russian available"
goto endsub goto endsub
case 30 : Printlog "- No Thesaurus available !" case 30 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 31 : DasWort$ = "Guiten" case 31 : DasWort$ = "Guiten"
case 33 : DasWort$ = "Bonjour" case 33 : DasWort$ = "Bonjour"
case 34 : DasWort$ = "Hola" case 34 : DasWort$ = "Hola"
case 35 : Printlog "- No Thesaurus available !" case 35 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 36 : Printlog "- No Thesaurus available !" case 36 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 37 : Printlog "- No Thesaurus available !" case 37 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 39 : DasWort$ = "Ciao" case 39 : DasWort$ = "Ciao"
case 42 : Printlog "- No Thesaurus available !" case 42 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 45 : DasWort$ = "Hej" case 45 : DasWort$ = "Hej"
case 46 : DasWort$ = "Välkommen" case 46 : DasWort$ = "Välkommen"
case 47 : Printlog "- No Thesaurus available !" case 47 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 48 : Printlog "- No Thesaurus in Polish!" case 48 : Printlog "- No Thesaurus in Polish!"
goto endsub goto endsub
case 49 : DasWort$ = "Hallo" case 49 : DasWort$ = "Hallo"
case 50 : DasWort$ = "Prosojnica" case 50 : DasWort$ = "Prosojnica"
case 51 : Printlog "- No Thesaurus available !" case 51 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case 55 : Printlog "- No Thesaurus in Brazilian!" case 55 : Printlog "- No Thesaurus in Brazilian!"
goto endsub goto endsub
case 90 : Printlog "- No Thesaurus available !" case 90 : Printlog "- No Thesaurus available !"
goto endsub goto endsub
case else : if bAsianLan then case else : if bAsianLan then
hSetSpellHypLanguage hSetSpellHypLanguage
DasWort$ = "Hello" DasWort$ = "Hello"
else else
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
DasWort$ = "Hello" DasWort$ = "Hello"
endif endif
end select end select
printlog " Thesaurus without any word in the document" printlog " Thesaurus without any word in the document"
try Call hNewDocument '/// New document ///'
Kontext "Thesaurus" try
Thesaurus.Cancel ExtrasThesaurusDraw '/// try thesaurus in empty document ///'
WarnLog " If no word is in the document, Thesaurus shouldn't be available" Kontext "Thesaurus"
catch Thesaurus.Cancel
PrintLog " No Thesaurus available" WarnLog " If no word is in the document, Thesaurus shouldn't be available"
endcatch catch
PrintLog " No Thesaurus available"
endcatch
PrintLog " Thesaurus with 1 word: " + DasWort$ PrintLog " Thesaurus with 1 word: " + DasWort$
Call hTextrahmenErstellen (DasWort$,20,20,50,30) Call hTextrahmenErstellen (DasWort$,20,20,50,30)
sleep 1 sleep 1
hTypeKeys "<Home><SHIFT END>" hTypeKeys "<Home><SHIFT END>"
'------------------------ '------------------------
ToolsOptions ToolsOptions
Kontext "ExtrasOptionenDlg" Kontext "ExtrasOptionenDlg"
hToolsOptions("LANGUAGESETTINGS","Languages") hToolsOptions("LANGUAGESETTINGS","Languages")
@@ -122,161 +130,179 @@ Westlich.Select 32
Kontext "ExtrasOptionenDlg" Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK ExtrasOptionenDlg.OK
sleep 1 sleep 1
'------------------------ '------------------------
try try
Kontext "Thesaurus" ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///'
if Thesaurus.Exists(3) then 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 WarnLog "marked word should be:" + DasWort$ + " but it is:" + Wort.GetSelText
ZaehlerBedeutung=Bedeutung.GetItemCount if Wort.GetSelText = DasWort$ Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///'
if Bedeutung.GetItemCount = 0 Then ZaehlerBedeutung=Bedeutung.GetItemCount
PrintLog " There are no suggestions for this word" if Bedeutung.GetItemCount = 0 Then
sleep 1 PrintLog " There are no suggestions for this word"
else sleep 1
if ZaehlerBedeutung=1 Then else
Bedeutung.Select ZaehlerBedeutung if ZaehlerBedeutung=1 Then
else Bedeutung.Select ZaehlerBedeutung
Bedeutung.Select (ZaehlerBedeutung - 1) else
end if Bedeutung.Select (ZaehlerBedeutung - 1)
sleep 1 end if
sleep 1 sleep 1
if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field" Synonym.Select 1 '/// Select synonym 1///'
if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'" sleep 1
endif if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field"
Thesaurus.Cancel if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'"
else endif
warnlog " thesaurus didn't come up, that's bad :-(" Thesaurus.Cancel
end if else
catch warnlog " thesaurus didn't come up, that's bad :-("
warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!" end if
endcatch catch
warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!"
endcatch
Call hCloseDocument '/// Close document ///'
endcase 'tiToolsThesaurus endcase 'tiToolsThesaurus
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiToolsHyphenation1 testcase tiToolsHyphenation1
printlog " - Hyphenation without any text" printlog " - Hyphenation without any text"
sleep 3 Call hNewDocument '/// New impress document ///'
Kontext "Silbentrennung" sleep 3
ExtrasSilbentrennungDraw '/// Try Silbentrennung with empty document ///'
Kontext "Silbentrennung"
if Silbentrennung.Exists(1) = True Then if Silbentrennung.Exists(1) = True Then
Warnlog " - Dialog ist da" Warnlog " - Dialog ist da"
Silbentrennung.Cancel Silbentrennung.Cancel
else else
Printlog " - Hyphenation activated" Printlog " - Hyphenation activated"
end if
' Kontext "DocumentImpress"
printlog " - Hyphenation with text, but without any possibility to break words"
select case iSprache
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"
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)
case 34 : hTextrahmenErstellen ("This ist a text with no spliting words",10,10,40,40)
case 36 : hTextrahmenErstellen ("Semmi karhozattyoc nincz most azoknac, a kic az Iesus Christusban be oltattac",10,10,40,40)
case 39 : hTextrahmenErstellen ("Il documento 'Senza nome 1' stato modififcato",10,10,40,40)
case 45 : hTextrahmenErstellen ("at du har nok i dit hvis du",10,10,40,40 )
case 46 : hTextrahmenErstellen ("Detta är en text utan delade ord",10,10,40,40)
case 48 : hTextrahmenErstellen (" Jeoli jednak zechcesz",10,10,40,40)
case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne eine Moeglichkeit Woerter zu trennen",10,10,40,40)
case 50 : hTextrahmenErstellen ("Zato ves čas iščemo nove člane: sodelujte",10,10,40,40)
case 55 : hTextrahmenErstellen ("a Sun tentou adquirir a Apple",10,10,40,40)
case else : if bAsianLan then
printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
printlog " :-) will use English instead"
hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40)
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
Warnlog "Dialog exists"
Silbentrennung.Cancel
else
Kontext "Active"
if Active.Exists then Active.OK
end if end if
' 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)
case 34 : hTextrahmenErstellen ("This ist a text with no spliting words",10,10,40,40)
case 36 : hTextrahmenErstellen ("Semmi karhozattyoc nincz most azoknac, a kic az Iesus Christusban be oltattac",10,10,40,40)
case 39 : hTextrahmenErstellen ("Il documento 'Senza nome 1' stato modififcato",10,10,40,40)
case 45 : hTextrahmenErstellen ("at du har nok i dit hvis du",10,10,40,40 )
case 46 : hTextrahmenErstellen ("Detta är en text utan delade ord",10,10,40,40)
case 48 : hTextrahmenErstellen (" Jeoli jednak zechcesz",10,10,40,40)
case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne eine Moeglichkeit Woerter zu trennen",10,10,40,40)
case 50 : hTextrahmenErstellen ("Zato ves čas iščemo nove člane: sodelujte",10,10,40,40)
case 55 : hTextrahmenErstellen ("a Sun tentou adquirir a Apple",10,10,40,40)
case else : if bAsianLan then
printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
printlog " :-) will use English instead"
hTextrahmenErstellen ("This ist a text with no split words",10,10,40,40)
else
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
endif
end select
hTypeKeys "<Home>"
ExtrasSilbentrennungDraw '/// Try Silbentrennung ///'
Kontext "Silbentrennung"
if Silbentrennung.Exists =True Then
Warnlog "Dialog exists"
Silbentrennung.Cancel
else
Kontext "Active"
if Active.Exists then Active.OK
end if
Call hCloseDocument '/// Close document ///'
endcase 'tiToolsHyphenation1 endcase 'tiToolsHyphenation1
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
testcase tiToolsHyphenation2 testcase tiToolsHyphenation2
dim iWaitIndex as integer dim iWaitIndex as integer
dim sExt as string dim sExt as string
Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7
dim sDraw as string dim sDraw as string
dim sFile as string dim sFile as string
PrintLog "- Tools/Hyphenation2" PrintLog "- Tools/Hyphenation2"
Select Case Ucase(gApplication) Select Case Ucase(gApplication)
case "DRAW" : sExt = ".odg" case "DRAW" : sExt = ".odg"
case "IMPRESS" : sExt = ".odp" case "IMPRESS" : sExt = ".odp"
end select end select
if ((not bAsianLan) AND (iSprache <> 07)) then if ((not bAsianLan) AND (iSprache <> 07)) then
sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt
Call hFileOpen (sFile) Call hFileOpen (sFile)
endif endif
case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34) select case iSprache '/// Open prepared document ///'
case 07 : qaerrorlog "- No Hypenation for Russian available" case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
goto endsub case 07 : qaerrorlog "- No Hypenation for Russian available"
case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit" goto endsub
case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e" case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit"
case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o" case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e"
case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal" case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o"
case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu" case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal"
case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka" case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu"
case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e" case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka"
case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g" case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e"
case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a" case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g"
case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia" case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a"
case else : if bAsianLan then case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia"
printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)" case else : if bAsianLan then
printlog " :-) will use English instead" printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt) printlog " :-) will use English instead"
DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34) Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt)
else DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile else
hNewDocument Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile
endif hNewDocument
end select endif
end select
Call sMakeReadOnlyDocumentEditable Call sMakeReadOnlyDocumentEditable
printlog " - Test hyphenation" printlog " - Test hyphenation"
hTypeKeys "<Return>" EditSelectAll '/// Press CTRL + A to select all ///'
'/// press return to go into the edit mode ///'
hTypeKeys "<Return>"
sleep 1 sleep 1
' WA for draw, or smth else: get text part before hyphenation: ' WA for draw, or smth else: get text part before hyphenation:
if iSprache = "1" OR bAsianLan = TRUE then if iSprache = "1" OR bAsianLan = TRUE then
else hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>" else
endif hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
EditCopy endif
sDraw = GetClipboardText() EditCopy
gMouseClick 50,50 sDraw = GetClipboardText()
sleep 3 EditSelectAll '/// Select whole text ///'
EditCopy 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 printlog GetClipboardText
select case GetClipboardText select case GetClipboardText
case DasWort : printlog " - Hyphenation worked" case DasWort : printlog " - Hyphenation worked"
case DasWort2 : printlog " - Hyphenation worked" case DasWort2 : printlog " - Hyphenation worked"
case DasWort3 : printlog " - Hyphenation worked" case DasWort3 : printlog " - Hyphenation worked"
case DasWort4 : printlog " - Hyphenation worked" case DasWort4 : printlog " - Hyphenation worked"
case else : warnlog " - Hyphenation didnt work" case else : warnlog " - Hyphenation didnt work"
end select end select
if GetClipboardText <> sDraw then if GetClipboardText <> sDraw then
Printlog " - WA draw hyphenation did work :-)" Printlog " - WA draw hyphenation did work :-)"
else else
Warnlog " - Hyphenation did not work" Warnlog " - Hyphenation did not work"
Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'" Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'"
end if end if
sleep 1 sleep 1
Call hCloseDocument '/// Close document ///'
endcase 'tiToolsHyphenation2 endcase 'tiToolsHyphenation2
'------------------------------------------------------------------------------- '-------------------------------------------------------------------------------
@@ -292,6 +318,7 @@ testcase tToolsMacro
ToolsMacro ToolsMacro
Kontext "Makro" Kontext "Makro"
'/// to get the count of all macros, the list needs to get elapsed-all ///'
for j = 1 to 2 for j = 1 to 2
Zaehler=MakroAus.GetItemCount Zaehler=MakroAus.GetItemCount
MakroAus.typeKeys "<end>" MakroAus.typeKeys "<end>"
@@ -405,5 +432,5 @@ testcase tToolsMacro
'TODO: organizer testing! 'TODO: organizer testing!
Call hCloseDocument Call hCloseDocument
Call hCloseDocument Call hCloseDocument
endcase 'tToolsMacro endcase 'tToolsMacro

View File

@@ -40,13 +40,13 @@
'\******************************************************************** '\********************************************************************
testcase tViewZoom testcase tViewZoom
dim Zaehler as integer dim Zaehler as integer
dim Position1 as integer dim Position1 as integer
dim Position2 as integer dim Position2 as integer
Dim Datei$ Dim Datei$
Printlog "- view Zoom" Printlog "- view Zoom"
if (gApplication = "IMPRESS") then if (gApplication = "IMPRESS") then
ExtensionString = "odp" ExtensionString = "odp"
else else
ExtensionString = "odg" ExtensionString = "odg"
@@ -55,78 +55,85 @@ testcase tViewZoom
Datei$ = ConvertPath (gOfficePath + "user\work\test." & ExtensionString) Datei$ = ConvertPath (gOfficePath + "user\work\test." & ExtensionString)
Printlog "- View-Zoom testing" Printlog "- View-Zoom testing"
if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-) if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-)
ViewZoom Call hNewDocument '/// new document ///'
Kontext "Massstab" ViewZoom
Massstab.OK Kontext "Massstab"
Kontext "SD_Farbleiste" Vergroesserung100.Check '/// set zoom to 50% ///'
sleep 1 Massstab.OK
if SD_Farbleiste.Exists then '/// create a number of rectangles with different color properties ///'
Printlog "- Color toolbar will be disabled now" Kontext "SD_Farbleiste"
ViewToolbarsColorBar sleep 1
end if if SD_Farbleiste.Exists then
For Zaehler = 1 to 9 Printlog "- Color toolbar will be disabled now"
Position1 = 5 * Zaehler - 3 ViewToolbarsColorBar
Position2 = 105 - 5 * Zaehler end if
Call hRechteckErstellen (Position1, Position1, Position2, Position2) '/// All rectangles are created with same dimensions but using different zoom settings ///'
FormatArea For Zaehler = 1 to 9
kontext Position1 = 5 * Zaehler - 3
Active.SetPage TabFarben Position2 = 105 - 5 * Zaehler
Kontext "TabFarben" Call hRechteckErstellen (Position1, Position1, Position2, Position2)
Farbe.Select 5*Zaehler FormatArea
TabFarben.OK kontext
sleep 1 Active.SetPage TabFarben
gMouseClick 50,0 Kontext "TabFarben"
Next Zaehler Farbe.Select 5*Zaehler
sleep 2 TabFarben.OK
sleep 3 sleep 1
ViewZoom gMouseClick 50,0
Kontext "Massstab" Next Zaehler
VergroesserungStufenlos.check sleep 2
Stufenlos.Settext "45" hFileSaveAs (Datei$) '/// save document ///'
Massstab.OK sleep 3
sleep 2 for Zaehler = 1 to 6 '/// changing zoom settings and checking functionality with controlling the color of the selected rectangle ///'
gMouseClick 50,1 ViewZoom
ViewZoom Kontext "Massstab"
Kontext "Massstab" VergroesserungStufenlos.check
Select Case Zaehler Stufenlos.Settext "45"
Case 1: VergroesserungStufenlos.check Massstab.OK
Stufenlos.Settext "40" sleep 2
Case 2: VergroesserungStufenlos.check gMouseClick 50,1
Stufenlos.Settext "50" ViewZoom
Case 3: VergroesserungStufenlos.check Kontext "Massstab"
Stufenlos.Settext "75" Select Case Zaehler
Case 4: VergroesserungStufenlos.check Case 1: VergroesserungStufenlos.check
Stufenlos.Settext "100" Stufenlos.Settext "40"
Case 5: VergroesserungStufenlos.check Case 2: VergroesserungStufenlos.check
Stufenlos.Settext "150" Stufenlos.Settext "50"
Case 6: VergroesserungStufenlos.check Case 3: VergroesserungStufenlos.check
Stufenlos.Settext "200" Stufenlos.Settext "75"
Case 4: VergroesserungStufenlos.check
Stufenlos.Settext "100"
Case 5: VergroesserungStufenlos.check
Stufenlos.Settext "150"
Case 6: VergroesserungStufenlos.check
Stufenlos.Settext "200"
'Case 2: Vergroesserung50.check
'Case 3: Vergroesserung75.check
'Case 4: Vergroesserung100.check
'Case 5: Vergroesserung150.check
'Case 6: Vergroesserung200.check
End Select
Massstab.OK
sleep 1
Kontext "DocumentImpress"
gMouseClick 15,15 'hier soll die Maus ein Rechteck treffen;
'die Farbe des Rechtecks sagt uns dann, ob
FormatArea 'richtig vergroessert oder verkleinert wurde.
sleep 1
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
printlog "Color index ", Farbe.GetSelIndex
TabFarben.Cancel
sleep 1
next Zaehler
'Case 2: Vergroesserung50.check 'GanzeSeite.push
'Case 3: Vergroesserung75.check 'Optimal.push
'Case 4: Vergroesserung100.check 'Seitenbreite.push
'Case 5: Vergroesserung150.check sleep 2
'Case 6: Vergroesserung200.check
End Select
Massstab.OK
sleep 1
Kontext "DocumentImpress"
gMouseClick 15,15 'hier soll die Maus ein Rechteck treffen;
'die Farbe des Rechtecks sagt uns dann, ob
FormatArea 'richtig vergroessert oder verkleinert wurde.
sleep 1
Kontext
Active.SetPage TabFarben
Kontext "TabFarben"
printlog "Color index ", Farbe.GetSelIndex
TabFarben.Cancel
sleep 1
next Zaehler
'GanzeSeite.push
'Optimal.push
'Seitenbreite.push
sleep 2
Call hCloseDocument '/// close document ///'
endcase endcase

View File

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

View File

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