merged in DEV300_m54
This commit is contained in:
@@ -60,12 +60,13 @@ import stats.Summarizer;
|
||||
|
||||
import util.DynamicClassLoader;
|
||||
|
||||
|
||||
/**
|
||||
* The testbase for executing basic tests.
|
||||
* @see lib.TestBase
|
||||
*/
|
||||
public class basic_fat implements TestBase {
|
||||
public class basic_fat implements TestBase
|
||||
{
|
||||
|
||||
public static boolean debug = false;
|
||||
|
||||
/**
|
||||
@@ -73,7 +74,8 @@ public class basic_fat implements TestBase {
|
||||
* @param param The test parameters.
|
||||
* @param return True, if the test was executed.
|
||||
*/
|
||||
public boolean executeTest(TestParameters param) {
|
||||
public boolean executeTest(TestParameters param)
|
||||
{
|
||||
DescGetter dg = new APIDescGetter();
|
||||
String job = (String) param.get("TestJob");
|
||||
OfficeProvider office = null;
|
||||
@@ -84,11 +86,12 @@ public class basic_fat implements TestBase {
|
||||
System.out.print("Getting Descriptions for Job: " + job + " from ");
|
||||
|
||||
DescEntry[] entries = dg.getDescriptionFor(job,
|
||||
(String) param.get(
|
||||
"DescriptionPath"),
|
||||
debug);
|
||||
(String) param.get(
|
||||
"DescriptionPath"),
|
||||
debug);
|
||||
|
||||
if (entries == null) {
|
||||
if (entries == null)
|
||||
{
|
||||
System.out.println("Couldn't get Description for Job");
|
||||
|
||||
return false;
|
||||
@@ -97,7 +100,8 @@ public class basic_fat implements TestBase {
|
||||
String ExclusionFile = (String) param.get("ExclusionList");
|
||||
Vector exclusions = null;
|
||||
|
||||
if (ExclusionFile != null) {
|
||||
if (ExclusionFile != null)
|
||||
{
|
||||
exclusions = getExclusionList(ExclusionFile, debug);
|
||||
}
|
||||
|
||||
@@ -106,8 +110,10 @@ public class basic_fat implements TestBase {
|
||||
System.out.print("> Connecting the Office ");
|
||||
System.out.println("With " + conStr);
|
||||
|
||||
for (int l = 0; l < entries.length; l++) {
|
||||
if (entries[l].hasErrorMsg) {
|
||||
for (int l = 0; l < entries.length; l++)
|
||||
{
|
||||
if (entries[l].hasErrorMsg)
|
||||
{
|
||||
System.out.println(entries[l].ErrorMsg);
|
||||
|
||||
continue;
|
||||
@@ -116,9 +122,10 @@ public class basic_fat implements TestBase {
|
||||
office = new OfficeProvider();
|
||||
|
||||
XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
|
||||
param);
|
||||
param);
|
||||
|
||||
if (msf == null) {
|
||||
if (msf == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -134,7 +141,8 @@ public class basic_fat implements TestBase {
|
||||
|
||||
tCase = (TestCase) new BasicTestCase(entry);
|
||||
|
||||
if (tCase == null) {
|
||||
if (tCase == null)
|
||||
{
|
||||
sumIt.summarizeDown(entry, entry.ErrorMsg);
|
||||
|
||||
LogWriter sumObj = OutProducerFactory.createOutProducer(param);
|
||||
@@ -147,21 +155,26 @@ public class basic_fat implements TestBase {
|
||||
System.out.println("Creating: " + tCase.getObjectName());
|
||||
|
||||
LogWriter log = (LogWriter) dcl.getInstance(
|
||||
(String) param.get("LogWriter"));
|
||||
(String) param.get("LogWriter"));
|
||||
log.initialize(entry, true);
|
||||
entry.UserDefinedParams = param;
|
||||
tCase.setLogWriter((PrintWriter) log);
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
tCase.initializeTestCase(param);
|
||||
} catch (RuntimeException e) {
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
|
||||
"AppProvider");
|
||||
"AppProvider");
|
||||
|
||||
if (ph != null) {
|
||||
if (ph != null)
|
||||
{
|
||||
OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");
|
||||
|
||||
if ((ow != null) && ow.isAlive()) {
|
||||
if ((ow != null) && ow.isAlive())
|
||||
{
|
||||
ow.finish = true;
|
||||
}
|
||||
|
||||
@@ -174,7 +187,8 @@ public class basic_fat implements TestBase {
|
||||
|
||||
TestEnvironment tEnv = tCase.getTestEnvironment(param);
|
||||
|
||||
if (tEnv == null) {
|
||||
if (tEnv == null)
|
||||
{
|
||||
sumIt.summarizeDown(entry, "Unable to create testcase");
|
||||
|
||||
LogWriter sumObj = OutProducerFactory.createOutProducer(param);
|
||||
@@ -182,12 +196,14 @@ public class basic_fat implements TestBase {
|
||||
sumObj.summary(entry);
|
||||
|
||||
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
|
||||
"AppProvider");
|
||||
"AppProvider");
|
||||
|
||||
if (ph != null) {
|
||||
if (ph != null)
|
||||
{
|
||||
OfficeWatcher ow = (OfficeWatcher) param.get("Watcher");
|
||||
|
||||
if ((ow != null) && ow.isAlive()) {
|
||||
if ((ow != null) && ow.isAlive())
|
||||
{
|
||||
ow.finish = true;
|
||||
}
|
||||
|
||||
@@ -200,36 +216,41 @@ public class basic_fat implements TestBase {
|
||||
|
||||
System.out.println("created " + tCase.getObjectName());
|
||||
|
||||
for (int j = 0; j < entry.SubEntryCount; j++) {
|
||||
if (!entry.SubEntries[j].isToTest) {
|
||||
for (int j = 0; j < entry.SubEntryCount; j++)
|
||||
{
|
||||
if (!entry.SubEntries[j].isToTest)
|
||||
{
|
||||
Summarizer.summarizeDown(entry.SubEntries[j],
|
||||
"not part of the job");
|
||||
"not part of the job");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((exclusions != null) &&
|
||||
(exclusions.contains(entry.SubEntries[j].longName))) {
|
||||
(exclusions.contains(entry.SubEntries[j].longName)))
|
||||
{
|
||||
Summarizer.summarizeDown(entry.SubEntries[j],
|
||||
"known issue");
|
||||
"known issue");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
System.out.println("running: " +
|
||||
entry.SubEntries[j].entryName);
|
||||
entry.SubEntries[j].entryName);
|
||||
|
||||
LogWriter ifclog = (LogWriter) dcl.getInstance(
|
||||
(String) param.get("LogWriter"));
|
||||
(String) param.get("LogWriter"));
|
||||
ifclog.initialize(entry.SubEntries[j], true);
|
||||
entry.SubEntries[j].UserDefinedParams = param;
|
||||
entry.SubEntries[j].Logger = ifclog;
|
||||
|
||||
if ((tEnv == null) || tEnv.isDisposed()) {
|
||||
if ((tEnv == null) || tEnv.isDisposed())
|
||||
{
|
||||
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
|
||||
"AppProvider");
|
||||
"AppProvider");
|
||||
|
||||
if (ph != null) {
|
||||
if (ph != null)
|
||||
{
|
||||
office.closeExistingOffice(param, true);
|
||||
shortWait(5000);
|
||||
}
|
||||
@@ -250,15 +271,19 @@ public class basic_fat implements TestBase {
|
||||
sumIfc.summary(entry.SubEntries[j]);
|
||||
}
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
tCase.cleanupTestCase(param);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.println("TestCase already gone");
|
||||
|
||||
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
|
||||
"AppProvider");
|
||||
"AppProvider");
|
||||
|
||||
if (ph != null) {
|
||||
if (ph != null)
|
||||
{
|
||||
office.closeExistingOffice(param, true);
|
||||
shortWait(5000);
|
||||
}
|
||||
@@ -271,49 +296,56 @@ public class basic_fat implements TestBase {
|
||||
sumObj.summary(entry);
|
||||
}
|
||||
|
||||
if (entries.length > 1) {
|
||||
if (entries.length > 1)
|
||||
{
|
||||
System.out.println();
|
||||
|
||||
int counter = 0;
|
||||
System.out.println(
|
||||
"Failures that appeared during scenario execution:");
|
||||
|
||||
for (int i = 0; i < entries.length; i++) {
|
||||
if (!entries[i].State.endsWith("OK")) {
|
||||
for (int i = 0; i < entries.length; i++)
|
||||
{
|
||||
if (!entries[i].State.endsWith("OK"))
|
||||
{
|
||||
System.out.println("\t " + entries[i].longName);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(counter + " of " + entries.length +
|
||||
" tests failed");
|
||||
" tests failed");
|
||||
}
|
||||
|
||||
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
|
||||
"AppProvider");
|
||||
"AppProvider");
|
||||
|
||||
if (ph != null) {
|
||||
if (ph != null)
|
||||
{
|
||||
office.closeExistingOffice(param, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected TestEnvironment getEnv(DescEntry entry, TestParameters param) {
|
||||
protected TestEnvironment getEnv(DescEntry entry, TestParameters param)
|
||||
{
|
||||
DynamicClassLoader dcl = new DynamicClassLoader();
|
||||
String officeProviderName = (String) param.get("OfficeProvider");
|
||||
AppProvider office = (AppProvider) dcl.getInstance(officeProviderName);
|
||||
|
||||
if (office == null) {
|
||||
if (office == null)
|
||||
{
|
||||
System.out.println("ERROR: Wrong parameter 'OfficeProvider', " +
|
||||
" it cannot be instantiated.");
|
||||
" it cannot be instantiated.");
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
XMultiServiceFactory msf = (XMultiServiceFactory) office.getManager(
|
||||
param);
|
||||
param);
|
||||
|
||||
if (msf == null) {
|
||||
if (msf == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -324,23 +356,27 @@ public class basic_fat implements TestBase {
|
||||
System.out.println("Creating: " + tCase.getObjectName());
|
||||
|
||||
LogWriter log = (LogWriter) dcl.getInstance(
|
||||
(String) param.get("LogWriter"));
|
||||
(String) param.get("LogWriter"));
|
||||
log.initialize(entry, true);
|
||||
entry.UserDefinedParams = param;
|
||||
tCase.setLogWriter((PrintWriter) log);
|
||||
|
||||
TestEnvironment tEnv = null;
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
tCase.initializeTestCase(param);
|
||||
tEnv = tCase.getTestEnvironment(param);
|
||||
} catch (java.lang.RuntimeException e) {
|
||||
}
|
||||
catch (java.lang.RuntimeException e)
|
||||
{
|
||||
System.out.println(e.getMessage());
|
||||
|
||||
helper.ProcessHandler ph = (helper.ProcessHandler) param.get(
|
||||
"AppProvider");
|
||||
"AppProvider");
|
||||
|
||||
if (ph != null) {
|
||||
if (ph != null)
|
||||
{
|
||||
office.closeExistingOffice(param, true);
|
||||
shortWait(5000);
|
||||
}
|
||||
@@ -352,37 +388,52 @@ public class basic_fat implements TestBase {
|
||||
return tEnv;
|
||||
}
|
||||
|
||||
protected void shortWait(int millis) {
|
||||
try {
|
||||
protected void shortWait(int millis)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(millis);
|
||||
} catch (java.lang.InterruptedException ie) {
|
||||
}
|
||||
catch (java.lang.InterruptedException ie)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
protected Vector getExclusionList(String url, boolean debug) {
|
||||
protected Vector getExclusionList(String url, boolean debug)
|
||||
{
|
||||
Vector entryList = new Vector();
|
||||
String line = "#";
|
||||
BufferedReader exclusion = null;
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
exclusion = new BufferedReader(new FileReader(url));
|
||||
} catch (java.io.FileNotFoundException fnfe) {
|
||||
if (debug) {
|
||||
}
|
||||
catch (java.io.FileNotFoundException fnfe)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
System.out.println("Couldn't find file " + url);
|
||||
}
|
||||
|
||||
return entryList;
|
||||
}
|
||||
|
||||
while (line != null) {
|
||||
try {
|
||||
if (!line.startsWith("#")) {
|
||||
while (line != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!line.startsWith("#"))
|
||||
{
|
||||
entryList.add(line);
|
||||
}
|
||||
|
||||
line = exclusion.readLine();
|
||||
} catch (java.io.IOException ioe) {
|
||||
if (debug) {
|
||||
}
|
||||
catch (java.io.IOException ioe)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
System.out.println(
|
||||
"Exception while reading exclusion list");
|
||||
}
|
||||
@@ -391,10 +442,14 @@ public class basic_fat implements TestBase {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
exclusion.close();
|
||||
} catch (java.io.IOException ioe) {
|
||||
if (debug) {
|
||||
}
|
||||
catch (java.io.IOException ioe)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
System.out.println("Couldn't close file " + url);
|
||||
}
|
||||
|
||||
|
@@ -44,6 +44,8 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
public class Assurance
|
||||
{
|
||||
public static final boolean CONTINUE = true;
|
||||
|
||||
/** State of the current test method **/
|
||||
protected boolean state = true;
|
||||
|
||||
|
@@ -58,7 +58,8 @@ public abstract class ComplexTestCase extends Assurance implements ComplexTest
|
||||
**/
|
||||
protected int mThreadTimeOut = 0;
|
||||
/** Continue a test even if it did fail **/
|
||||
public static final boolean CONTINUE = true;
|
||||
// public static final boolean CONTINUE = true;
|
||||
|
||||
/** End a test if it did fail **/
|
||||
public static final boolean BREAK = true;
|
||||
|
||||
|
@@ -27,9 +27,9 @@
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
package graphical;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,10 +37,11 @@ import java.util.Enumeration;
|
||||
|
||||
/**
|
||||
Helper class to give a simple API to read/write windows like ini files
|
||||
*/
|
||||
*/
|
||||
/* public */ // is only need, if we need this class outside package convwatch
|
||||
public class IniFile implements Enumeration
|
||||
{
|
||||
|
||||
/**
|
||||
* internal representation of the ini file content.
|
||||
* Problem, if ini file changed why other write something difference, we don't realise this.
|
||||
@@ -48,13 +49,13 @@ public class IniFile implements Enumeration
|
||||
private String m_sFilename;
|
||||
private ArrayList m_aList;
|
||||
boolean m_bListContainUnsavedChanges = false;
|
||||
|
||||
private int m_aEnumerationPos = 0;
|
||||
|
||||
/**
|
||||
open a ini file by it's name
|
||||
@param _sFilename string a filename, if the file doesn't exist, a new empty ini file will create.
|
||||
write back to disk only if there are really changes.
|
||||
*/
|
||||
*/
|
||||
public IniFile(String _sFilename)
|
||||
{
|
||||
m_sFilename = _sFilename;
|
||||
@@ -66,23 +67,23 @@ public class IniFile implements Enumeration
|
||||
// }
|
||||
}
|
||||
|
||||
public void insertFirstComment(String [] _aList)
|
||||
{
|
||||
if (m_aList.size() == 0)
|
||||
public void insertFirstComment(String[] _aList)
|
||||
{
|
||||
// can only insert if there is nothing else already in the ini file
|
||||
for (int i=0; i<_aList.length;i++)
|
||||
if (m_aList.size() == 0)
|
||||
{
|
||||
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()
|
||||
{
|
||||
File aFile = new File(m_sFilename);
|
||||
ArrayList aLines = new ArrayList();
|
||||
if (! aFile.exists())
|
||||
if (!aFile.exists())
|
||||
{
|
||||
GlobalLogWriter.get().println("couldn't find file '" + m_sFilename + "', will be created.");
|
||||
// DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
|
||||
@@ -90,9 +91,10 @@ public class IniFile implements Enumeration
|
||||
return aLines;
|
||||
}
|
||||
RandomAccessFile aReader = null;
|
||||
// BufferedReader aReader;
|
||||
try
|
||||
{
|
||||
aReader = new RandomAccessFile(aFile,"r");
|
||||
aReader = new RandomAccessFile(aFile, "r");
|
||||
String aLine = "";
|
||||
while (aLine != null)
|
||||
{
|
||||
@@ -135,28 +137,29 @@ public class IniFile implements Enumeration
|
||||
{
|
||||
return m_aList.size() > 1 ? true : false;
|
||||
}
|
||||
/**
|
||||
* Check if a given Section and Key exists in the ini file
|
||||
* @param _sSectionName
|
||||
* @param _sKey
|
||||
* @return true if the given Section, Key exists, now you can get the value
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check if a given Section and Key exists in the ini file
|
||||
* @param _sSectionName
|
||||
* @param _sKey
|
||||
* @return true if the given Section, Key exists, now you can get the value
|
||||
*/
|
||||
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)
|
||||
{
|
||||
if ( ((_sLine.length() < 2) ) ||
|
||||
( _sLine.startsWith("#")) ||
|
||||
( _sLine.startsWith(";")) )
|
||||
if (((_sLine.length() < 2)) ||
|
||||
(_sLine.startsWith("#")) ||
|
||||
(_sLine.startsWith(";")))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -165,7 +168,7 @@ public class IniFile implements Enumeration
|
||||
|
||||
private String getItem(int i)
|
||||
{
|
||||
return (String)m_aList.get(i);
|
||||
return (String) m_aList.get(i);
|
||||
}
|
||||
|
||||
private String buildSectionName(String _sSectionName)
|
||||
@@ -173,16 +176,18 @@ public class IniFile implements Enumeration
|
||||
String sFindSection = "[" + _sSectionName + "]";
|
||||
return sFindSection;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return _sName.toLowerCase();
|
||||
@@ -194,11 +199,11 @@ public class IniFile implements Enumeration
|
||||
String sFindSection = toLowerIfNeed(buildSectionName(_sSection));
|
||||
// ----------- find _sSection ---------------
|
||||
int i;
|
||||
for (i=0; i<m_aList.size();i++)
|
||||
for (i = 0; i < m_aList.size(); i++)
|
||||
{
|
||||
String sLine = toLowerIfNeed(getItem(i).trim());
|
||||
if (isRemark(sLine))
|
||||
{
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (sFindSection.equals("[]"))
|
||||
@@ -220,14 +225,14 @@ public class IniFile implements Enumeration
|
||||
* @return true if the given _sSection was found
|
||||
*/
|
||||
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.
|
||||
private int findKey(String _sSection, String _sKey)
|
||||
@@ -245,7 +250,7 @@ public class IniFile implements Enumeration
|
||||
private int findKeyFromKnownSection(int _nSectionIndex, String _sKey)
|
||||
{
|
||||
_sKey = toLowerIfNeed(_sKey);
|
||||
for (int j=_nSectionIndex + 1; j<m_aList.size();j++)
|
||||
for (int j = _nSectionIndex + 1; j < m_aList.size(); j++)
|
||||
{
|
||||
String sLine = getItem(j).trim();
|
||||
|
||||
@@ -270,7 +275,7 @@ public class IniFile implements Enumeration
|
||||
{
|
||||
return j;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -280,7 +285,7 @@ public class IniFile implements Enumeration
|
||||
{
|
||||
_sKey = toLowerIfNeed(_sKey);
|
||||
int i = _nSectionIndex + 1;
|
||||
for (int j=i; j<m_aList.size();j++)
|
||||
for (int j = i; j < m_aList.size(); j++)
|
||||
{
|
||||
String sLine = getItem(j).trim();
|
||||
|
||||
@@ -318,7 +323,7 @@ public class IniFile implements Enumeration
|
||||
int nEqual = sLine.indexOf("=");
|
||||
if (nEqual >= 0)
|
||||
{
|
||||
String sKey = sLine.substring(0, nEqual).trim();
|
||||
String sKey = sLine.substring(0, nEqual).trim();
|
||||
String sValue = sLine.substring(nEqual + 1).trim();
|
||||
return sValue;
|
||||
}
|
||||
@@ -332,7 +337,6 @@ public class IniFile implements Enumeration
|
||||
*/
|
||||
// private int m_nCurrentPosition;
|
||||
// private String m_sOldKey;
|
||||
|
||||
public String getValue(String _sSection, String _sKey)
|
||||
{
|
||||
String sValue = "";
|
||||
@@ -359,7 +363,6 @@ public class IniFile implements Enumeration
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the value at Section, Key converted to an integer
|
||||
* Check with hasValue(Section, Key) to check before you get into trouble.
|
||||
@@ -369,31 +372,32 @@ public class IniFile implements Enumeration
|
||||
* @return
|
||||
*/
|
||||
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();
|
||||
}
|
||||
catch(java.lang.NumberFormatException e)
|
||||
{
|
||||
GlobalLogWriter.get().println("IniFile.getIntValue(): Caught a number format exception, return the default value.");
|
||||
try
|
||||
{
|
||||
nValue = Integer.valueOf(sValue).intValue();
|
||||
}
|
||||
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()
|
||||
{
|
||||
store();
|
||||
}
|
||||
{
|
||||
store();
|
||||
}
|
||||
|
||||
/**
|
||||
write back the ini file to the disk, only if there exist changes
|
||||
* @deprecated use close() instead!
|
||||
*/
|
||||
* @deprecated use close() instead!
|
||||
*/
|
||||
public void store()
|
||||
{
|
||||
if (m_bListContainUnsavedChanges == false)
|
||||
@@ -423,22 +427,26 @@ public class IniFile implements Enumeration
|
||||
try
|
||||
{
|
||||
RandomAccessFile aWriter = new RandomAccessFile(aFile, "rw");
|
||||
for (int i=0; i<m_aList.size();i++)
|
||||
for (int i = 0; i < m_aList.size(); i++)
|
||||
{
|
||||
String sLine = getItem(i);
|
||||
if (sLine.startsWith("["))
|
||||
{
|
||||
// write an extra empty line before next section.
|
||||
aWriter.writeByte((int) '\n');
|
||||
}
|
||||
aWriter.writeBytes(sLine);
|
||||
aWriter.writeByte((int)'\n');
|
||||
aWriter.writeByte((int) '\n');
|
||||
}
|
||||
aWriter.close();
|
||||
}
|
||||
|
||||
catch (java.io.FileNotFoundException fne)
|
||||
{
|
||||
GlobalLogWriter.get().println("couldn't open file for writing " + m_sFilename);
|
||||
GlobalLogWriter.get().println("Message: " + fne.getMessage());
|
||||
// DebugHelper.exception(BasicErrorCode.SbERR_FILE_NOT_FOUND, "");
|
||||
}
|
||||
catch(java.io.IOException ie)
|
||||
catch (java.io.IOException ie)
|
||||
{
|
||||
GlobalLogWriter.get().println("Exception occurs while writing to file " + m_sFilename);
|
||||
GlobalLogWriter.get().println("Message: " + ie.getMessage());
|
||||
@@ -446,12 +454,16 @@ public class IniFile implements Enumeration
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void insertValue(String _sSection, String _sKey, int _nValue)
|
||||
{
|
||||
insertValue(_sSection, _sKey, String.valueOf(_nValue));
|
||||
}
|
||||
{
|
||||
insertValue(_sSection, _sKey, String.valueOf(_nValue));
|
||||
}
|
||||
|
||||
public void insertValue(String _sSection, String _sKey, long _nValue)
|
||||
{
|
||||
insertValue(_sSection, _sKey, String.valueOf(_nValue));
|
||||
}
|
||||
|
||||
/**
|
||||
insert a value
|
||||
there are 3 cases
|
||||
@@ -551,71 +563,71 @@ public class IniFile implements Enumeration
|
||||
//
|
||||
// return sLocalValue;
|
||||
// }
|
||||
|
||||
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)
|
||||
public void removeSection(String _sSectionToRemove)
|
||||
{
|
||||
// if we are at the end, use size() as second section
|
||||
j = m_aList.size();
|
||||
// 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
|
||||
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
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
String sTempFile = System.getProperty("java.io.tmpdir");
|
||||
sTempFile += "inifile";
|
||||
public static void main(String[] args)
|
||||
{
|
||||
String sTempFile = System.getProperty("java.io.tmpdir");
|
||||
sTempFile += "inifile";
|
||||
|
||||
|
||||
IniFile aIniFile = new IniFile(sTempFile);
|
||||
String sValue = aIniFile.getValue("Section", "Key");
|
||||
// insert a new value to a already exist section
|
||||
aIniFile.insertValue("Section", "Key2", "a new value in a existing section");
|
||||
// replace a value
|
||||
aIniFile.insertValue("Section", "Key", "replaced value");
|
||||
// create a new value
|
||||
aIniFile.insertValue("New Section", "Key", "a new key value pair");
|
||||
aIniFile.insertValue("New Section", "Key2", "a new second key value pair");
|
||||
IniFile aIniFile = new IniFile(sTempFile);
|
||||
String sValue = aIniFile.getValue("Section", "Key");
|
||||
// insert a new value to a already exist section
|
||||
aIniFile.insertValue("Section", "Key2", "a new value in a existing section");
|
||||
// replace a value
|
||||
aIniFile.insertValue("Section", "Key", "replaced value");
|
||||
// create a new value
|
||||
aIniFile.insertValue("New Section", "Key", "a new 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("New Section");
|
||||
|
||||
aIniFile.close();
|
||||
}
|
||||
aIniFile.removeSection("Section");
|
||||
aIniFile.removeSection("New Section");
|
||||
|
||||
aIniFile.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration Interface
|
||||
* @return true, if there are more Key values
|
||||
*/
|
||||
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 '['
|
||||
@@ -623,57 +635,57 @@ public void removeSection(String _sSectionToRemove)
|
||||
* @return the line where '[' found or -1
|
||||
*/
|
||||
private int findNextSection(int i)
|
||||
{
|
||||
if (i >= 0)
|
||||
{
|
||||
while (i < m_aList.size())
|
||||
if (i >= 0)
|
||||
{
|
||||
String sLine = (String)m_aList.get(i);
|
||||
if (sLine.startsWith("["))
|
||||
while (i < m_aList.size())
|
||||
{
|
||||
return i;
|
||||
String sLine = (String) m_aList.get(i);
|
||||
if (sLine.startsWith("["))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration Interface
|
||||
* @return a key without the enveloped '[' ']'
|
||||
*/
|
||||
public Object nextElement()
|
||||
{
|
||||
int nLineWithSection = findNextSection(m_aEnumerationPos);
|
||||
if (nLineWithSection != -1)
|
||||
{
|
||||
String sSection = (String)m_aList.get(nLineWithSection);
|
||||
m_aEnumerationPos = findNextSection(nLineWithSection + 1);
|
||||
sSection = sectionToString(sSection);
|
||||
return sSection;
|
||||
int nLineWithSection = findNextSection(m_aEnumerationPos);
|
||||
if (nLineWithSection != -1)
|
||||
{
|
||||
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
|
||||
* @return returns the count of '^['.*']$' Elements
|
||||
*/
|
||||
public int getElementCount()
|
||||
{
|
||||
int nCount = 0;
|
||||
int nPosition = 0;
|
||||
while ((nPosition = findNextSection(nPosition)) != -1)
|
||||
{
|
||||
nCount ++;
|
||||
nPosition ++;
|
||||
int nCount = 0;
|
||||
int nPosition = 0;
|
||||
while ((nPosition = findNextSection(nPosition)) != -1)
|
||||
{
|
||||
nCount++;
|
||||
nPosition++;
|
||||
}
|
||||
return nCount;
|
||||
}
|
||||
return nCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -430,8 +430,8 @@ public class APIDescGetter extends DescGetter
|
||||
|
||||
return getDescArray(makeArray(ifc_names));
|
||||
}
|
||||
|
||||
private static String entryType;
|
||||
|
||||
private static DescEntry createDescEntry(String meth_name, String ifc_name, DescEntry parent)
|
||||
{
|
||||
entryType = "service";
|
||||
@@ -472,8 +472,8 @@ public class APIDescGetter extends DescGetter
|
||||
|
||||
private static void createIfcName(String ifc_name, ArrayList meth_names, DescEntry ifcDesc)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method ensures that XComponent will be the last in the list of interfaces
|
||||
*/
|
||||
|
@@ -122,8 +122,8 @@ public class CwsDataExchangeImpl implements CwsDataExchange
|
||||
final String stat = status ? ".PASSED.OK" : ".PASSED.FAILED";
|
||||
|
||||
statusFile = utils.getUsersTempDir() +
|
||||
System.getProperty("file.separator") +
|
||||
"UnoApiCwsStatus." +
|
||||
System.getProperty("file.separator") +
|
||||
"UnoApiCwsStatus." +
|
||||
(String) param.get(PropertyName.VERSION) +
|
||||
"_" + param.get(PropertyName.OPERATING_SYSTEM) + stat + ".txt";
|
||||
|
||||
|
@@ -36,6 +36,9 @@ import java.io.PrintStream;
|
||||
import java.io.LineNumberReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import lib.TestParameters;
|
||||
import util.PropertyName;
|
||||
import util.utils;
|
||||
@@ -492,6 +495,29 @@ public class ProcessHandler
|
||||
isStarted = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time in seconds since 1st January 1970
|
||||
* @return
|
||||
*/
|
||||
public static long getSystemTime()
|
||||
{
|
||||
// Calendar cal = new GregorianCalendar();
|
||||
// final long nTime = cal.getTimeInMillis();
|
||||
final long nTime = System.currentTimeMillis();
|
||||
return nTime;
|
||||
}
|
||||
private long m_nExactStartTimeInMillisec;
|
||||
|
||||
private void initialExactStartTime()
|
||||
{
|
||||
m_nExactStartTimeInMillisec = getSystemTime();
|
||||
}
|
||||
|
||||
public long getProcessStartTime()
|
||||
{
|
||||
return m_nExactStartTimeInMillisec;
|
||||
}
|
||||
|
||||
protected void execute()
|
||||
{
|
||||
if (isStarted())
|
||||
@@ -511,7 +537,7 @@ public class ProcessHandler
|
||||
log.print(" ");
|
||||
}
|
||||
log.println("");
|
||||
|
||||
initialExactStartTime();
|
||||
m_aProcess = runtime.exec(cmdLineArray, envVars);
|
||||
}
|
||||
else
|
||||
@@ -547,6 +573,9 @@ public class ProcessHandler
|
||||
stderr = new Pump(m_aProcess.getErrorStream(), log, "err > ");
|
||||
stdIn = new PrintStream(m_aProcess.getOutputStream());
|
||||
|
||||
// int nExitValue = m_aProcess.exitValue();
|
||||
// int dummy = 0;
|
||||
|
||||
dbg("execute: flush io-streams");
|
||||
|
||||
flushInput();
|
||||
@@ -583,10 +612,10 @@ public class ProcessHandler
|
||||
* @return <code>true</code> if process correctly exited
|
||||
* (exit code doesn't affect to this result).
|
||||
*/
|
||||
public boolean waitFor(long timeout)
|
||||
{
|
||||
return waitFor(timeout, true);
|
||||
}
|
||||
public boolean waitFor(long timeout)
|
||||
{
|
||||
return waitFor(timeout, true);
|
||||
}
|
||||
|
||||
private boolean waitFor(long timeout, boolean bKillProcessAfterTimeout)
|
||||
{
|
||||
|
@@ -48,7 +48,7 @@ public class Runner
|
||||
|
||||
private static long m_nStartTime;
|
||||
|
||||
private static long getStartTime()
|
||||
public static long getRunnerStartTime()
|
||||
{
|
||||
return m_nStartTime;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class Runner
|
||||
/*
|
||||
return the time, which is done until last startTime()
|
||||
*/
|
||||
private static long meanTime(long _nCurrentTimer)
|
||||
public static long meanTime(long _nCurrentTimer)
|
||||
{
|
||||
if (_nCurrentTimer == 0)
|
||||
{
|
||||
@@ -109,6 +109,7 @@ public class Runner
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean checkPathVariable(String _sPath, String delim)
|
||||
{
|
||||
String sPath = System.getProperty(_sPath);
|
||||
@@ -117,7 +118,7 @@ public class Runner
|
||||
StringTokenizer aTokenEnum = new StringTokenizer(sPath, delim);
|
||||
while (aTokenEnum.hasMoreElements())
|
||||
{
|
||||
String sToken = (String)aTokenEnum.nextElement();
|
||||
String sToken = (String) aTokenEnum.nextElement();
|
||||
if (checkVariableForCygwin(sToken))
|
||||
{
|
||||
System.err.println("ERROR: OOoRunner detect cygwin path in '" + _sPath + "'");
|
||||
@@ -132,7 +133,7 @@ public class Runner
|
||||
{
|
||||
// ----- check all System.getProperty(key) variables -----
|
||||
String sOsName = System.getProperty("os.name");
|
||||
if (! sOsName.toLowerCase().startsWith("windows"))
|
||||
if (!sOsName.toLowerCase().startsWith("windows"))
|
||||
{
|
||||
// we need to check only on windows
|
||||
return;
|
||||
@@ -145,7 +146,7 @@ public class Runner
|
||||
|
||||
while (aEnum.hasMoreElements())
|
||||
{
|
||||
String sKey = (String)aEnum.nextElement();
|
||||
String sKey = (String) aEnum.nextElement();
|
||||
String sValue = System.getProperty(sKey);
|
||||
|
||||
if (checkVariableForCygwin(sValue))
|
||||
@@ -165,10 +166,10 @@ public class Runner
|
||||
aEnum = _aParams.keys();
|
||||
while (aEnum.hasMoreElements())
|
||||
{
|
||||
String sKey = (String)aEnum.nextElement();
|
||||
String sKey = (String) aEnum.nextElement();
|
||||
if (_aParams.get(sKey) instanceof String)
|
||||
{
|
||||
String sValue = (String)_aParams.get(sKey);
|
||||
String sValue = (String) _aParams.get(sKey);
|
||||
|
||||
if (checkVariableForCygwin(sValue))
|
||||
{
|
||||
@@ -240,7 +241,7 @@ public class Runner
|
||||
checkAllVariablesForCygwinPath(param);
|
||||
|
||||
boolean worked = toExecute.executeTest(param);
|
||||
long nTime = meanTime(getStartTime());
|
||||
long nTime = meanTime(getRunnerStartTime());
|
||||
String sBeautifyTime = beautifyTime(nTime);
|
||||
|
||||
System.out.println("Job run took: " + nTime + "ms " + " [" + sBeautifyTime + "]");
|
||||
|
@@ -56,23 +56,25 @@ import helper.ConfigHelper;
|
||||
import java.util.Vector;
|
||||
import lib.StatusException;
|
||||
|
||||
|
||||
/**
|
||||
* contains helper methods for the Desktop
|
||||
*/
|
||||
public class DesktopTools {
|
||||
public class DesktopTools
|
||||
{
|
||||
|
||||
/**
|
||||
* Queries the XComponentLoader
|
||||
*
|
||||
* @param xMSF the MultiServiceFactory
|
||||
* @return the gained XComponentLoader
|
||||
*/
|
||||
public static XComponentLoader getCLoader(XMultiServiceFactory xMSF) {
|
||||
*/
|
||||
public static XComponentLoader getCLoader(XMultiServiceFactory xMSF)
|
||||
{
|
||||
XDesktop oDesktop = (XDesktop) UnoRuntime.queryInterface(
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
|
||||
XComponentLoader oCLoader = (XComponentLoader) UnoRuntime.queryInterface(
|
||||
XComponentLoader.class, oDesktop);
|
||||
XComponentLoader.class, oDesktop);
|
||||
|
||||
return oCLoader;
|
||||
} // finish getCLoader
|
||||
@@ -82,13 +84,17 @@ public class DesktopTools {
|
||||
*
|
||||
* @param xMSF the MultiServiceFactory
|
||||
* @return the gained Object
|
||||
*/
|
||||
public static Object createDesktop(XMultiServiceFactory xMSF) {
|
||||
*/
|
||||
public static Object createDesktop(XMultiServiceFactory xMSF)
|
||||
{
|
||||
Object oInterface;
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
oInterface = xMSF.createInstance("com.sun.star.comp.framework.Desktop");
|
||||
} catch (com.sun.star.uno.Exception e) {
|
||||
}
|
||||
catch (com.sun.star.uno.Exception e)
|
||||
{
|
||||
throw new IllegalArgumentException("Desktop Service not available");
|
||||
}
|
||||
|
||||
@@ -100,9 +106,10 @@ public class DesktopTools {
|
||||
* @param xMSF the XMultiServiceFactory
|
||||
* @return XEnumeration of all components on the desktop
|
||||
*/
|
||||
public static XEnumeration getAllComponents(XMultiServiceFactory xMSF) {
|
||||
public static XEnumeration getAllComponents(XMultiServiceFactory xMSF)
|
||||
{
|
||||
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
return xDesktop.getComponents().createEnumeration();
|
||||
}
|
||||
|
||||
@@ -111,9 +118,10 @@ public class DesktopTools {
|
||||
* @param xMSF the XMultiServiceFactory
|
||||
* @return XComponent of the current component on the desktop
|
||||
*/
|
||||
public static XComponent getCurrentComponent(XMultiServiceFactory xMSF) {
|
||||
public static XComponent getCurrentComponent(XMultiServiceFactory xMSF)
|
||||
{
|
||||
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
return xDesktop.getCurrentComponent();
|
||||
}
|
||||
|
||||
@@ -122,9 +130,10 @@ public class DesktopTools {
|
||||
* @param xMSF the XMultiServiceFactory
|
||||
* @return XComponent of the current component on the desktop
|
||||
*/
|
||||
public static XFrame getCurrentFrame(XMultiServiceFactory xMSF) {
|
||||
public static XFrame getCurrentFrame(XMultiServiceFactory xMSF)
|
||||
{
|
||||
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
return xDesktop.getCurrentFrame();
|
||||
}
|
||||
|
||||
@@ -138,22 +147,33 @@ public class DesktopTools {
|
||||
* @param xMSF the XMultiSerivceFactory
|
||||
* @return returns an array of all open documents
|
||||
*/
|
||||
public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF) {
|
||||
public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF)
|
||||
{
|
||||
Vector components = new Vector();
|
||||
XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
XDesktop.class, createDesktop(xMSF));
|
||||
|
||||
XEnumeration allComp = getAllComponents(xMSF);
|
||||
|
||||
while (allComp.hasMoreElements()){
|
||||
try{
|
||||
while (allComp.hasMoreElements())
|
||||
{
|
||||
try
|
||||
{
|
||||
XComponent xComponent = (XComponent) UnoRuntime.queryInterface(
|
||||
XComponent.class, allComp.nextElement());
|
||||
XComponent.class, allComp.nextElement());
|
||||
|
||||
if (getDocumentType(xComponent) != null) components.add(xComponent);
|
||||
if (getDocumentType(xComponent) != null)
|
||||
{
|
||||
components.add(xComponent);
|
||||
}
|
||||
|
||||
} catch (com.sun.star.container.NoSuchElementException e) {
|
||||
} catch ( com.sun.star.lang.WrappedTargetException e) {}
|
||||
}
|
||||
catch (com.sun.star.container.NoSuchElementException e)
|
||||
{
|
||||
}
|
||||
catch (com.sun.star.lang.WrappedTargetException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
return components.toArray();
|
||||
}
|
||||
@@ -170,28 +190,41 @@ public class DesktopTools {
|
||||
* </ul>
|
||||
* or <CODE>null</CODE>
|
||||
*/
|
||||
public static String getDocumentType(XComponent xComponent) {
|
||||
XServiceInfo sInfo = (XServiceInfo)UnoRuntime.queryInterface(
|
||||
public static String getDocumentType(XComponent xComponent)
|
||||
{
|
||||
XServiceInfo sInfo = (XServiceInfo) UnoRuntime.queryInterface(
|
||||
XServiceInfo.class, xComponent);
|
||||
|
||||
if (sInfo == null) {
|
||||
if (sInfo == null)
|
||||
{
|
||||
return "";
|
||||
} else if (sInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")) {
|
||||
}
|
||||
else if (sInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument"))
|
||||
{
|
||||
return "scalc";
|
||||
} else if (sInfo.supportsService("com.sun.star.text.TextDocument")) {
|
||||
}
|
||||
else if (sInfo.supportsService("com.sun.star.text.TextDocument"))
|
||||
{
|
||||
return "swriter";
|
||||
} else if (sInfo.supportsService("com.sun.star.drawing.DrawingDocument")) {
|
||||
}
|
||||
else if (sInfo.supportsService("com.sun.star.drawing.DrawingDocument"))
|
||||
{
|
||||
return "sdraw";
|
||||
} else if (sInfo.supportsService("com.sun.star.presentation.PresentationDocument")) {
|
||||
}
|
||||
else if (sInfo.supportsService("com.sun.star.presentation.PresentationDocument"))
|
||||
{
|
||||
return "simpress";
|
||||
} else if (sInfo.supportsService("com.sun.star.formula.FormulaProperties")) {
|
||||
}
|
||||
else if (sInfo.supportsService("com.sun.star.formula.FormulaProperties"))
|
||||
{
|
||||
return "smath";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Opens a new document of a given kind
|
||||
* with arguments
|
||||
@@ -208,14 +241,17 @@ public class DesktopTools {
|
||||
* @param xMSF the MultiServiceFactory
|
||||
*/
|
||||
public static XComponent openNewDoc(XMultiServiceFactory xMSF, String kind,
|
||||
PropertyValue[] Args) {
|
||||
PropertyValue[] Args)
|
||||
{
|
||||
XComponent oDoc = null;
|
||||
|
||||
try {
|
||||
oDoc = getCLoader(xMSF)
|
||||
.loadComponentFromURL("private:factory/" + kind,
|
||||
"_blank", 0, Args);
|
||||
} catch (com.sun.star.uno.Exception e) {
|
||||
try
|
||||
{
|
||||
oDoc = getCLoader(xMSF).loadComponentFromURL("private:factory/" + kind,
|
||||
"_blank", 0, Args);
|
||||
}
|
||||
catch (com.sun.star.uno.Exception e)
|
||||
{
|
||||
throw new IllegalArgumentException("Document could not be opened");
|
||||
}
|
||||
|
||||
@@ -231,7 +267,8 @@ public class DesktopTools {
|
||||
* @param xMSF the MultiServiceFactory
|
||||
*/
|
||||
public static XComponent loadDoc(XMultiServiceFactory xMSF, String url,
|
||||
PropertyValue[] Args) {
|
||||
PropertyValue[] Args)
|
||||
{
|
||||
XComponent oDoc = null;
|
||||
if (Args == null)
|
||||
{
|
||||
@@ -254,34 +291,48 @@ public class DesktopTools {
|
||||
* closes a given document
|
||||
* @param DocumentToClose the document to close
|
||||
*/
|
||||
public static void closeDoc(XInterface DocumentToClose) {
|
||||
public static void closeDoc(XInterface DocumentToClose)
|
||||
{
|
||||
if (DocumentToClose == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String kd = System.getProperty("KeepDocument");
|
||||
if (kd != null ) {
|
||||
if (kd != null)
|
||||
{
|
||||
System.out.println("The property 'KeepDocument' is set and so the document won't be disposed");
|
||||
return;
|
||||
}
|
||||
XModifiable modified = (XModifiable) UnoRuntime.queryInterface(
|
||||
XModifiable.class, DocumentToClose);
|
||||
XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
|
||||
XCloseable.class, DocumentToClose);
|
||||
XModifiable modified = (XModifiable) UnoRuntime.queryInterface(XModifiable.class, DocumentToClose);
|
||||
XCloseable closer = (XCloseable) UnoRuntime.queryInterface(XCloseable.class, DocumentToClose);
|
||||
|
||||
try {
|
||||
if (modified != null){
|
||||
try
|
||||
{
|
||||
if (modified != null)
|
||||
{
|
||||
modified.setModified(false);
|
||||
}
|
||||
closer.close(true);
|
||||
} catch (com.sun.star.util.CloseVetoException e) {
|
||||
}
|
||||
catch (com.sun.star.util.CloseVetoException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
System.out.println("Couldn't close document");
|
||||
} catch (com.sun.star.lang.DisposedException e) {
|
||||
}
|
||||
catch (com.sun.star.lang.DisposedException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
System.out.println("Couldn't close document");
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
}
|
||||
catch (java.lang.NullPointerException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
System.out.println("Couldn't close document");
|
||||
} catch (com.sun.star.beans.PropertyVetoException e) {
|
||||
}
|
||||
catch (com.sun.star.beans.PropertyVetoException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
System.out.println("Couldn't close document");
|
||||
}
|
||||
}
|
||||
@@ -293,10 +344,12 @@ public class DesktopTools {
|
||||
* @return a floating XWindow
|
||||
*/
|
||||
public static XWindowPeer createFloatingWindow(XMultiServiceFactory xMSF)
|
||||
throws StatusException{
|
||||
return createFloatingWindow(xMSF, 500, 100, 400, 600);
|
||||
throws StatusException
|
||||
{
|
||||
return createFloatingWindow(xMSF, 500, 100, 400, 600);
|
||||
}
|
||||
/**
|
||||
|
||||
/**
|
||||
* Creates a floating XWindow on the given position and size.
|
||||
* @return a 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
|
||||
*/
|
||||
public static XWindowPeer createFloatingWindow(XMultiServiceFactory xMSF, int X, int Y, int width, int height)
|
||||
throws StatusException{
|
||||
throws StatusException
|
||||
{
|
||||
|
||||
XInterface oObj = null;
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
oObj = (XInterface) xMSF.createInstance("com.sun.star.awt.Toolkit");
|
||||
} catch (com.sun.star.uno.Exception e) {
|
||||
}
|
||||
catch (com.sun.star.uno.Exception e)
|
||||
{
|
||||
throw new StatusException("Couldn't get toolkit", e);
|
||||
}
|
||||
|
||||
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.WindowServiceName = "modelessdialog";
|
||||
descriptor.ParentIndex = -1;
|
||||
descriptor.ParentIndex = -1;
|
||||
|
||||
Rectangle bounds = new com.sun.star.awt.Rectangle();
|
||||
bounds.X = X;
|
||||
bounds.Y = Y;
|
||||
bounds.Width = width;
|
||||
bounds.Height = height;
|
||||
Rectangle bounds = new com.sun.star.awt.Rectangle();
|
||||
bounds.X = X;
|
||||
bounds.Y = Y;
|
||||
bounds.Width = width;
|
||||
bounds.Height = height;
|
||||
|
||||
descriptor.Bounds = bounds;
|
||||
descriptor.WindowAttributes = (com.sun.star.awt.WindowAttribute.BORDER +
|
||||
com.sun.star.awt.WindowAttribute.MOVEABLE +
|
||||
com.sun.star.awt.WindowAttribute.SIZEABLE +
|
||||
com.sun.star.awt.WindowAttribute.CLOSEABLE +
|
||||
com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN);
|
||||
com.sun.star.awt.WindowAttribute.MOVEABLE +
|
||||
com.sun.star.awt.WindowAttribute.SIZEABLE +
|
||||
com.sun.star.awt.WindowAttribute.CLOSEABLE +
|
||||
com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN);
|
||||
|
||||
XWindowPeer xWindow = null;
|
||||
|
||||
try{
|
||||
xWindow = tk.createWindow( descriptor );
|
||||
}catch ( com.sun.star.lang.IllegalArgumentException e){
|
||||
throw new StatusException("Could not create window", e);
|
||||
try
|
||||
{
|
||||
xWindow = tk.createWindow(descriptor);
|
||||
}
|
||||
catch (com.sun.star.lang.IllegalArgumentException e)
|
||||
{
|
||||
throw new StatusException("Could not create window", e);
|
||||
}
|
||||
|
||||
return xWindow;
|
||||
@@ -355,27 +415,28 @@ public class DesktopTools {
|
||||
* zoom to have a view over the hole page
|
||||
* @param xDoc the document to zoom
|
||||
*/
|
||||
public static void zoomToEntirePage( XInterface xDoc){
|
||||
try {
|
||||
public static void zoomToEntirePage(XInterface xDoc)
|
||||
{
|
||||
try
|
||||
{
|
||||
XModel xMod = (XModel) UnoRuntime.queryInterface(XModel.class, xDoc);
|
||||
XInterface oCont = xMod.getCurrentController();
|
||||
XViewSettingsSupplier oVSSupp = (XViewSettingsSupplier)
|
||||
UnoRuntime.queryInterface(XViewSettingsSupplier.class, oCont);
|
||||
XViewSettingsSupplier oVSSupp = (XViewSettingsSupplier) UnoRuntime.queryInterface(XViewSettingsSupplier.class, oCont);
|
||||
|
||||
XInterface oViewSettings = oVSSupp.getViewSettings();
|
||||
XPropertySet oViewProp = (XPropertySet)
|
||||
UnoRuntime.queryInterface(XPropertySet.class, oViewSettings);
|
||||
XPropertySet oViewProp = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oViewSettings);
|
||||
oViewProp.setPropertyValue("ZoomType",
|
||||
new Short(com.sun.star.view.DocumentZoomType.ENTIRE_PAGE));
|
||||
new Short(com.sun.star.view.DocumentZoomType.ENTIRE_PAGE));
|
||||
|
||||
utils.shortWait(5000);
|
||||
} catch (Exception e){
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.out.println("Could not zoom to entire page: " + e.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function docks the Stylist onto the right side of the window.</p>
|
||||
* Note:<P>
|
||||
@@ -383,31 +444,35 @@ public class DesktopTools {
|
||||
* the chage of the docking will be effective at a restart.
|
||||
* @param xMSF the XMultiServiceFactory
|
||||
*/
|
||||
public static void dockStylist(XMultiServiceFactory xMSF){
|
||||
public static void dockStylist(XMultiServiceFactory xMSF)
|
||||
{
|
||||
// prepare Window-Settings
|
||||
try {
|
||||
try
|
||||
{
|
||||
ConfigHelper aConfig = new ConfigHelper(xMSF,
|
||||
"org.openoffice.Office.Views", false);
|
||||
"org.openoffice.Office.Views", false);
|
||||
|
||||
// Is node "5539" (slot-id for navigator) available? If not, insert it
|
||||
XNameReplace x5539 = aConfig.getOrInsertGroup("Windows", "5539");
|
||||
|
||||
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(
|
||||
"Windows", "5539", "UserData", "Data","V2,V,0,AL:(5,16,0/0/244/349,244;610)");
|
||||
"Windows", "5539", "UserData", "Data", "V2,V,0,AL:(5,16,0/0/244/349,244;610)");
|
||||
|
||||
// Is node "SplitWindow2" available? If not, instert it.
|
||||
aConfig.getOrInsertGroup("Windows", "SplitWindow2");
|
||||
|
||||
aConfig.insertOrUpdateExtensibleGroupProperty(
|
||||
"Windows", "SplitWindow2","UserData", "UserItem","V1,2,1,0,5539");
|
||||
"Windows", "SplitWindow2", "UserData", "UserItem", "V1,2,1,0,5539");
|
||||
|
||||
aConfig.flush();
|
||||
aConfig = null;
|
||||
|
||||
} catch (com.sun.star.uno.Exception e) {
|
||||
}
|
||||
catch (com.sun.star.uno.Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -418,7 +483,8 @@ public class DesktopTools {
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public static void bringWindowToFromt(XModel xModel){
|
||||
public static void bringWindowToFromt(XModel xModel)
|
||||
{
|
||||
bringWindowToFront(xModel);
|
||||
}
|
||||
|
||||
@@ -428,7 +494,8 @@ public class DesktopTools {
|
||||
* Only the order of Office documents are changeable.
|
||||
* @param xModel the XModel of the document to bring to top
|
||||
*/
|
||||
public static void bringWindowToFront(XModel xModel){
|
||||
public static void bringWindowToFront(XModel xModel)
|
||||
{
|
||||
// System.out.println("DEBUG: bring to front xModel");
|
||||
|
||||
XTopWindow xTopWindow =
|
||||
@@ -439,10 +506,12 @@ public class DesktopTools {
|
||||
xTopWindow.toFront();
|
||||
}
|
||||
|
||||
public static void bringWindowToFront(XComponent xComponent){
|
||||
public static void bringWindowToFront(XComponent xComponent)
|
||||
{
|
||||
// System.out.println("DEBUG: bring to front xComponent");
|
||||
XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xComponent);
|
||||
if (xModel != null){
|
||||
if (xModel != null)
|
||||
{
|
||||
bringWindowToFront(xModel);
|
||||
}
|
||||
}
|
||||
|
@@ -186,7 +186,13 @@ public class utils {
|
||||
} else {
|
||||
if (fullDocPath.startsWith("/")) {
|
||||
prefix = "file://";
|
||||
} else {
|
||||
// if (helper.OSHelper.isLinuxIntel())
|
||||
// {
|
||||
// prefix = "file:/";
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix = "file:///";
|
||||
}
|
||||
}
|
||||
|
@@ -36,6 +36,8 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
||||
# smoketest - do the smoketest
|
||||
#
|
||||
|
||||
use lib ("$ENV{SOLARENV}/bin/modules");
|
||||
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
use File::Copy;
|
||||
@@ -47,12 +49,12 @@ use Getopt::Long;
|
||||
# #
|
||||
#########################
|
||||
$is_debug = 0; # run without executing commands
|
||||
$is_command_infos = 1; # print command details before exec
|
||||
$is_command_infos = 0; # print command details before exec
|
||||
$is_protocol_test = 0;
|
||||
$is_remove_on_error = 0;
|
||||
$is_remove_at_end = 1;
|
||||
$is_do_deinstall = 0;
|
||||
$is_admin_installation = 1;
|
||||
$is_without_msiexec = 1;
|
||||
$is_oo = 1;
|
||||
|
||||
$gui = $ENV{GUI};
|
||||
@@ -165,7 +167,6 @@ elsif ($gui eq $cygwin) {
|
||||
$bootstrapiniTemp = $bootstrapini . "_";
|
||||
$CygwinLineends = $/;
|
||||
$WinLineends = "\r\n";
|
||||
&SetWinLineends();
|
||||
$packpackage = "msi";
|
||||
$installpath_without =~ s/\\/\//g;
|
||||
}
|
||||
@@ -173,6 +174,12 @@ else {
|
||||
print_error ("not supported system\n",1);
|
||||
}
|
||||
|
||||
if ($is_without_msiexec) {
|
||||
require installer::windows::admin; import installer::windows::admin;
|
||||
$installer::globals::logfilename = $ENV{DMAKE_WORK_DIR} . $PathSeparator . $ENV{OUTPATH} . $ENV{PROEXT} . $PathSeparator . "misc" . $PathSeparator . "installer.log";
|
||||
$installer::globals::exithandler = \&install_error;
|
||||
}
|
||||
|
||||
if ($is_oo) {
|
||||
@install_list = ( 'instsetoo_native'
|
||||
);
|
||||
@@ -195,7 +202,8 @@ else {
|
||||
'can not patch bottstrapini',
|
||||
'msiexec failed. Maybe you have got an installed version',
|
||||
'deinstallation is incomplete',
|
||||
'this packformat is not supported for this environment'
|
||||
'this packformat is not supported for this environment',
|
||||
'can not set execute permission'
|
||||
);
|
||||
|
||||
my $show_NoMessage = 0;
|
||||
@@ -214,6 +222,7 @@ my $error_patchBootstrap = 10;
|
||||
my $error_msiexec = 11;
|
||||
my $error_deinst = 12;
|
||||
my $error_packformat = 13;
|
||||
my $error_permission = 14;
|
||||
|
||||
my $command_normal = 0;
|
||||
my $command_withoutErrorcheck = 1;
|
||||
@@ -528,6 +537,10 @@ sub doTest {
|
||||
# execute_Command ($Command, $error_deinstall, $show_NoMessage, $command_normal);
|
||||
}
|
||||
|
||||
sub install_error {
|
||||
print_error ($error_messages[$error_setup], $error_setup);
|
||||
}
|
||||
|
||||
sub doInstall {
|
||||
my ($installsetpath, $dest_installdir) = @_;
|
||||
my ($DirArray, $mask, $file, $Command, $optdir, $rpmdir, $system, $mach, $basedir, $output_ref, $olddir, $newdir);
|
||||
@@ -557,51 +570,43 @@ sub doInstall {
|
||||
print_error ("Installationset in $installsetpath is incomplete", 2);
|
||||
}
|
||||
foreach $file (@DirArray) {
|
||||
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";
|
||||
if ($is_without_msiexec) {
|
||||
if ($is_debug) {
|
||||
print "Debugmode: no installation from $installsetpath\n";
|
||||
}
|
||||
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";
|
||||
}
|
||||
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 {
|
||||
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";
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -844,12 +849,7 @@ sub getInstset {
|
||||
return ($NEWINSTSET, $INSTSET);
|
||||
}
|
||||
if (!isLocalEnv() and !defined($ENV{CWS_WORK_STAMP}) and (-e $SHIP)) {
|
||||
my $last_lineend = $/;
|
||||
if ($gui eq $cygwin) {
|
||||
&SetCygwinLineends();
|
||||
}
|
||||
($NEWINSTSET, $INSTSET) = getSetFromServer();
|
||||
$/ = $last_lineend;
|
||||
}
|
||||
else {
|
||||
$InstDir="";
|
||||
@@ -899,44 +899,6 @@ sub isLocalEnv {
|
||||
return $returnvalue;
|
||||
}
|
||||
|
||||
sub get_milestoneAndBuildID {
|
||||
my ( $ws, $pf ) = @_;
|
||||
my ($milestone, $buildid, $upd, $path, $updext);
|
||||
|
||||
if ( $ws =~ /^\D+(\d+)$/) {
|
||||
$upd = $1;
|
||||
}
|
||||
|
||||
if (defined ($ENV{UPDMINOREXT})) {
|
||||
$updext = $ENV{UPDMINOREXT};
|
||||
}
|
||||
else {
|
||||
$updext = "";
|
||||
}
|
||||
|
||||
$path = "$ENV{SOLARVER}$PathSeparator$pf$PathSeparator" . "inc$updext$PathSeparator$upd" . "minor.mk";
|
||||
print "$path\n" if $is_debug;
|
||||
if ( !open(MINORMK,$path) ) {
|
||||
print "FATAL: can't open $path\n";
|
||||
return (0,0);
|
||||
}
|
||||
|
||||
if (!eof(MINORMK)) {
|
||||
while (<MINORMK>) {
|
||||
chomp;
|
||||
if ( /LAST_MINOR=(\w+)/ ) {
|
||||
$milestone = $1;
|
||||
}
|
||||
elsif ( /BUILD=(\d+)/ ) {
|
||||
$buildid = $1;
|
||||
}
|
||||
}
|
||||
|
||||
close(MINORMK);
|
||||
}
|
||||
return ($milestone, $buildid);
|
||||
}
|
||||
|
||||
sub get_productcode {
|
||||
my ( $installpath ) = @_;
|
||||
my ($path, $productcode);
|
||||
@@ -977,13 +939,11 @@ sub getSetFromServer {
|
||||
my $workspace = $ENV{WORK_STAMP};
|
||||
my $platform = $ENV{INPATH};
|
||||
my $latestset;
|
||||
my (@DirArray, $mask, $buildid);
|
||||
my (@DirArray, $mask);
|
||||
$SetupFullPath = $PORDUCT;
|
||||
if ( ! ( $workspace && $platform ) ) {
|
||||
print_error ( "Error: environment not set correctly.", 1);
|
||||
}
|
||||
# get latest broadcastet milestone and pack number
|
||||
($milestone, $buildid) = get_milestoneAndBuildID( $workspace, $platform );
|
||||
if (!defined($milestone)) {
|
||||
print_error ("Milestone ist not defined!", 2);
|
||||
}
|
||||
|
@@ -721,9 +721,9 @@ testcase tCreateNewBubbleChart
|
||||
dim sInputFile as STRING
|
||||
dim sOutputFile as STRING
|
||||
dim sControlString as STRING
|
||||
sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/ods/BubbleChartData.ods" )
|
||||
sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/BubbleChartData.ods" )
|
||||
sOutputFile = convertpath ( gOfficepath & "user/work/tCreateNewBubbleChart.ods" )
|
||||
printlog "File / Load TesttoolPath/chart2/optional/input/ods/BubbleChartData.ods"
|
||||
printlog "File / Load TesttoolPath/chart2/optional/input/BubbleChartData.ods"
|
||||
call hFileOpen(sInputFile)
|
||||
sleep(2)
|
||||
printlog "Save document as Officepath/user/work/tCreateNewBubbleChart.ods"
|
||||
|
@@ -196,7 +196,7 @@ testcase tTextBox
|
||||
endif
|
||||
|
||||
if fGetControlProperty("TextBox","AdditionalInfo") <> "my only friend the end." then
|
||||
warnlog "the value: background is not saved"
|
||||
warnlog "the AdditionalInfo value is not saved"
|
||||
endif
|
||||
call fSetControlProperty("TextBox","TextType","2") 'needed for activate scrollbar
|
||||
sleep(1)
|
||||
|
@@ -119,6 +119,7 @@ function fSetControlProperty(sControlType, sPropertyName, sPropertyValue as stri
|
||||
Align.select(Cint(sPropertyValue))
|
||||
elseif sPropertyName = "AdditionalInfo" then
|
||||
Information.setText(sPropertyValue)
|
||||
Information.TypeKeys("<RETURN>",true)
|
||||
elseif sPropertyName = "AutoComplete" then
|
||||
AutoComplete.select(Cint(sPropertyValue))
|
||||
elseif sPropertyName = "Background" then
|
||||
|
@@ -75,19 +75,15 @@ testcase tExtensionFileOpen
|
||||
Add.click()
|
||||
Kontext "OeffnenDlg"
|
||||
if ( OeffnenDlg.exists( 2 ) ) then
|
||||
if ( Dateiauswahl.getItemCount() <> 1 ) then
|
||||
warnlog( "There should be exactly one item visible in the File Picker" )
|
||||
DateiAuswahl.select( DateiAuswahl.getItemCount() )
|
||||
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
|
||||
DateiAuswahl.select( 1 )
|
||||
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
|
||||
printlog( "Found correct extension, the dialog remembers the path" )
|
||||
endif
|
||||
kontext "OeffnenDlg"
|
||||
OeffnenDlg.cancel()
|
||||
|
@@ -51,7 +51,7 @@ testcase tLowerCaseMetaInf
|
||||
dim irc as integer
|
||||
|
||||
printlog( "Install extension: " & cExtensionPath )
|
||||
irc = hExtensionAddGUI( cExtensionPath, "AcceptLicense" )
|
||||
irc = hExtensionAddGUI( cExtensionPath, "AcceptLicense,InstallForUser" )
|
||||
|
||||
if ( irc > 0 ) then
|
||||
|
||||
|
@@ -154,7 +154,7 @@ testcase tExtensionOptions1
|
||||
else
|
||||
irc = hSelectOptionsItem( OPTIONS_ITEM , ITEM_POS_2 )
|
||||
endif
|
||||
if ( irc > 0 ) then
|
||||
if ( irc > 1 ) then
|
||||
warnlog( "Node <" & OPTIONS_ITEM & "> was not found in Tools/Options" )
|
||||
else
|
||||
printlog( "Node is present. Good." )
|
||||
|
@@ -74,8 +74,8 @@ testcase tPNG
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
endcase 'tPNG
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tSVM
|
||||
|
||||
@@ -243,8 +243,8 @@ testcase tSVM
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
|
||||
endcase
|
||||
|
||||
endcase 'tSVM
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tPDF
|
||||
|
||||
@@ -253,13 +253,18 @@ testcase tPDF
|
||||
dim iFileSize(12) as long
|
||||
dim i as integer
|
||||
|
||||
hFileOpen ( gTesttoolPath & "graphics\required\input\graphicexport_pdf." & ExtensionString )
|
||||
'/// Export the file 12 times: ///'
|
||||
'///+ every compression level (3) and every range (3), check if button in toolbar uses last settings (6) (-> 12) ///'
|
||||
hFileOpen (ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport_pdf."+ExtensionString ))
|
||||
sleep (10)
|
||||
|
||||
'---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
'###### all / Screen optimized ######
|
||||
'/// File->Export as PDF document
|
||||
printlog "File->Export as PDF document"
|
||||
'///+ range = All
|
||||
printlog " range = All"
|
||||
'///+ compression = Screen optimized
|
||||
printlog " compression = Screen optimized"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -268,7 +273,9 @@ testcase tPDF
|
||||
'--------------------------------------------------------- Output the first file ---------------------------------------------------------------
|
||||
|
||||
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 1, TRUE, FALSE, 1, 1)
|
||||
'/// Export using Button in toolbar
|
||||
printlog "Export using Button in toolbar"
|
||||
'///+ use the settings from the export before
|
||||
printlog " use the settings from the export before"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -279,8 +286,11 @@ testcase tPDF
|
||||
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 2, TRUE, FALSE, 1, 1) ' button in toolbar -> last settings have to be used
|
||||
|
||||
'###### range / Screen optimized ######
|
||||
'/// File->Export as PDF document
|
||||
printlog "File->Export as PDF document"
|
||||
'///+ range = Range
|
||||
printlog " range = Range"
|
||||
'///+ compression = Screen optimized
|
||||
printlog " compression = Screen optimized"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -290,7 +300,9 @@ testcase tPDF
|
||||
|
||||
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 3, TRUE, FALSE, 2, 1, "2")
|
||||
|
||||
'/// Export using Button in toolbar
|
||||
printlog "Export using Button in toolbar"
|
||||
'///+ use the settings from the export before
|
||||
printlog " use the settings from the export before"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -301,8 +313,11 @@ testcase tPDF
|
||||
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 4, TRUE, FALSE, 2, 1) ' button in toolbar -> last settings have to be used
|
||||
|
||||
'###### all / Print optimized ######
|
||||
'/// File->Export as PDF document
|
||||
printlog "File->Export as PDF document"
|
||||
'///+ range = all
|
||||
printlog " range = all"
|
||||
'///+ compression = Print optimized
|
||||
printlog " compression = Print optimized"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -312,7 +327,9 @@ testcase tPDF
|
||||
|
||||
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 5, TRUE, FALSE, 1, 2)
|
||||
|
||||
'/// Export using Button in toolbar
|
||||
printlog "Export using Button in toolbar"
|
||||
'///+ use the settings from the export before
|
||||
printlog " use the settings from the export before"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -323,8 +340,11 @@ testcase tPDF
|
||||
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 6, TRUE, FALSE, 1, 2) ' button in toolbar -> last settings have to be used
|
||||
|
||||
'###### range / Print optimized ######
|
||||
'/// File->Export as PDF document
|
||||
printlog "File->Export as PDF document"
|
||||
'///+ range = Range
|
||||
printlog " range = Range"
|
||||
'///+ compression = Screen optimized
|
||||
printlog " compression = Screen optimized"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -334,7 +354,9 @@ testcase tPDF
|
||||
|
||||
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 7, TRUE, FALSE, 2, 2, "2")
|
||||
|
||||
'/// Export using Button in toolbar
|
||||
printlog "Export using Button in toolbar"
|
||||
' '///+ use the settings from the export before
|
||||
printlog " use the settings from the export before"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -345,8 +367,11 @@ testcase tPDF
|
||||
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 8, TRUE, FALSE, 2, 2) ' button in toolbar -> last settings have to be used
|
||||
|
||||
'###### all / Press optimized ######
|
||||
'/// File->Export as PDF document ///'
|
||||
printlog "File->Export as PDF document ///'"
|
||||
'///+ range = all
|
||||
printlog " range = all"
|
||||
'///+ compression = Press optimized
|
||||
printlog " compression = Press optimized"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -355,6 +380,8 @@ testcase tPDF
|
||||
'------------------------------------------------------------ Output the ninth file ----------------------------------------------------------------
|
||||
|
||||
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 9, TRUE, FALSE, 1, 3)
|
||||
'/// Export using Button in toolbar
|
||||
'///+ use the settings from the export before
|
||||
|
||||
kontext "Standardbar"
|
||||
checkexppdfwaitmax10sec
|
||||
@@ -364,8 +391,11 @@ testcase tPDF
|
||||
hExportAsPDFmulti (1, TRUE, OutputGrafikTBO + 10, TRUE, FALSE, 1, 3) ' button in toolbar -> last settings have to be used
|
||||
|
||||
'###### range / Press optimized ######
|
||||
'/// File->Export as PDF document ///'
|
||||
printlog "File->Export as PDF document ///'"
|
||||
'///+ range = all
|
||||
printlog " range = all"
|
||||
'///+ compression = Press optimized
|
||||
printlog " compression = Press optimized"
|
||||
|
||||
kontext "Standardbar"
|
||||
@@ -374,6 +404,8 @@ testcase tPDF
|
||||
'----------------------------------------------------------- Output the eleventh file -------------------------------------------------------------
|
||||
|
||||
hExportAsPDFmulti (3, TRUE, OutputGrafikTBO + 11, TRUE, FALSE, 2, 3, "2")
|
||||
'/// Export using Button in toolbar
|
||||
'///+ use the settings from the export before
|
||||
|
||||
kontext "Standardbar"
|
||||
checkexppdfwaitmax10sec
|
||||
@@ -389,21 +421,23 @@ testcase tPDF
|
||||
|
||||
for i=1 to 12
|
||||
sPath = OutputGrafikTBO
|
||||
sPath = sPath + i & ".pdf"
|
||||
sPath = sPath + i + ".pdf"
|
||||
iFileSize(i) = app.FileLen(sPath)
|
||||
Printlog (" - " & i & ": " & " " & iFileSize(i) & " " & sPath
|
||||
Printlog (" - " + i + ": " + " " + iFileSize(i) + " " + sPath
|
||||
if (dir(sPath) <> "") then
|
||||
sleep(1)
|
||||
'/// the first line has to be '%PDF-1.4' ///'
|
||||
sTemp = fGetFileText(sPath, 8)
|
||||
if (sTemp <> "%PDF-1.4") then
|
||||
Warnlog "File doesn't start with '%PDF-1.4' it is: '" & sTemp & "'"
|
||||
Warnlog "File doesn't start with '%PDF-1.4' it is: '" + sTemp + "'"
|
||||
endif
|
||||
'/// the last line has to be '%%EOF' ///'
|
||||
sTemp = left(fGetFileText(sPath, -6),5)
|
||||
if (sTemp <> "%%EOF") then
|
||||
Warnlog "File doesn't end with '%%EOF' it is: '" & sTemp & "'"
|
||||
Warnlog "File doesn't end with '%%EOF' it is: '" + sTemp + "'"
|
||||
endif
|
||||
else
|
||||
Warnlog "File was not exported to PDF :-( '" & sPath & "'"
|
||||
Warnlog "File was not exported to PDF :-( '" + sPath + "'"
|
||||
endif
|
||||
next i
|
||||
|
||||
@@ -424,10 +458,10 @@ testcase tPDF
|
||||
'Warnlog ("Difference in filesize for file 9 and 10")
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
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.")
|
||||
endif
|
||||
if (iFileSize(5) > iFileSize(9)) then
|
||||
@@ -435,8 +469,8 @@ testcase tPDF
|
||||
endif
|
||||
|
||||
call hCloseDocument()
|
||||
endcase 'tPDF
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tPDF_Creator
|
||||
|
||||
@@ -452,22 +486,24 @@ testcase tPDF_Creator
|
||||
dim sTextFiltername as String
|
||||
dim sExtension() as String
|
||||
|
||||
sTemp = gTesttoolPath & "graphics\required\input\export_graphic3." & ExtensionString
|
||||
sTemp = ConvertPath ( gTesttoolPath + "graphics\required\input\export_graphic3." + ExtensionString )
|
||||
hFileOpen (sTemp)
|
||||
sleep (30)
|
||||
sPath = OutputGrafikTBO
|
||||
sTemp = sPath
|
||||
sPath = sPath & "L.pdf"
|
||||
sPath = sPath + "L.pdf"
|
||||
sleep(1)
|
||||
hExportAsPDFmulti (1, TRUE, sPath, TRUE, FALSE, 1, 1)
|
||||
name sPath as sTemp&"L.txt"
|
||||
name sPath as sTemp+"L.txt"
|
||||
sleep (30)
|
||||
iFileSize(3) = app.FileLen(sTemp&"L.txt")
|
||||
iFileSize(3) = app.FileLen(sTemp+"L.txt")
|
||||
iCreatorOffset = 0
|
||||
sleep 5
|
||||
'/// load file in writer as text ///'
|
||||
|
||||
hFileOpen(sTemp&"L.txt")
|
||||
hFileOpen(sTemp+"L.txt")
|
||||
|
||||
'/// if dialog 'AsciiFilterOptionen' comes up, say OK ///'
|
||||
Kontext "AsciiFilterOptionen"
|
||||
If AsciiFilterOptionen.Exists(3) then
|
||||
AsciiFilterOptionen.OK
|
||||
@@ -495,11 +531,11 @@ testcase tPDF_Creator
|
||||
sTemp = left(sTemp, inStr(sTemp, ">")-1)
|
||||
sTemp2 = ""
|
||||
for i = 0 to (len(sTemp)/4)-1
|
||||
sTemp2 = sTemp2 + chr(" & H" & mid(sTemp,(i*4)+1, 4))
|
||||
sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
|
||||
next i
|
||||
printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'"
|
||||
printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
|
||||
if (lCase(sapp) <> lCase(right(sTemp2, len(stemp2)-1))) then
|
||||
warnlog "Application is different from Creator; is: '" & lCase(sTemp2) & "' should: '" & lCase(sapp) & "'"
|
||||
warnlog "Application is different from Creator; is: '" + lCase(sTemp2) + "' should: '" + lCase(sapp) + "'"
|
||||
endif
|
||||
iCreatorOffset = iCreatorOffset + len(sTemp)
|
||||
' /Producer
|
||||
@@ -515,21 +551,21 @@ testcase tPDF_Creator
|
||||
sTemp = left(sTemp, inStr(sTemp, ">")-1)
|
||||
sTemp2 = ""
|
||||
for i = 0 to (len(sTemp)/4)-1
|
||||
sTemp2 = sTemp2 + chr(" & H" & mid(sTemp,(i*4)+1, 4))
|
||||
sTemp2 = sTemp2 + chr("&H"+mid(sTemp,(i*4)+1, 4))
|
||||
next i
|
||||
printlog sTemp & " -- " & len(sTemp) & " ::: '" & sTemp2 & "'"
|
||||
printlog sTemp + " -- " + len(sTemp) + " ::: '" + sTemp2 + "'"
|
||||
if gOOO then
|
||||
iCreatorOffset = iCreatorOffset + len(sTemp)
|
||||
else
|
||||
if bAsianLan then
|
||||
iCreatorOffset = iCreatorOffset + 48
|
||||
if (len(sTemp) <> 48) then
|
||||
warnlog "Producer is different from 'StarSuite 8'; is: '" & sTemp2 & "'"
|
||||
warnlog "Producer is different from 'StarSuite 8'; is: '" + sTemp2 + "'"
|
||||
endif
|
||||
else
|
||||
iCreatorOffset = iCreatorOffset + 52
|
||||
if (len(sTemp) <> 52) then
|
||||
warnlog "Producer is different from 'StarOffice 8'; is: '" & sTemp2 & "'"
|
||||
warnlog "Producer is different from 'StarOffice 8'; is: '" + sTemp2 + "'"
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -544,16 +580,16 @@ testcase tPDF_Creator
|
||||
editcopy
|
||||
sTemp = getClipboardText()
|
||||
sTemp = left(sTemp, inStr(sTemp, ")")-1)
|
||||
printlog sTemp & " -- " & len(sTemp)
|
||||
printlog sTemp + " -- " + len(sTemp)
|
||||
iCreatorOffset = iCreatorOffset + (len(sTemp) - 23)
|
||||
if (len(sTemp) <> 23) then
|
||||
warnlog "Date is longer than expected; is: '" & sTemp2 & "'"
|
||||
warnlog "Date is longer than expected; is: '" + sTemp2 + "'"
|
||||
endif
|
||||
gApplication = sApp
|
||||
call hCloseDocument
|
||||
call hCloseDocument
|
||||
|
||||
endcase
|
||||
endcase 'tPDF_Creator
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tSVG
|
||||
|
||||
@@ -617,180 +653,220 @@ testcase tSVG
|
||||
'------------------------/
|
||||
|
||||
call hCloseDocument
|
||||
endcase 'tSVG
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tBMP
|
||||
qaerrorlog
|
||||
dim x as integer
|
||||
dim i as integer
|
||||
dim bTemp as boolean
|
||||
dim sX as string
|
||||
dim sY as string
|
||||
dim sx1 as string
|
||||
dim sX2 as string
|
||||
dim sY2 as string
|
||||
dim sDocument as string
|
||||
qaerrorlog
|
||||
dim x as integer
|
||||
dim i as integer
|
||||
dim bTemp as boolean
|
||||
dim sX as string
|
||||
dim sY as string
|
||||
dim sx1 as string
|
||||
dim sX2 as string
|
||||
dim sY2 as string
|
||||
dim sDocument as string
|
||||
|
||||
sDocument = gTesttoolPath & "graphics\required\input\graphicexport." & ExtensionString
|
||||
'/// open the document
|
||||
sDocument = ConvertPath ( gTesttoolPath + "graphics\required\input\graphicexport."+ExtensionString)
|
||||
hFileOpen sDocument
|
||||
|
||||
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
x = Farbaufloesung.GetItemCount
|
||||
if x <> 8 then
|
||||
warnlog "Color Resolution Count is wrong; should be:8, is:" & x
|
||||
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
'/// check if all properties have the right count, and depend on each other ///'
|
||||
'/// 'Color Resolution' listbox contains eight items ///'
|
||||
x = Farbaufloesung.GetItemCount
|
||||
if x <> 8 then warnlog "Color Resolution Count is wrong; should be:8, is:" + x
|
||||
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
|
||||
for i = 1 to x
|
||||
Farbaufloesung.Select i
|
||||
sleep 1
|
||||
Printlog " - " & i & ": '" &Farbaufloesung.GetSelText & "'"
|
||||
if ((i > 3) AND (i < 8)) then
|
||||
if ( RLEKodierung.IsEnabled() ) then
|
||||
warnlog "'RLE coding' is not checkable :-("
|
||||
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
|
||||
next i
|
||||
'/// if Mode 'original' is selected, DPI///'
|
||||
Original.Check
|
||||
if DPI.IsEnabled then warnlog " :-("
|
||||
if Breite.IsEnabled then warnlog " :-("
|
||||
if Hoehe.IsEnabled then warnlog " :-("
|
||||
Aufloesung.Check
|
||||
x = DPI.GetItemCount
|
||||
if x <> 4 then
|
||||
warnlog "'DPI' Count is wrong; should be:4, is:" & x
|
||||
endif
|
||||
'/// 'DPI' listbox contains eight items ///'
|
||||
if x <> 4 then warnlog "'DPI' Count is wrong; should be:4, is:" + x
|
||||
for i = 1 to x
|
||||
DPI.Select i
|
||||
Printlog " - " & i & ": '" &DPI.GetSelText & "'"
|
||||
DPI.Select i
|
||||
Printlog " - " + i + ": '" +DPI.GetSelText + "'"
|
||||
next i
|
||||
if Breite.IsEnabled then
|
||||
warnlog " :-("
|
||||
endif
|
||||
if Hoehe.IsEnabled then
|
||||
warnlog " :-("
|
||||
endif
|
||||
Groesse.Check
|
||||
if DPI.IsEnabled then
|
||||
warnlog " :-("
|
||||
endif
|
||||
if Breite.IsEnabled then warnlog " :-("
|
||||
if Hoehe.IsEnabled then warnlog " :-("
|
||||
Groesse.Check
|
||||
if DPI.IsEnabled then warnlog " :-("
|
||||
Breite.More
|
||||
Hoehe.Less
|
||||
Sleep 1
|
||||
BMPOptionen.Cancel
|
||||
sleep 5
|
||||
if ( dir(OutputGrafikTBO&".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
|
||||
Printlog "ok :-)"
|
||||
else
|
||||
warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
|
||||
endif
|
||||
else
|
||||
Warnlog "No BMP-Option-Dialog!"
|
||||
i=5
|
||||
end if
|
||||
sleep 2
|
||||
Kontext "Active"
|
||||
if Active.Exists(2) then
|
||||
Warnlog "BMP-Exportfilter has a problem"
|
||||
Active.OK
|
||||
end if
|
||||
end if
|
||||
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
Farbaufloesung.Select 7
|
||||
RLEKodierung.Check
|
||||
Aufloesung.Check
|
||||
DPI.Select 3
|
||||
BMPOptionen.OK
|
||||
sleep 5
|
||||
endif
|
||||
if ( dir(OutputGrafikTBO&".bmp") <> "") then
|
||||
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO&".bmp" & "'"
|
||||
else
|
||||
warnlog "File didn't get saved :-("
|
||||
endif
|
||||
hCloseDocument ()
|
||||
sleep 5
|
||||
hNewDocument()
|
||||
sleep 5
|
||||
Call hGrafikEinfuegen ( OutputGrafikTBO&".bmp" )
|
||||
endif
|
||||
hCloseDocument ()
|
||||
qaerrorlog "#i93258#"
|
||||
Sleep 1
|
||||
'/// leave dialog with cancel -> there has to be no file created! ///'
|
||||
BMPOptionen.Cancel
|
||||
sleep 5
|
||||
if ( dir(OutputGrafikTBO+".bmp") = "") then ' inspired by bug #99932 Graphic is exported though cancel is pressed
|
||||
Printlog "ok :-)"
|
||||
else
|
||||
warnlog "Dialog was canceled, but file got saved, too :-( - i35177"
|
||||
endif
|
||||
else
|
||||
Warnlog "No BMP-Option-Dialog!"
|
||||
i=5
|
||||
end if
|
||||
sleep 2
|
||||
Kontext "Active"
|
||||
if Active.Exists(2) then
|
||||
Warnlog "BMP-Exportfilter has a problem"
|
||||
Active.OK
|
||||
end if
|
||||
end if
|
||||
Printlog "'/// now save it realy and load the file afterwards ///'"
|
||||
if hCallExport (OutputGrafikTBO , "BMP - Windows Bitmap (.bmp)" ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
Farbaufloesung.Select 7
|
||||
RLEKodierung.Check
|
||||
Aufloesung.Check
|
||||
DPI.Select 3
|
||||
BMPOptionen.OK
|
||||
sleep 5
|
||||
endif
|
||||
if ( dir(OutputGrafikTBO+".bmp") <> "") then
|
||||
Printlog "Ok :-) Saved as: '" + OutputGrafikTBO+".bmp" + "'"
|
||||
else
|
||||
warnlog "File didn't get saved :-("
|
||||
endif
|
||||
hCloseDocument ()
|
||||
sleep 5
|
||||
hNewDocument()
|
||||
sleep 5
|
||||
Call hGrafikEinfuegen ( OutputGrafikTBO+".bmp" )
|
||||
endif
|
||||
hCloseDocument ()
|
||||
Printlog "'/// now save a SELECTION in ORIGINAL SIZE and load the file afterwards ///'"
|
||||
qaerrorlog "#i93258#"
|
||||
'hFileOpen (sDocument)
|
||||
'kontext "Filterauswahl"
|
||||
'if Filterauswahl.exists(10) then
|
||||
' Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
|
||||
' Filterauswahl.Cancel
|
||||
' goto endsub
|
||||
'endif
|
||||
|
||||
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
|
||||
'' check if the document is writable
|
||||
'if fIsDocumentWritable = false then
|
||||
' ' make the document writable and check if it's succesfull
|
||||
' if fMakeDocumentWritable = false then
|
||||
' warnlog "The document can't be make writeable. Test stopped."
|
||||
' goto endsub
|
||||
' endif
|
||||
'endif
|
||||
|
||||
'hTypeKeys ("<escape><tab>")
|
||||
'fGetSizeXY sx1, sy, TRUE
|
||||
'if hCallExport (OutputGrafikTBO + "1" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
|
||||
' Kontext "BMPOptionen"
|
||||
' if BMPOptionen.Exists (2) then
|
||||
' Original.Check
|
||||
' BMPOptionen.OK
|
||||
' sleep 5
|
||||
' endif
|
||||
' if ( dir(OutputGrafikTBO + "1"+".bmp") <> "") then
|
||||
' Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "1"+".bmp" + "'"
|
||||
' else
|
||||
' warnlog "File didn't get saved :-("
|
||||
' endif
|
||||
|
||||
' qaerrorlog "#i92902: Export to bmp: bmp options not respected"
|
||||
'sleep 5
|
||||
'hNewDocument()
|
||||
'sleep 5
|
||||
'Call hGrafikEinfuegen ( OutputGrafikTBO + "1"+".bmp" )
|
||||
'bTemp = FALSE
|
||||
'fGetSizeXY sx1, sY, bTemp
|
||||
'if (bTemp = FALSE) then
|
||||
' warnlog "Selected original size NOT OK :-("
|
||||
'endif
|
||||
'endif
|
||||
'hCloseDocument ()
|
||||
Printlog "'/// now CREATE a rectangle, select it, save it in SIZE and load the file afterwards ///'"
|
||||
hNewDocument()
|
||||
hTypeKeys "<TAB>"
|
||||
gMouseClick 50, 50
|
||||
hRechteckErstellen ( 10, 10, 30, 40 )
|
||||
if hCallExport (OutputGrafikTBO + "2" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
Groesse.Check
|
||||
Breite.SetText "9"
|
||||
Hoehe.SetText "9"
|
||||
Groesse.Check 'Press "Size" one more time in order to make the change go through"
|
||||
sx1 = Breite.GetText
|
||||
sY = Hoehe.GetText
|
||||
BMPOptionen.OK
|
||||
sleep 5
|
||||
endif
|
||||
if ( dir(OutputGrafikTBO & "2" & ".bmp") <> "") then
|
||||
Printlog "Ok :-) Saved as: '" & OutputGrafikTBO & "2" & ".bmp" & "'"
|
||||
else
|
||||
warnlog "File didn't get saved :-("
|
||||
endif
|
||||
hCloseDocument ()
|
||||
sleep 5
|
||||
hFileOpen (OutputGrafikTBO & "2" & ".bmp")
|
||||
kontext "Filterauswahl"
|
||||
if Filterauswahl.exists then
|
||||
Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
|
||||
Filterauswahl.Cancel
|
||||
goto endsub
|
||||
endif
|
||||
kontext "DocumentDraw"
|
||||
DocumentDraw.TypeKeys ("<escape><tab>")
|
||||
|
||||
qaerrorlog "#i92902: Export to bmp: bmp options not respected"
|
||||
|
||||
endif
|
||||
if hCallExport (OutputGrafikTBO & "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
Groesse.Check
|
||||
BMPOptionen.OK
|
||||
sleep 5
|
||||
endif
|
||||
if ( dir(OutputGrafikTBO + "2"+".bmp") <> "") then
|
||||
Printlog "Ok :-) Saved as: '" + OutputGrafikTBO + "2"+".bmp" + "'"
|
||||
else
|
||||
warnlog "File didn't get saved :-("
|
||||
endif
|
||||
hCloseDocument ()
|
||||
sleep 5
|
||||
hFileOpen (OutputGrafikTBO + "2"+".bmp")
|
||||
kontext "Filterauswahl"
|
||||
if Filterauswahl.exists then
|
||||
Warnlog "Error when loading the file. The Filter-dialogue came up. Test aborted."
|
||||
Filterauswahl.Cancel
|
||||
goto endsub
|
||||
endif
|
||||
kontext "DocumentDraw"
|
||||
DocumentDraw.TypeKeys ("<escape><tab>")
|
||||
|
||||
qaerrorlog "#i92902: Export to bmp: bmp options not respected"
|
||||
'ContextOriginalSize
|
||||
'bTemp = FALSE
|
||||
'fGetSizeXY sx1, sY, bTemp
|
||||
'if (bTemp = FALSE) then
|
||||
' warnlog "Selected original size NOT OK :-("
|
||||
'endif
|
||||
|
||||
endif
|
||||
if hCallExport (OutputGrafikTBO + "3" , "BMP - Windows Bitmap (.bmp)", TRUE ) = TRUE then
|
||||
Kontext "BMPOptionen"
|
||||
if BMPOptionen.Exists (2) then
|
||||
Groesse.Check
|
||||
sX2 = Breite.GetText
|
||||
if (LiberalMeasurement(sx1, sX2)) <> TRUE then
|
||||
if (val(str(StrToDouble(sx1)+5)) >= StrToDouble(sX2) ) AND (val(str(StrToDouble ( sx1 )-5)) <= StrToDouble ( sX2 )) then
|
||||
Printlog "Width was ok. Expected: " & sx1 & "' was: '" & sX2 & "'"
|
||||
else
|
||||
warnLog "Width is different expected: '" & sx1 & "' is: '" & sX2 & "'"
|
||||
endif
|
||||
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 + "'"
|
||||
else
|
||||
warnLog "Width is different expected: '" + sx1 + "' is: '" + sX2 + "'"
|
||||
endif
|
||||
endif
|
||||
sY2 = Hoehe.GetText
|
||||
if (LiberalMeasurement(sY, sY2)) <> TRUE then
|
||||
if ( val(str(StrToDouble(sY)+5)) >= StrToDouble(sY2) ) AND (val(str(StrToDouble ( sY )-5)) <= StrToDouble ( sY2 )) then
|
||||
Printlog "Height was ok. Expected: " & sY & "' was: '" & sY2 & "'"
|
||||
else
|
||||
warnLog "Height is different expected: '" & sY & "' is: '" & sY2 & "'"
|
||||
endif
|
||||
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 + "'"
|
||||
else
|
||||
warnLog "Height is different expected: '" + sY + "' is: '" + sY2 + "'"
|
||||
endif
|
||||
endif
|
||||
BMPOptionen.Cancel
|
||||
sleep 5
|
||||
endif
|
||||
endif
|
||||
BMPOptionen.Cancel
|
||||
sleep 5
|
||||
endif
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
call hCloseDocument
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------------
|
||||
@@ -960,8 +1036,8 @@ testcase tEMF
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
endcase 'tEMF
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tMET
|
||||
|
||||
@@ -1157,8 +1233,8 @@ testcase tMET
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
endcase 'tMET
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tSWF
|
||||
|
||||
@@ -1182,8 +1258,8 @@ testcase tSWF
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
endcase 'tSWF
|
||||
|
||||
endcase
|
||||
'------------------------------------------------------------------------------
|
||||
testcase tWMF
|
||||
|
||||
@@ -1359,6 +1435,6 @@ testcase tWMF
|
||||
endif
|
||||
|
||||
call hCloseDocument
|
||||
endcase 'tWMF
|
||||
|
||||
endcase
|
||||
'-------------------------------------------------------------------------
|
||||
|
@@ -45,329 +45,369 @@ testcase tiFormatArea
|
||||
Dim Zaehler
|
||||
dim Entf$
|
||||
|
||||
FormatArea
|
||||
Kontext
|
||||
active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
Sleep 3
|
||||
hNewDocument '/// New impress document ///'
|
||||
hRechteckErstellen (20,20,60,60) '/// create rectangle ///'
|
||||
Printlog " - Change Format" '/// change format for the rectangle ///'
|
||||
FormatArea
|
||||
Kontext
|
||||
active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
FillOptions.Select 5 '/// apply bitmap as texture ///'
|
||||
BitmapList.Select 3 '/// Select "Water" ///'
|
||||
Tile.Check '/// tile bitmap ///'
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
Anzeigen.Check '/// apply shadow ///'
|
||||
Entfernung.SetText "30" '/// set angle to 30ó<30><C3B3><EFBFBD><EFBFBD><EFBFBD>///'
|
||||
Entf$=Entfernung.GetText '/// change distance ///'
|
||||
Farbe.Select 15 '/// select color 15///'
|
||||
TabSchatten.OK '/// close dialog ///'
|
||||
Sleep 3
|
||||
|
||||
Printlog " - Test various formats"
|
||||
Kontext
|
||||
active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
if NOT FillOptions.GetSelIndex = 5 then
|
||||
Warnlog "Bitmap is not checked"
|
||||
else
|
||||
if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex
|
||||
if NOT Tile.IsChecked then Warnlog "Tile is not checked"
|
||||
' if Original.IsChecked then Warnlog "Original is not checked"
|
||||
' if NOT Relativ.IsChecked then Warnlog "Relative is not checked"
|
||||
' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText
|
||||
' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText
|
||||
' if NOT Zeile.IsChecked then Warnlog "Line is not checked"
|
||||
' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
if NOT Anzeigen.IsChecked then
|
||||
Warnlog "Show shadows is not checked"
|
||||
else
|
||||
if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText
|
||||
if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex
|
||||
end if
|
||||
end if
|
||||
TabSchatten.Cancel
|
||||
|
||||
endcase
|
||||
Printlog " - Test various formats"
|
||||
FormatArea '/// Format area, check if changes are saved for this object ///'
|
||||
Kontext
|
||||
active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
if NOT FillOptions.GetSelIndex = 5 then
|
||||
Warnlog "Bitmap is not checked"
|
||||
else
|
||||
if BitmapList.GetSelIndex <> 3 then Warnlog "Wrong bitmap used. "+ BitmapAuswahl.GetSelIndex
|
||||
if NOT Tile.IsChecked then Warnlog "Tile is not checked"
|
||||
' if Original.IsChecked then Warnlog "Original is not checked"
|
||||
' if NOT Relativ.IsChecked then Warnlog "Relative is not checked"
|
||||
' if Breite.GetText <> "90 %" then Warnlog "Width is not 90%, it is: "+Breite.GetText
|
||||
' if XOffset.GetText <> "30 %" then Warnlog "XOffset is not 30%, it is: "+XOffset.GetText
|
||||
' if NOT Zeile.IsChecked then Warnlog "Line is not checked"
|
||||
' if Verschiebung.GetText <> "20 %" then Warnlog "Displace is not 20%, it is: " + Verschiebung.GetText
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
if NOT Anzeigen.IsChecked then
|
||||
Warnlog "Show shadows is not checked"
|
||||
else
|
||||
if Entfernung.GetText <> Entf$ then Warnlog "Distance is not " + Entf$ + " it is: "+ Entfernung.GetText
|
||||
if Farbe.GetSelIndex <> 15 then Warnlog "Wrong color for shadow. It is: "+ Farbe.GetSelIndex
|
||||
end if
|
||||
end if
|
||||
TabSchatten.Cancel
|
||||
|
||||
hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tiFormatArea
|
||||
'--------------------------------------------------------
|
||||
testcase tdFormatArea1
|
||||
|
||||
Dim i
|
||||
Dim j
|
||||
Dim k
|
||||
Dim m
|
||||
Dim n
|
||||
Dim Winkel_1 as string
|
||||
Dim ZaehlerFarbe
|
||||
Dim ZaehlerVerlauf
|
||||
Dim ZaehlerSchraffur
|
||||
Dim ZaehlerBitmap
|
||||
Dim ColorName$
|
||||
Dim i
|
||||
Dim j
|
||||
Dim k
|
||||
Dim m
|
||||
Dim n
|
||||
Dim Winkel_1 as string
|
||||
Dim ZaehlerFarbe
|
||||
Dim ZaehlerVerlauf
|
||||
Dim ZaehlerSchraffur
|
||||
Dim ZaehlerBitmap
|
||||
Dim ColorName$
|
||||
ColorName$ = "Bullshit"
|
||||
dim Zaehler as integer
|
||||
dim Zaehler as integer
|
||||
|
||||
sleep 3
|
||||
sleep 2
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
sleep 2
|
||||
TabArea.OK
|
||||
sleep 1
|
||||
FormatArea
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
ZaehlerVerlauf = GradientList.GetItemCount
|
||||
for j = 1 To 2
|
||||
GradientList.Select j
|
||||
TabArea.OK
|
||||
FormatArea
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
PrintLog GradientList.GetSelText
|
||||
next j
|
||||
HatchingList.GetItemCount
|
||||
ZaehlerSchraffur = HatchingList.GetItemCount
|
||||
for k=1 to 2'ZaehlerSchraffur
|
||||
HatchingList.Select k
|
||||
TabArea.OK
|
||||
FormatArea
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
PrintLog HatchingList.GetSelText
|
||||
next k
|
||||
Call hNewDocument '/// new document ///'
|
||||
sleep 3
|
||||
Call hRechteckErstellen (30,30,70,70) '/// create rectangle ///'
|
||||
sleep 2
|
||||
FormatArea '/// format area ///'
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
FillOptions.Select 1 '/// Select no fill ///'
|
||||
sleep 2
|
||||
TabArea.OK
|
||||
sleep 1
|
||||
FormatArea
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
sleep 1 '/// control if changes are still there after closing and reopening dialog ///'
|
||||
FillOptions.Select 3'/// check gradient and select 1 ///'
|
||||
ZaehlerVerlauf = GradientList.GetItemCount
|
||||
for j = 1 To 2
|
||||
GradientList.Select j
|
||||
TabArea.OK
|
||||
FormatArea
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
PrintLog GradientList.GetSelText
|
||||
next j
|
||||
FillOptions.Select 4 '/// select hatching, control after closing and reopening dialog if changes are recognized ///'
|
||||
HatchingList.GetItemCount
|
||||
ZaehlerSchraffur = HatchingList.GetItemCount
|
||||
for k=1 to 2'ZaehlerSchraffur
|
||||
HatchingList.Select k
|
||||
TabArea.OK
|
||||
FormatArea
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
PrintLog HatchingList.GetSelText
|
||||
next k
|
||||
|
||||
BitmapList.GetItemCount
|
||||
ZaehlerBitmap = BitmapList.GetItemCount
|
||||
for n=1 to ZaehlerBitmap
|
||||
BitmapList.Select n
|
||||
TabArea.OK
|
||||
FormatArea
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
PrintLog BitmapList.GetSelText
|
||||
next n
|
||||
FillOptions.Select 5 '/// check bitmap, control if changes are permanent after closing and reopening dialog ///'
|
||||
BitmapList.GetItemCount
|
||||
ZaehlerBitmap = BitmapList.GetItemCount
|
||||
for n=1 to ZaehlerBitmap
|
||||
BitmapList.Select n
|
||||
TabArea.OK
|
||||
FormatArea
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabArea
|
||||
Kontext "TabArea"
|
||||
PrintLog BitmapList.GetSelText
|
||||
next n
|
||||
|
||||
' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated"
|
||||
' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated"
|
||||
' if Relativ.IsChecked = False Then
|
||||
' SetClipboard Breite.GetText
|
||||
' Relativ.Check
|
||||
' If Breite.GetText = GetClipboardText Then
|
||||
' WarnLog " Relative isnt working"
|
||||
' else
|
||||
' PrintLog " Relative works"
|
||||
' end if
|
||||
' end if
|
||||
'
|
||||
' if Kacheln.IsChecked = True Then Kacheln.UnCheck
|
||||
' Anpassen.Check
|
||||
' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden"
|
||||
' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert"
|
||||
' Anpassen.Uncheck
|
||||
' Original.Check
|
||||
' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht"
|
||||
' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert"
|
||||
' Kacheln.Check
|
||||
' setClipboard XOffset.GetText
|
||||
' XOffset.More 3
|
||||
' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert"
|
||||
' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht"
|
||||
' SetClipboard YOffset.GetText
|
||||
' YOffset.More 5
|
||||
' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert"
|
||||
' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht"
|
||||
' PrintLog " TabArea fertig"
|
||||
Kontext
|
||||
Active.SetPage TabSchatten
|
||||
Kontext "TabSchatten"
|
||||
sleep 1
|
||||
sleep 1
|
||||
PrintLog " Show shadow works"
|
||||
else
|
||||
WarnLog " Show shadow does not work"
|
||||
end if
|
||||
if Tile.IsChecked = False Then Tile.Check '/// check tile ///'
|
||||
' if Anpassen.IsEnabled = False Then PrintLog " Option Tile activated"
|
||||
' if Anpassen.IsEnabled = True Then WarnLog " Option Tile not activated"
|
||||
' if Relativ.IsChecked = False Then
|
||||
' SetClipboard Breite.GetText
|
||||
' Relativ.Check
|
||||
' If Breite.GetText = GetClipboardText Then
|
||||
' WarnLog " Relative isnt working"
|
||||
' else
|
||||
' PrintLog " Relative works"
|
||||
' end if
|
||||
' end if
|
||||
'
|
||||
' if Kacheln.IsChecked = True Then Kacheln.UnCheck
|
||||
' Anpassen.Check
|
||||
' if Relativ.IsEnabled = True Then WarnLog " Option Anpassen konnte nicht aktiviert werden"
|
||||
' if not Relativ.IsEnabled Then PrintLog " Option Anpassen funktioniert"
|
||||
' Anpassen.Uncheck
|
||||
' Original.Check
|
||||
' if Breite.IsEnabled And Hoehe.IsEnabled = True Then WarnLog " Button Original funktioniert nicht"
|
||||
' if Breite.IsEnabled And Hoehe.IsEnabled = False Then PrintLog " Button Original funktioniert"
|
||||
' Kacheln.Check
|
||||
' setClipboard XOffset.GetText
|
||||
' XOffset.More 3
|
||||
' if XOffset.GetText <> GetClipboardText Then PrintLog " Position XOffset funktioniert"
|
||||
' if XOffset.GetText = GetClipboardText Then WarnLog " Position XOffset funktioniert nicht"
|
||||
' SetClipboard YOffset.GetText
|
||||
' YOffset.More 5
|
||||
' if YOffset.GetText <> GetClipboardText Then PrintLog " Position YOffset funktioniert"
|
||||
' if YOffset.GetText = GetClipboardText Then WarnLog " Position YOffset funktioniert nicht"
|
||||
' PrintLog " TabArea fertig"
|
||||
Kontext
|
||||
Active.SetPage TabSchatten
|
||||
Kontext "TabSchatten"
|
||||
sleep 1
|
||||
if Anzeigen.IsChecked = True Then Anzeigen.UnCheck '/// uncheck shadow ///'
|
||||
sleep 1
|
||||
if Entfernung.IsEnabled = False Then '/// check if shadow related controls are disabled with no shadow ///'
|
||||
PrintLog " Show shadow works"
|
||||
else
|
||||
WarnLog " Show shadow does not work"
|
||||
end if
|
||||
|
||||
Entfernung.More 4
|
||||
if GetClipboardText = Entfernung.GetText Then
|
||||
WarnLog " Distance does not work"
|
||||
else
|
||||
PrintLog " Distance does work"
|
||||
end if
|
||||
Anzeigen.Check '/// check shadow ///'
|
||||
SetClipboard Entfernung.GetText '/// change distance ///'
|
||||
Entfernung.More 4
|
||||
if GetClipboardText = Entfernung.GetText Then
|
||||
WarnLog " Distance does not work"
|
||||
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
|
||||
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
|
||||
sleep 2
|
||||
Kontext
|
||||
Active.SetPage TabTransparenz
|
||||
Kontext "TabTransparenz"
|
||||
KeineTransparenz.Check '/// check if controls are disabled if transparence is disabled ///'
|
||||
Printlog "- No transparency is checked, all controls should be disabled."
|
||||
if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled"
|
||||
if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled"
|
||||
if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled"
|
||||
if MFZentrumY.IsEnabled Then Warnlog "- Center 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"
|
||||
|
||||
Kontext
|
||||
Kontext "TabFarben"
|
||||
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"
|
||||
LineareTransparenz.Check '/// check linear tranparency ///'
|
||||
Printlog "- Set transparency to linear, all controls should be enabled now" '/// control if related controls are now enabled ///'
|
||||
sleep 1
|
||||
MFLinTransparenz.ToMax '/// change values of controls ///'
|
||||
if MFLinTransparenz.GetText <>"100%" Then Warnlog "- Maximum value not correct"
|
||||
MFLinTransparenz.ToMin
|
||||
if MFLinTransparenz.GetText <>"0%" Then Warnlog "- Minimum value not correct"
|
||||
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
|
||||
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
|
||||
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
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabTransparenz '/// check if values are saved after closing and reopening dialog ///'
|
||||
Kontext "TabTransparenz"
|
||||
if not Transparenzverlauftyp.GetSelIndex = i Then Warnlog "- Values are not correct for gradient transparency"
|
||||
next i
|
||||
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
|
||||
Farbe.Select 10
|
||||
Hinzufuegen.Click
|
||||
Farbe.Select "Brighter"
|
||||
Kontext "Active"
|
||||
Active.Yes
|
||||
Kontext
|
||||
Active.SetPage TabFarben
|
||||
Kontext "TabFarben"
|
||||
Kontext "FarbeDlg"
|
||||
FarbeDlg.OK
|
||||
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
|
||||
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
|
||||
sleep 2
|
||||
Kontext
|
||||
Active.SetPage TabTransparenz
|
||||
Kontext "TabTransparenz"
|
||||
Printlog "- No transparency is checked, all controls should be disabled."
|
||||
if MFLinTransparenz.IsEnabled Then Warnlog "- Transparency enabled"
|
||||
if TransparenzverlaufTyp.IsEnabled Then Warnlog "- Graidient enabled"
|
||||
if MFZentrumX.IsEnabled Then Warnlog "- Center X enabled"
|
||||
if MFZentrumY.IsEnabled Then Warnlog "- Center 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"
|
||||
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
|
||||
|
||||
sleep 1
|
||||
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"
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
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
|
||||
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
|
||||
endcase 'tdFormatArea1
|
||||
|
||||
|
@@ -47,217 +47,277 @@
|
||||
'\*************************************************************************************
|
||||
testcase tiDatei_Fuer_Anordnen_Erstellen
|
||||
|
||||
dim sTemp as string
|
||||
dim i as integer
|
||||
dim zaehler as integer
|
||||
if Dir(Datei)<>"" then app.Kill(Datei) ' kill old file
|
||||
Kontext
|
||||
Select Case Zaehler
|
||||
dim sTemp as string
|
||||
dim i as integer
|
||||
dim zaehler as integer
|
||||
'/// This function creates the document, that will be used as reference and working object inthe following cases :-) ///'
|
||||
'///'Dim Datei ' somewhere global :-) defined in calling sub! :sub im_107c_ ///
|
||||
call hNewDocument '/// new document ///'
|
||||
if Dir(Datei)<>"" then app.Kill(Datei) ' kill old file
|
||||
for Zaehler = 1 to 3 '/// create 3 overlapping objects ///'
|
||||
Kontext
|
||||
Select Case Zaehler
|
||||
Case 1: WL_SD_Wuerfel
|
||||
gMouseMove (20,5, 80,60) '/// cubicel 20,5, 80,60 ///
|
||||
Printlog " Object start ---------------------- "+ Zaehler +" cubicel "
|
||||
Case 2: WL_SD_RechteckVoll
|
||||
gMouseMove (40,35, 90,90) '/// rectangel 40,35, 90,90 ///
|
||||
Printlog " Object start ---------------------- "+ Zaehler +" rectangel "
|
||||
Case 3: WL_SD_Torus
|
||||
gMouseMove (1,35, 60,95) '/// donut ;-) 1,35, 60,95 ///
|
||||
Printlog " Object start ---------------------- "+ Zaehler +" donut "
|
||||
End Select
|
||||
sleep (1)
|
||||
sleep (1)
|
||||
kontext
|
||||
Select Case Zaehler
|
||||
End Select
|
||||
sleep (1)
|
||||
FormatArea '/// assign different area properties for created objects (use rnd function)///'
|
||||
sleep (1)
|
||||
kontext
|
||||
Select Case Zaehler
|
||||
Case 1: active.SetPage TabFarbverlaeufe
|
||||
kontext "TabFarbverlaeufe"
|
||||
Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1)
|
||||
printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText
|
||||
TabFarbverlaeufe.OK
|
||||
kontext "TabFarbverlaeufe"
|
||||
Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1)
|
||||
printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText
|
||||
TabFarbverlaeufe.OK
|
||||
Case 2: active.SetPage TabSchraffuren
|
||||
kontext "TabSchraffuren"
|
||||
Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1)
|
||||
printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText
|
||||
TabSchraffuren.OK
|
||||
kontext "TabSchraffuren"
|
||||
Tabelle.Select Int((Tabelle.GetItemCount * Rnd) + 1)
|
||||
printlog "test tbo-------------------------------------------------color of object : "+Tabelle.GetSelText
|
||||
TabSchraffuren.OK
|
||||
Case 3: active.SetPage TabFarben
|
||||
kontext "TabFarben"
|
||||
Farbe.Select Int((Farbe.GetItemCount * Rnd) + 1)
|
||||
printlog "test tbo-------------------------------------------------color of object : "+Farbe.GetSelText
|
||||
TabFarben.OK
|
||||
End Select
|
||||
sleep 1
|
||||
sleep (1)
|
||||
kontext
|
||||
active.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
kontext "TabFarben"
|
||||
Farbe.Select Int((Farbe.GetItemCount * Rnd) + 1)
|
||||
printlog "test tbo-------------------------------------------------color of object : "+Farbe.GetSelText
|
||||
TabFarben.OK
|
||||
End Select
|
||||
sleep 1
|
||||
ContextPositionAndSize '/// save position and size values into varialbes ///'
|
||||
sleep (1)
|
||||
kontext
|
||||
active.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
'/// the variables : Ueber_Text_[1-3] get set here ! with x position of object///
|
||||
Select Case Zaehler
|
||||
Case 1: Ueber_Text_1 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
|
||||
Case 2: Ueber_Text_2 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
|
||||
Case 3: Ueber_Text_3 = 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 3: Ueber_Text_3 = PositionX.GetText : printlog "xpos: "+zaehler+": "+PositionX.GetText
|
||||
End Select
|
||||
TabPositionAndSize.OK
|
||||
gMouseClick 96,5
|
||||
next Zaehler
|
||||
sleep 1
|
||||
printlog "OK saved at ", Datei
|
||||
sleep 1
|
||||
TabPositionAndSize.OK
|
||||
gMouseClick 96,5
|
||||
next Zaehler
|
||||
sleep 1
|
||||
call hFileSaveAsKill (Datei) '/// save document ///'
|
||||
printlog "OK saved at ", Datei
|
||||
sleep 1
|
||||
'/// select in default order and take Position X in mind ;-) ///'
|
||||
'///+ has to be from bottom to top: cubicel, rectangel, donut ///'
|
||||
sPrintCheckOrder (TRUE)
|
||||
endcase
|
||||
|
||||
call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tiDatei_Fuer_Anordnen_Erstellen
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextSendBackward
|
||||
|
||||
dim sTemp as string
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
WL_TB_ANORDNUNG_WeiterNachHinten
|
||||
sleep 2
|
||||
sPrintCheckOrder
|
||||
hTypeKeys ("<escape><escape>")
|
||||
sleep 2
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 2
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_1 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
|
||||
end if
|
||||
Call hCloseDocument
|
||||
endif
|
||||
sleep 2
|
||||
endcase
|
||||
|
||||
dim sTemp as string
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// select the middle object: rectangle, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
'/// Send Backward / [Strg]+[-] -> one level more to the back ///'
|
||||
WL_TB_ANORDNUNG_WeiterNachHinten
|
||||
'///+ has to be from bottom to top: rectangel cubicel donut ///'
|
||||
sleep 2
|
||||
sPrintCheckOrder
|
||||
'/// deselect all ///'
|
||||
hTypeKeys ("<escape><escape>")
|
||||
sleep 2
|
||||
'/// select the middle object: cubical, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 2
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_1 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
|
||||
end if
|
||||
'/// close document ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
sleep 2
|
||||
|
||||
endcase 'tdContextSendBackward
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextBringForward
|
||||
|
||||
dim sTemp as string
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
WL_TB_ANORDNUNG_WeiterNachVorn
|
||||
sleep 1
|
||||
sPrintCheckOrder
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 2
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
sleep 1
|
||||
Call hCloseDocument
|
||||
endif
|
||||
endcase
|
||||
|
||||
dim sTemp as string
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// select the middle object: rectangle, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
'/// Bring Forward / [Strg]+[+] -> one level more to the front ///'
|
||||
WL_TB_ANORDNUNG_WeiterNachVorn
|
||||
'/// has to be from bottom to top: cubicel donut rectangel ///'
|
||||
sleep 1
|
||||
sPrintCheckOrder
|
||||
'/// select the middle object: donut, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 2
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
sleep 1
|
||||
'/// close document ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
|
||||
endcase 'tdContextBringForward
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextSendToBack
|
||||
|
||||
dim sTemp as string
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
hTypeKeys ("<TAB><TAB><TAB>")
|
||||
OL_DRAW_GanzNachHinten
|
||||
sleep 3
|
||||
sPrintCheckOrder
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 1
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_1 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
|
||||
end if
|
||||
sleep 3
|
||||
Call hCloseDocument
|
||||
endif
|
||||
endcase
|
||||
|
||||
dim sTemp as string
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB><TAB>")
|
||||
'/// Send to Back / [Strg]+[Shift]+[-] -> backmost object ///'
|
||||
OL_DRAW_GanzNachHinten
|
||||
'/// has to be from bottom to top: rectangel cubicel donut ///'
|
||||
sleep 3
|
||||
sPrintCheckOrder
|
||||
'/// select the middle object: cubical, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 1
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_1 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_1+";"
|
||||
end if
|
||||
sleep 3
|
||||
'/// close document ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
|
||||
endcase 'tdContextSendToBack
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextBringToFront
|
||||
|
||||
dim sTemp as string
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
hTypeKeys ("<TAB>")
|
||||
OL_DRAW_GanzNachVorn
|
||||
sPrintCheckOrder
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 1
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
sleep 3
|
||||
Call hCloseDocument
|
||||
endif
|
||||
endcase
|
||||
|
||||
dim sTemp as string
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// select the bottom object: cubical, with keys: [TAB] ///'
|
||||
hTypeKeys ("<TAB>")
|
||||
'/// Bring to Front / [Strg]+[Shift]+[+] -> frontmost object ///'
|
||||
OL_DRAW_GanzNachVorn
|
||||
'/// has to be from bottom to top: rectangel, donut, cubicel ///'
|
||||
sPrintCheckOrder
|
||||
'/// select the middle object: donut, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sleep 1
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
warnlog "Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
sleep 3
|
||||
'/// close document ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
|
||||
endcase 'tdContextBringToFront
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextInFrontOfObject
|
||||
|
||||
dim sTemp as string
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
hTypeKeys ("<TAB><TAB><TAB>")
|
||||
OL_DRAW_VorDasObjekt
|
||||
gMouseClick 50,5
|
||||
sPrintCheckOrder
|
||||
sleep 1
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
printlog "DISABLED the WARNLOG, because mouseaction is not always the same :-( : Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
Call hCloseDocument
|
||||
endif
|
||||
endcase
|
||||
|
||||
dim sTemp as string
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB><TAB>")
|
||||
'/// In Front of object ///'
|
||||
OL_DRAW_VorDasObjekt
|
||||
'/// left click the cubicel with the mouse ///'
|
||||
gMouseClick 50,5
|
||||
'/// has to be from bottom to top: cubicel, donut, rectangel ///'
|
||||
sPrintCheckOrder
|
||||
sleep 1
|
||||
'/// select the middle object: donut, with keys: [TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB>")
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
printlog "DISABLED the WARNLOG, because mouseaction is not always the same :-( : Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
'/// close document ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
|
||||
endcase 'tdContextInFrontOfObject
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextBehindObject
|
||||
|
||||
dim sTemp as string
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
hTypeKeys ("<TAB><TAB><TAB>")
|
||||
OL_DRAW_HinterDasObjekt
|
||||
sleep 1
|
||||
gMouseClick 50,5
|
||||
sPrintCheckOrder
|
||||
sleep 1
|
||||
hTypeKeys ("<TAB>")
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
printlog "DISABLED the WARNLOG, because mouseaction is not always tthe same Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
Call hCloseDocument
|
||||
endif
|
||||
endcase
|
||||
|
||||
dim sTemp as string
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// select the top object: donut, with keys: [TAB],[TAB],[TAB] ///'
|
||||
hTypeKeys ("<TAB><TAB><TAB>")
|
||||
'/// Behind object ///'
|
||||
OL_DRAW_HinterDasObjekt
|
||||
sleep 1
|
||||
'/// left click the cubicel with the mouse ///'
|
||||
gMouseClick 50,5
|
||||
'/// has to be from bottom to top: donut, cubicel, rectangel ///'
|
||||
sPrintCheckOrder
|
||||
sleep 1
|
||||
'/// select the bottom object: donut, with keys: [TAB] ///'
|
||||
hTypeKeys ("<TAB>")
|
||||
sTemp = fGetPositionX
|
||||
if sTemp <> Ueber_Text_3 then
|
||||
printlog "DISABLED the WARNLOG, because mouseaction is not always tthe same Arrangement is wrong; is: "+sTemp+"; should: "+Ueber_Text_3+";"
|
||||
end if
|
||||
'/// close document ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
|
||||
endcase 'tdContextBehindObject
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdContextReverse
|
||||
|
||||
dim sTemp as string
|
||||
dim sTemp2 as string
|
||||
dim i as integer
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
EditSelectAll
|
||||
sleep 3
|
||||
WL_TB_ANORDNUNG_Vertauschen
|
||||
sPrintCheckOrder
|
||||
hTypeKeys ("<escape><escape>")
|
||||
for i = 1 to 3
|
||||
hTypeKeys ("<TAB>")
|
||||
sTemp = fGetPositionX
|
||||
dim sTemp as string
|
||||
dim sTemp2 as string
|
||||
dim i as integer
|
||||
'/// open created document 'with 3 figures' ///'
|
||||
if (hFileOpen (Datei)) then
|
||||
sleep 10
|
||||
sPrintCheckOrder (TRUE)
|
||||
'/// Edit->Select All ///'
|
||||
EditSelectAll
|
||||
sleep 3
|
||||
'/// Reverse ///'
|
||||
WL_TB_ANORDNUNG_Vertauschen
|
||||
sPrintCheckOrder
|
||||
'/// select in default order and take Position X in mind ;-) ///'
|
||||
hTypeKeys ("<escape><escape>")
|
||||
for i = 1 to 3
|
||||
hTypeKeys ("<TAB>")
|
||||
sTemp = fGetPositionX
|
||||
Select Case i
|
||||
Case 1: sTemp2 = Ueber_Text_3
|
||||
Case 2: sTemp2 = Ueber_Text_2
|
||||
Case 3: sTemp2 = Ueber_Text_1
|
||||
Case 1: sTemp2 = Ueber_Text_3
|
||||
Case 2: sTemp2 = Ueber_Text_2
|
||||
Case 3: sTemp2 = Ueber_Text_1
|
||||
End Select
|
||||
if sTemp <> sTemp2 then
|
||||
warnlog " - " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";"
|
||||
end if
|
||||
next i
|
||||
endif
|
||||
endcase
|
||||
|
||||
if sTemp <> sTemp2 then
|
||||
warnlog " - " + i + " Arrangement is wrong; is: "+sTemp+"; should: "+sTemp2+";"
|
||||
end if
|
||||
next i
|
||||
'/// close document ///'
|
||||
Call hCloseDocument '/// close document ///'
|
||||
endif
|
||||
|
||||
endcase 'tdContextReverse
|
||||
'-------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -43,40 +43,51 @@
|
||||
' #1 tGetFormatCharacter
|
||||
'*
|
||||
'\*******************************************************************
|
||||
|
||||
testcase tFormatCharacter
|
||||
dim sTemp as string
|
||||
dim iTemp as integer
|
||||
|
||||
Call hNewDocument
|
||||
sleep 1
|
||||
dim sTemp as string
|
||||
dim iTemp as integer
|
||||
|
||||
hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30)
|
||||
hTypeKeys "<MOD1 HOME><shift end>"
|
||||
sleep 1
|
||||
'/// open application ///'
|
||||
Call hNewDocument
|
||||
sleep 1
|
||||
|
||||
FormatCharacter
|
||||
sleep 1
|
||||
Kontext
|
||||
Messagebox.SetPage TabFont
|
||||
Kontext "TabFont"
|
||||
sleep 1
|
||||
'/// create a textframe with content ///'
|
||||
hTextrahmenErstellen ("This is a check, a check, a check.",10,10,60,30)
|
||||
'/// type with keys [strg]+[home] [shift]+[end] to select the inserted text ///'
|
||||
hTypeKeys "<MOD1 HOME><shift end>"
|
||||
sleep 1
|
||||
|
||||
Kontext
|
||||
Messagebox.SetPage TabFontEffects
|
||||
kontext "TabFontEffects"
|
||||
sleep 1
|
||||
'/// Format->Character ///'
|
||||
FormatCharacter
|
||||
sleep 1
|
||||
'/// switch to tabpage 'Font' ///'
|
||||
Kontext
|
||||
Messagebox.SetPage TabFont
|
||||
Kontext "TabFont"
|
||||
sleep 1
|
||||
|
||||
Kontext
|
||||
Messagebox.SetPage TabFontPosition
|
||||
Kontext "TabFontPosition"
|
||||
sleep 1
|
||||
'/// switch to tabpage 'Font Effects' ///'
|
||||
Kontext
|
||||
Messagebox.SetPage TabFontEffects
|
||||
kontext "TabFontEffects"
|
||||
sleep 1
|
||||
|
||||
TabFontPosition.OK
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
'/// switch to tabpage 'Position' ///'
|
||||
Kontext
|
||||
Messagebox.SetPage TabFontPosition
|
||||
Kontext "TabFontPosition"
|
||||
sleep 1
|
||||
|
||||
'/// close dialog 'Character' with 'OK' ///'
|
||||
TabFontPosition.OK
|
||||
'/// close application ///'
|
||||
Call hCloseDocument
|
||||
|
||||
endcase 'tFormatCharacter
|
||||
'---------------------------------------------------------
|
||||
testcase tDialogCharacter
|
||||
|
||||
Dim i as integer
|
||||
Dim y as integer
|
||||
Dim z as integer
|
||||
@@ -96,256 +107,269 @@ testcase tDialogCharacter
|
||||
ToolsOptions
|
||||
hToolsOptions ( "LanguageSettings", "Languages" )
|
||||
|
||||
Asiansupportsetting = TRUE
|
||||
else
|
||||
Asiansupportsetting = FALSE
|
||||
end if
|
||||
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
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"
|
||||
if Aktivieren.IsChecked then '/// Check in what state Asian support is ///'
|
||||
Asiansupportsetting = TRUE
|
||||
else
|
||||
Asiansupportsetting = FALSE
|
||||
Aktivieren.Check '/// Activate if not already activated ///'
|
||||
end if
|
||||
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
Sleep (3)
|
||||
|
||||
' ActiveDeactivateAsianSupport = FALSE
|
||||
end if
|
||||
Kontext
|
||||
|
||||
Printlog "DialogCharacter Ends"
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
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
|
||||
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
|
||||
|
||||
if iSprache = 48 then
|
||||
qaerrorlog "Test not adapted to polish, 48."
|
||||
goto endsub
|
||||
@@ -360,93 +384,117 @@ testcase tSetFormatCharacter
|
||||
dim sFile as string
|
||||
dim sTemp as string
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
sFile = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString)
|
||||
'/// create document, if it doesn't exist, else skip this case :-) ///'
|
||||
if (dir(sFile)="") then
|
||||
'/// open application ///'
|
||||
Call hNewDocument
|
||||
|
||||
'/// activate all languages in options ///'
|
||||
'///+ Tools->Options ///'
|
||||
ToolsOptions
|
||||
'///+ select tabpage 'Languages' from set 'Language Settings' ///'
|
||||
hToolsOptions("LANGUAGESETTINGS","Languages")
|
||||
kontext "TabSprachen"
|
||||
'///+ save state and check checkbox 'Asian languages support' ///'
|
||||
'/// if the language is Asian, skip this part ///'
|
||||
printlog "iSprache = " + iSprache
|
||||
if bAsianLan = FALSE then
|
||||
bAsian = Aktivieren.isEnabled
|
||||
Aktivieren.check
|
||||
bAsian = Aktivieren.isEnabled
|
||||
Aktivieren.check
|
||||
endif
|
||||
'///+ save state and check checkbox 'Complex text layout (CTL) support' ///'
|
||||
bComplex = ComplexScriptEnabled.isEnabled
|
||||
ComplexScriptEnabled.check
|
||||
'///+ close dialog 'Options' with OK ///'
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
|
||||
'/// get count of languages ///'
|
||||
'///+ Format->Character ///'
|
||||
FormatCharacter
|
||||
sleep 1
|
||||
Kontext
|
||||
'///+ switch to tabpage 'Font' ///'
|
||||
Messagebox.SetPage TabFont
|
||||
kontext "TabFont"
|
||||
sleep 1
|
||||
'///+ get count of languages for Western/Asian/CTL fonts ///'
|
||||
iWest = LanguageWest.getItemCount
|
||||
iAsian = LanguageEast.getItemCount
|
||||
iComplex = LanguageCTL.getItemCount
|
||||
if bAsianLan = True then
|
||||
if (iWest <> 144) then
|
||||
Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'"
|
||||
else
|
||||
Printlog "Western text font languages count: " + iWest
|
||||
endif
|
||||
if (iAsian <> 8) then
|
||||
Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'"
|
||||
else
|
||||
Printlog "Asian text font languages count : " + iAsian
|
||||
endif
|
||||
if (iComplex <> 50) then
|
||||
Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'"
|
||||
else
|
||||
Printlog "CTL font languages count : " + iComplex
|
||||
endif
|
||||
if (iWest <> 144) then
|
||||
Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'"
|
||||
else
|
||||
Printlog "Western text font languages count: " + iWest
|
||||
endif
|
||||
if (iAsian <> 8) then
|
||||
Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'"
|
||||
else
|
||||
Printlog "Asian text font languages count : " + iAsian
|
||||
endif
|
||||
if (iComplex <> 50) then
|
||||
Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'"
|
||||
else
|
||||
Printlog "CTL font languages count : " + iComplex
|
||||
endif
|
||||
else
|
||||
if (iWest <> 113) then
|
||||
Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'"
|
||||
else
|
||||
Printlog "Western text font languages count: " + iWest
|
||||
endif
|
||||
if (iAsian <> 9) then
|
||||
Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'"
|
||||
else
|
||||
Printlog "Asian text font languages count : " + iAsian
|
||||
endif
|
||||
if (iComplex <> 30) then
|
||||
Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'"
|
||||
else
|
||||
Printlog "CTL font languages count : " + iComplex
|
||||
endif
|
||||
if (iWest <> 113) then
|
||||
Warnlog "Western text font languages count wrong; expected: '113' is: '" + iWest + "'"
|
||||
else
|
||||
Printlog "Western text font languages count: " + iWest
|
||||
endif
|
||||
if (iAsian <> 9) then
|
||||
Warnlog "Asian text font languages count wrong; expected: '9' is: '" + iAsian + "'"
|
||||
else
|
||||
Printlog "Asian text font languages count : " + iAsian
|
||||
endif
|
||||
if (iComplex <> 30) then
|
||||
Warnlog "CTL font languages count wrong; expected: '30' is: '" + iComplex + "'"
|
||||
else
|
||||
Printlog "CTL font languages count : " + iComplex
|
||||
endif
|
||||
endif
|
||||
'///+ close dialog 'Character' with OK ///'
|
||||
TabFont.Ok
|
||||
|
||||
WL_SD_TextEinfuegenDraw
|
||||
gMouseMove ( 1, 1, 100, 100 )
|
||||
|
||||
'///+ print the language counts into the first line of the document ///'
|
||||
hTypeKeys(" "+iWest+" "+iAsian+" "+iComplex+"<return>")
|
||||
|
||||
|
||||
'/// set all languages to '[None]' ///'
|
||||
'///+ Format->Character ///'
|
||||
FormatCharacter
|
||||
kontext "TabFont"
|
||||
'///+ select '[None]' (should be the first entry in every listbox) ///'
|
||||
LanguageWest.select 1
|
||||
LanguageEast.select 1
|
||||
LanguageCTL.select 1
|
||||
'///+ close dialog 'Character' with OK ///'
|
||||
TabFont.Ok
|
||||
|
||||
'/// print one line with language formated text for every language ///'
|
||||
for i = 1 to iWest
|
||||
'///+ Format->Character ///'
|
||||
FormatCharacter
|
||||
kontext "TabFont"
|
||||
LanguageWest.select i
|
||||
sTemp = LanguageWest.getItemText (i)
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
kontext "TabFont"
|
||||
'///+ select the next language ///'
|
||||
LanguageWest.select i
|
||||
sTemp = LanguageWest.getItemText (i)
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
'///+ close dialog 'Character' with OK ///'
|
||||
TabFont.Ok
|
||||
'///+ type [return][number of language in list][Tab][Language name][Tab] ///'
|
||||
hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
|
||||
next i
|
||||
|
||||
@@ -459,11 +507,11 @@ testcase tSetFormatCharacter
|
||||
|
||||
for i = 1 to iAsian
|
||||
FormatCharacter
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
LanguageEast.select i
|
||||
sTemp = LanguageEast.getItemText (i)
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
LanguageEast.select i
|
||||
sTemp = LanguageEast.getItemText (i)
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
TabFont.Ok
|
||||
hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
|
||||
next i
|
||||
@@ -477,15 +525,16 @@ testcase tSetFormatCharacter
|
||||
|
||||
for i = 1 to iComplex
|
||||
FormatCharacter
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
LanguageCTL.select i
|
||||
sTemp = LanguageCTL.getItemText (i)
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
LanguageCTL.select i
|
||||
sTemp = LanguageCTL.getItemText (i)
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
TabFont.Ok
|
||||
hTypeKeys(""+i+"<tab>"+sTemp+"<tab><return>")
|
||||
next i
|
||||
|
||||
'/// save the created document & the languages list if they don't exists ///'
|
||||
hFileSaveAs (sFile)
|
||||
qaErrorLog "Created file. Please check it and then commit it! " + sTemp
|
||||
sTemp = convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + ".txt")
|
||||
@@ -493,26 +542,36 @@ testcase tSetFormatCharacter
|
||||
ListWrite(sLanguage(), sTemp,"utf8")
|
||||
endif
|
||||
|
||||
'/// restore the options ///'
|
||||
'///+ Tools->Options ///'
|
||||
ToolsOptions
|
||||
'///+ select tabpage 'Languages' from set 'Language Settings' ///'
|
||||
hToolsOptions("LANGUAGESETTINGS","Languages")
|
||||
kontext "TabSprachen"
|
||||
|
||||
'///+ restore state of checkbox 'Asian languages support' ///'
|
||||
'/// if the language is Asian, skip this part ///'
|
||||
if bAsianLan = FALSE then
|
||||
if (bAsian <> TRUE) then
|
||||
Aktivieren.UNcheck
|
||||
endif
|
||||
if (bAsian <> TRUE) then
|
||||
Aktivieren.UNcheck
|
||||
endif
|
||||
endif
|
||||
'///+ restore state of checkbox 'Complex text layout (CTL) support' ///'
|
||||
if (bComplex <> TRUE) then
|
||||
ComplexScriptEnabled.UNcheck
|
||||
endif
|
||||
'///+ close dialog 'Options' with OK ///'
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
|
||||
'/// close application ///'
|
||||
Call hCloseDocument
|
||||
endif
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tSetFormatCharacter
|
||||
'--------------------------------------------------------
|
||||
testcase tGetFormatCharacter
|
||||
|
||||
qaerrorlog "tGetFormatCharacter outcommented due to too many qaerrorlogs"
|
||||
goto endsub
|
||||
Dim i as integer
|
||||
@@ -527,26 +586,35 @@ testcase tGetFormatCharacter
|
||||
dim iTemp as integer
|
||||
dim sSpellBooks(30) as string
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
|
||||
'/// open the english document with all languages ///'
|
||||
hDateiOeffnen (convertPath(gTesttoolpath + "graphics\required\input\spellb_" + iSprache + "."+ExtensionString)
|
||||
ListRead(sLanguageR(), convertPath(gTesttoolpath + "graphics\required\input\spellb_1.txt"),"utf8")
|
||||
|
||||
'/// activate all languages in options ///'
|
||||
'///+ Tools->Options ///'
|
||||
ToolsOptions
|
||||
'///+ select tabpage 'Languages' from set 'Language Settings' ///'
|
||||
hToolsOptions("LANGUAGESETTINGS","Languages")
|
||||
kontext "TabSprachen"
|
||||
'///+ save state and check checkbox 'Asian languages support' ///'
|
||||
bAsian = Aktivieren.isEnabled
|
||||
Aktivieren.check
|
||||
'///+ save state and check checkbox 'Complex text layout (CTL) support' ///'
|
||||
bComplex = ComplexScriptEnabled.isEnabled
|
||||
ComplexScriptEnabled.check
|
||||
'///+ close dialog 'Options' with OK ///'
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
sleep (1)
|
||||
'/// get count of languages ///'
|
||||
hTypeKeys("<tab><f2>")
|
||||
'///+ first how many are in the reference document (printed in the first line)///'
|
||||
hTypeKeys("<mod1 home><shift end>")
|
||||
sleep (1)
|
||||
editcopy
|
||||
@@ -557,12 +625,15 @@ testcase tGetFormatCharacter
|
||||
iAsian(1) = mid(sTemp, iTemp+1, iTemp-i)
|
||||
iComplex(1) = right(sTemp, Len(sTemp) - i)
|
||||
sleep (1)
|
||||
'///+ Format->Character ///'
|
||||
FormatCharacter
|
||||
sleep 1
|
||||
Kontext
|
||||
'///+ switch to tabpage 'Font' ///'
|
||||
Messagebox.SetPage TabFont
|
||||
kontext "TabFont"
|
||||
sleep 1
|
||||
'///+ get count of languages for Western/Asian/CTL fonts ///'
|
||||
iWest(2) = LanguageWest.getItemCount
|
||||
iAsian(2) = LanguageEast.getItemCount
|
||||
iComplex(2) = LanguageCTL.getItemCount
|
||||
@@ -581,42 +652,46 @@ testcase tGetFormatCharacter
|
||||
else
|
||||
Printlog "CTL font languages count : " + iComplex(2)
|
||||
endif
|
||||
'///+ close dialog 'Character' with OK ///'
|
||||
TabFont.Ok
|
||||
|
||||
'/// write the language for every line in the current language ///'
|
||||
hTypeKeys("<mod1 home><down><home>")
|
||||
for i = 1 to iWest(2)
|
||||
FormatCharacter
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
iTemp = LanguageWest.getSelIndex
|
||||
sTemp = LanguageWest.getSelText
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
iTemp = LanguageWest.getSelIndex
|
||||
sTemp = LanguageWest.getSelText
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
TabFont.Ok
|
||||
'///+ type [end][number of language in list][Tab][Language name][down][home] ///'
|
||||
hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
|
||||
next i
|
||||
|
||||
for i = 1 to iAsian(2)
|
||||
FormatCharacter
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
iTemp = LanguageEast.getSelIndex
|
||||
sTemp = LanguageEast.getSelText
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
iTemp = LanguageEast.getSelIndex
|
||||
sTemp = LanguageEast.getSelText
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
TabFont.Ok
|
||||
hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
|
||||
next i
|
||||
|
||||
for i = 1 to iComplex(2)
|
||||
FormatCharacter
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
iTemp = LanguageCTL.getSelIndex
|
||||
sTemp = LanguageCTL.getSelText
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
Kontext
|
||||
kontext "TabFont"
|
||||
iTemp = LanguageCTL.getSelIndex
|
||||
sTemp = LanguageCTL.getSelText
|
||||
ListAppend(sLanguage(), sTemp)
|
||||
TabFont.Ok
|
||||
hTypeKeys("<end>"+iTemp+"<tab>"+sTemp+"<down><home>")
|
||||
next i
|
||||
|
||||
'/// save the created document & the languages list ///'
|
||||
sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache)
|
||||
hFileSaveAsKill (sTemp)
|
||||
sTemp = convertPath(gOfficePath + "user\work\spellb_" + iSprache + ".txt")
|
||||
@@ -627,9 +702,9 @@ testcase tGetFormatCharacter
|
||||
|
||||
for i = 1 to ListCount(sLanguageR())
|
||||
select case i
|
||||
case 1:printlog " * Western text font languages"
|
||||
case iWest(2)+1:printlog " * Asian text font languages"
|
||||
case iWest(2)+iAsian(2)+1:printlog " * CTL font languages"
|
||||
case 1:printlog " * Western text font languages"
|
||||
case iWest(2)+1:printlog " * Asian text font languages"
|
||||
case iWest(2)+iAsian(2)+1:printlog " * CTL font languages"
|
||||
end select
|
||||
if (sLanguageR(i) <> sLanguage(i)) then
|
||||
if (instr(sLanguage(i), "[") > 0) then ' [None] - Entry ?
|
||||
@@ -640,7 +715,6 @@ testcase tGetFormatCharacter
|
||||
endif
|
||||
next i
|
||||
|
||||
'/// close application ///'
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tGetFormatCharacter
|
||||
|
@@ -50,15 +50,15 @@ testcase tiEditUndo
|
||||
|
||||
Dim sDatei as string
|
||||
Dim Ueber_Text_1 as string
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
|
||||
sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
|
||||
|
||||
|
||||
hFileOpen ConvertPath (sDatei)
|
||||
sleep 5
|
||||
printlog "Checking for readonly state. If so, make it editable."
|
||||
@@ -69,16 +69,18 @@ testcase tiEditUndo
|
||||
ContextPositionAndSize
|
||||
Kontext
|
||||
if Messagebox.exists (5) then
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
else
|
||||
print "what"
|
||||
print "what"
|
||||
endif
|
||||
Kontext "TabPositionAndSize"
|
||||
Ueber_Text_1=PositionX.GetText '/// defining variable for original position of object ///'
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 2
|
||||
Kontext "Toolbar"
|
||||
Auswahl.Click
|
||||
sleep 1
|
||||
ContextArrangeBringBackward '/// Bring Object backward ///'
|
||||
sleep 1
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
@@ -89,51 +91,56 @@ testcase tiEditUndo
|
||||
Kontext "Toolbar"
|
||||
Auswahl.Click
|
||||
sleep 1
|
||||
ContextPositionAndSize '/// Open Position and Size dialog, checking position ///'
|
||||
Kontext
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
if PositionX=0 Then Warnlog " Command was not completely executed, and it could not be undone."
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 2
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
|
||||
Sleep 2
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
Kontext "Toolbar"
|
||||
Auswahl.Click
|
||||
hTypeKeys "<TAB><TAB>"
|
||||
sleep 1
|
||||
Kontext "Toolbar"
|
||||
Auswahl.Click
|
||||
kontext
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
if PositionX.GetText = Ueber_Text_1 then
|
||||
printlog "OK, last order could be redone"
|
||||
else
|
||||
warnlog "Last order could not be redone"
|
||||
end if
|
||||
TabPositionAndSize.Cancel
|
||||
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 2
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
|
||||
EditUndo '/// Edit Undo for BringBackward ///'
|
||||
Sleep 2
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
Kontext "Toolbar"
|
||||
Auswahl.Click
|
||||
hTypeKeys "<TAB><TAB>"
|
||||
sleep 1
|
||||
Kontext "Toolbar"
|
||||
Auswahl.Click
|
||||
ContextPositionAndSize '/// Again checking position using Position and Size dialog ///'
|
||||
kontext
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
if PositionX.GetText = Ueber_Text_1 then
|
||||
printlog "OK, last order could be redone"
|
||||
else
|
||||
warnlog "Last order could not be redone"
|
||||
end if
|
||||
TabPositionAndSize.Cancel
|
||||
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiEditRedo
|
||||
|
||||
|
||||
Dim Datei$
|
||||
Dim Ueber_Text_1
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
|
||||
Datei$ = gTesttoolPath + "graphics\required\input\leer."+ExtensionString
|
||||
|
||||
|
||||
hFileOpen ConvertPath (Datei$) '/// Open test document (leer.od?) ///'
|
||||
sleep 3
|
||||
' check if the document is writable
|
||||
if fIsDocumentWritable = false then
|
||||
@@ -158,6 +165,7 @@ testcase tiEditRedo
|
||||
sleep 1
|
||||
hTypeKeys "<TAB>"
|
||||
sleep 1
|
||||
ContextArrangeBringBackward '/// move object behind other object ///'
|
||||
sleep 1
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
@@ -166,38 +174,44 @@ testcase tiEditRedo
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
Kontext
|
||||
Messagebox.SetPage TabPositionAndSize '/// checking new position values ///'
|
||||
Kontext "TabPositionAndSize"
|
||||
if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone"
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 1
|
||||
gMouseClick 60,60
|
||||
sleep 1
|
||||
hTypeKeys "<TAB>"
|
||||
sleep 1
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
kontext
|
||||
kontext "TabPositionAndSize"
|
||||
if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either"
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 2
|
||||
sleep 2
|
||||
gMouseClick 60,60
|
||||
sleep 2
|
||||
hTypeKeys "<TAB>"
|
||||
sleep 2
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
kontext
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
printlog "Action Undo repeated"
|
||||
else
|
||||
warnlog "Action Undo not repeated"
|
||||
end if
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
sleep 1
|
||||
if PositionX.GetText = Ueber_Text_1 Then Warnlog " Nothing changed, so nothing can be undone"
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 1
|
||||
gMouseClick 60,60
|
||||
EditUndo '/// Edit Undo///'
|
||||
sleep 1
|
||||
hTypeKeys "<TAB>"
|
||||
sleep 1
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
kontext
|
||||
Messagebox.SetPage TabPositionAndSize '/// checking again position ///'
|
||||
kontext "TabPositionAndSize"
|
||||
if PositionX.GetText <> Ueber_Text_1 Then Warnlog " Undo didn't worked, so repeat last action wont work either"
|
||||
TabPositionAndSize.Cancel
|
||||
sleep 2
|
||||
EditRedo '/// Edit Redo ///'
|
||||
sleep 2
|
||||
gMouseClick 60,60
|
||||
sleep 2
|
||||
hTypeKeys "<TAB>"
|
||||
sleep 2
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
kontext
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
if PositionX.GetText <> Ueber_Text_1 then '/// checking position ///'
|
||||
printlog "Action Undo repeated"
|
||||
else
|
||||
warnlog "Action Undo not repeated"
|
||||
end if
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
call hCloseDocument '/// close document ///'
|
||||
sleep 1
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
@@ -205,64 +219,81 @@ testcase tiEditClipboard
|
||||
|
||||
Dim Ueber_Text_4 as string
|
||||
dim sTemp as string
|
||||
|
||||
|
||||
'/// open application ///'
|
||||
Call hNewDocument
|
||||
sleep 1
|
||||
SetClipboard ""
|
||||
'/// Create rectangle ///'
|
||||
Call hRechteckErstellen ( 65, 65, 80, 80 )
|
||||
sleep 1
|
||||
'///+ RightClick onto rectangle///'
|
||||
gMouseClick 70,70
|
||||
sleep 1
|
||||
Ueber_Text_4 = fGetPositionX() '/// Get values for position variables ///'
|
||||
Sleep 1
|
||||
'/// <b> Edit->Copy </b> ///'
|
||||
EditCopy
|
||||
'///+ Type Key [Deletee] ///'
|
||||
hTypeKeys "<DELETE>"
|
||||
'///+ <i> Edit->Paste </i> ///'
|
||||
EditPaste
|
||||
sleep 1
|
||||
'///+ Edit->Select All ///'
|
||||
EditSelectAll
|
||||
sTemp = fGetPositionX()
|
||||
printlog "OK EditCopy and EditPaste"
|
||||
else
|
||||
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
|
||||
end if
|
||||
sleep 1
|
||||
hTypeKeys "<escape>"
|
||||
EditSelectAll
|
||||
sleep 2
|
||||
EditCut
|
||||
sleep 1
|
||||
hTypeKeys "<TAB>"
|
||||
try
|
||||
ContextPositionAndSize
|
||||
kontext
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
if TabPositionAndSize.NOTexists then
|
||||
warnlog "TabPositionAndSize isn't up ?!!"
|
||||
endif
|
||||
TabPositionAndSize.Ok
|
||||
warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!"
|
||||
catch
|
||||
Printlog " - There is no object in the document anymore :-)"
|
||||
endcatch
|
||||
sleep 1
|
||||
EditPaste
|
||||
sleep 2
|
||||
sTemp = fGetPositionX()
|
||||
if LiberalMeasurement(sTemp, Ueber_Text_4) then
|
||||
printlog "OK Edit paste"
|
||||
else
|
||||
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
|
||||
end if
|
||||
sleep 3
|
||||
Call hCloseDocument
|
||||
if LiberalMeasurement(sTemp, Ueber_Text_4) then '/// TabPositionAndSize: comparing position with original position ///'
|
||||
printlog "OK EditCopy and EditPaste"
|
||||
else
|
||||
warnlog "- Edit paste did not work; is: '" + sTemp + "' ; should: '" + Ueber_Text_4 + "'"
|
||||
end if
|
||||
sleep 1
|
||||
'/// Type Keys [escape], + EditSelectAll (to deselect object and to select again) ///'
|
||||
hTypeKeys "<escape>"
|
||||
EditSelectAll
|
||||
sleep 2
|
||||
'/// <b> Edit->Cut </b>///'
|
||||
EditCut
|
||||
sleep 1
|
||||
hTypeKeys "<TAB>"
|
||||
try
|
||||
'///+ - Format->Position And Size -> HAS TO FAIL / IS NOT AVAILABLE !!! '///'
|
||||
ContextPositionAndSize
|
||||
kontext
|
||||
'///+ - select TabPage 'Position And Size' ///'
|
||||
Messagebox.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
if TabPositionAndSize.NOTexists then
|
||||
warnlog "TabPositionAndSize isn't up ?!!"
|
||||
endif
|
||||
'///+ - Ok dialog 'Position And Size' ///'
|
||||
TabPositionAndSize.Ok
|
||||
warnlog "TabPositionAndSize IS up :-( Doesn't have to be, because object should be deleted !!!"
|
||||
catch
|
||||
Printlog " - There is no object in the document anymore :-)"
|
||||
endcatch
|
||||
sleep 1
|
||||
'///+ <i> Edit->Paste </i> ///'
|
||||
EditPaste
|
||||
sleep 2
|
||||
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
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiEditPasteSpecial_HTML
|
||||
|
||||
|
||||
dim Zaehler as integer
|
||||
Kontext "Standardbar"
|
||||
sleep 1
|
||||
Call hFileOpen ConvertPath (gTesttoolPath + "graphics\required\input\frame1.htm") '/// Load html document ///'
|
||||
sleep 5
|
||||
autoexecute=false
|
||||
Kontext "DocumentWriter"
|
||||
@@ -271,137 +302,173 @@ testcase tiEditPasteSpecial_HTML
|
||||
autoexecute=true
|
||||
EditSelectAll
|
||||
sleep 3
|
||||
EditCopy '/// Copy selection ///'
|
||||
Sleep 2
|
||||
FileClose '/// Close document ///'
|
||||
sleep 3
|
||||
Call hNewDocument '/// Create new Impress document ///'
|
||||
sleep 1
|
||||
EditPasteSpecial '/// Edit paste special ///'
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
For Zaehler = 1 to Auswahl.GetItemCount
|
||||
Auswahl.select Zaehler
|
||||
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
|
||||
Auswahl.select Zaehler
|
||||
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
|
||||
next Zaehler
|
||||
|
||||
warnlog "formats for inserting Html <> 4"
|
||||
else
|
||||
printlog "OK 4 formats for HTML-Document"
|
||||
end if
|
||||
|
||||
sleep 3
|
||||
sleep 3
|
||||
try
|
||||
catch
|
||||
Warnlog "- Nothing inserted into document"
|
||||
endcatch
|
||||
sleep 3
|
||||
sleep 3
|
||||
|
||||
if Auswahl.GetItemCount <> 4 then '/// Controlling number of possible formats ///'
|
||||
warnlog "formats for inserting Html <> 4"
|
||||
else
|
||||
printlog "OK 4 formats for HTML-Document"
|
||||
end if
|
||||
|
||||
sleep 3
|
||||
InhaltEinfuegen.OK '/// Paste clipboard content ///'
|
||||
sleep 3
|
||||
try
|
||||
EditCopy '/// Copy object back into clipboard ///'
|
||||
catch
|
||||
Warnlog "- Nothing inserted into document"
|
||||
endcatch
|
||||
sleep 3
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
sleep 3
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdEditPasteSpecial_Text
|
||||
|
||||
|
||||
printlog "Insert Text"
|
||||
call hNewDocument '/// new document ///'
|
||||
SetClipboard "I am a cool test-text in the Clipboard" '/// put text into clipboard ///'
|
||||
EditPasteSpecial '/// edit paste special ///'
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
Auswahl.Select 1 '/// select list entree 1 ///'
|
||||
printlog "Selection = ", Auswahl.GetSelText
|
||||
sleep 1
|
||||
if Auswahl.GetItemCount <> 1 then
|
||||
warnlog "Selectionformat <> 1"
|
||||
warnlog "Selectionformat <> 1"
|
||||
else
|
||||
printlog "Format Text OK"
|
||||
printlog "Format Text OK"
|
||||
end if
|
||||
InhaltEinfuegen.OK '/// close dialog ///'
|
||||
sleep 1
|
||||
|
||||
|
||||
Call hCloseDocument '/// close document ///'
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdEditPasteSpecial_Graphic
|
||||
|
||||
|
||||
dim Zaehler as integer
|
||||
|
||||
|
||||
call hNewDocument '/// ^new document ///'
|
||||
printlog "Insert graphic file"
|
||||
|
||||
InsertGraphicsFromFile '/// insert graphic (sample.bmp)///'
|
||||
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
|
||||
Oeffnen.Click
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
|
||||
Oeffnen.Click
|
||||
sleep 1
|
||||
EditSelectAll '/// select graphic ///'
|
||||
EditCut '/// cut graphic ///'
|
||||
EditPasteSpecial '/// edit paste special ///'
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
|
||||
Auswahl.select Zaehler
|
||||
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
|
||||
next Zaehler
|
||||
|
||||
warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount
|
||||
else
|
||||
printlog "There are " + Auswahl.GetItemCount + " formats for graphic files"
|
||||
end if
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
next Zaehler
|
||||
|
||||
if Auswahl.GetItemCount <> 4 then '/// check if item count = 4 ///'
|
||||
warnlog "Format for insert graphic files should be 4, but is: " + Auswahl.GetItemCount
|
||||
else
|
||||
printlog "There are " + Auswahl.GetItemCount + " formats for graphic files"
|
||||
end if
|
||||
InhaltEinfuegen.OK '/// insert graphic from clipboard ///'
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Call hCloseDocument '/// close document ///'
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tdEditPasteSpecial_Circle
|
||||
|
||||
dim Zaehler as integer
|
||||
sleep 5
|
||||
Kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
sleep 3
|
||||
gMouseMove (20,20,80,80)
|
||||
sleep 1
|
||||
hTypeKeys "<escape>"
|
||||
sleep 2
|
||||
sleep 5
|
||||
sleep 1
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
Auswahl.select Zaehler
|
||||
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
|
||||
next Zaehler
|
||||
warnlog "Number of possible formats <> 4"
|
||||
else
|
||||
printlog "There are 4 formats for circle"
|
||||
end if
|
||||
sleep 1
|
||||
sleep 1
|
||||
dim Zaehler as integer
|
||||
call hNewDocument '/// new document ///'
|
||||
sleep 5
|
||||
printlog "Insert circle" '/// create circle ///'
|
||||
Kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
sleep 3
|
||||
gMouseMove (20,20,80,80)
|
||||
sleep 1
|
||||
hTypeKeys "<escape>"
|
||||
sleep 2
|
||||
EditSelectAll '/// select circle ///'
|
||||
sleep 5
|
||||
EditCut '/// cut circle ///'
|
||||
sleep 1
|
||||
EditPasteSpecial '/// edit paste special ///'
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
if EinfuegenAls.IsVisible Then EinfuegenAls.Check '/// check "EinfuegenAls" ///'
|
||||
For Zaehler = 1 to Auswahl.GetItemCount '/// get item count for Auswahl ///'
|
||||
Auswahl.select Zaehler
|
||||
printlog Zaehler, ". Selection = ", Auswahl.GetSelText
|
||||
next Zaehler
|
||||
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
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiEditPasteSpecial
|
||||
|
||||
dim i as integer
|
||||
dim x as integer
|
||||
' warnlog "TODOTBO: from draw, impress, math..."
|
||||
gApplication = "WRITER"
|
||||
call hNewDocument
|
||||
kontext "DocumentWriter"
|
||||
DocumentWriter.TypeKeys "abc<shift home>"
|
||||
editcut
|
||||
call hCloseDocument
|
||||
gApplication = "IMPRESS"
|
||||
call hNewDocument
|
||||
sleep 1
|
||||
dim i as integer
|
||||
dim x as integer
|
||||
' warnlog "TODOTBO: from draw, impress, math..."
|
||||
'/// go into writer, type a text, select all, Edit->Cut, close writer ///'
|
||||
'/// go into application to test, insert every format you can get from Edit->Paste->Special :-) ///'
|
||||
gApplication = "WRITER"
|
||||
call hNewDocument
|
||||
kontext "DocumentWriter"
|
||||
DocumentWriter.TypeKeys "abc<shift home>"
|
||||
editcut
|
||||
call hCloseDocument
|
||||
gApplication = "IMPRESS"
|
||||
call hNewDocument
|
||||
sleep 1
|
||||
|
||||
Printlog " get count of possibilities: "
|
||||
EditPasteSpecial
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
x = Auswahl.GetItemCount
|
||||
for i = 1 to x
|
||||
printlog " - " + i + " - " + Auswahl.GetItemText (i)
|
||||
next i
|
||||
InhaltEinfuegen.Cancel
|
||||
Printlog " get count of possibilities: "
|
||||
EditPasteSpecial
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
x = Auswahl.GetItemCount
|
||||
for i = 1 to x
|
||||
printlog " - " + i + " - " + Auswahl.GetItemText (i)
|
||||
next i
|
||||
InhaltEinfuegen.Cancel
|
||||
|
||||
Printlog " insert every possibility"
|
||||
for i = 1 to x
|
||||
Printlog " - processing number: "+i
|
||||
EditPasteSpecial
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
Auswahl.Select i
|
||||
sleep 1
|
||||
InhaltEinfuegen.OK
|
||||
sleep 1
|
||||
next i
|
||||
Printlog " insert every possibility"
|
||||
for i = 1 to x
|
||||
Printlog " - processing number: "+i
|
||||
EditPasteSpecial
|
||||
sleep 1
|
||||
Kontext "InhaltEinfuegen"
|
||||
Auswahl.Select i
|
||||
sleep 1
|
||||
InhaltEinfuegen.OK
|
||||
sleep 1
|
||||
next i
|
||||
Call hCloseDocument '/// close document ///'
|
||||
endcase
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
|
@@ -58,257 +58,315 @@
|
||||
' Call tdContextConvertIntoMetaFile
|
||||
|
||||
testcase tiModifyConvertToPolygon
|
||||
Dim PosX as string
|
||||
Dim PosY as string
|
||||
Dim Maxanzahl as string
|
||||
Dim Minanzahl as string
|
||||
Dim PosX as string
|
||||
Dim PosY as string
|
||||
Dim Maxanzahl as string
|
||||
Dim Minanzahl as string
|
||||
|
||||
Call hNewDocument
|
||||
sleep 3
|
||||
hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30)
|
||||
sleep 1
|
||||
hTypeKeys "<Escape>"
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
ContextConvertIntoPolygon
|
||||
sleep 1
|
||||
ContextPositionAndSize
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
PosX = Width.GetText
|
||||
PosY = Height.GetText
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
FormatCharacter
|
||||
Kontext
|
||||
Active.SetPage TabFont
|
||||
Kontext "TabFont"
|
||||
sleep 1
|
||||
try
|
||||
Size.SetText "96"
|
||||
catch
|
||||
if (gAsianSup OR gCTLSup) then
|
||||
Call hNewDocument
|
||||
sleep 3
|
||||
hTextrahmenErstellen ("This is a text that will be transformed into a Polygon-object", 10,10,60,30)
|
||||
sleep 1
|
||||
hTypeKeys "<Escape>"
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
ContextConvertIntoPolygon
|
||||
sleep 1
|
||||
ContextPositionAndSize
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
PosX = Width.GetText
|
||||
PosY = Height.GetText
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
FormatCharacter
|
||||
Kontext
|
||||
Active.SetPage TabFont
|
||||
Kontext "TabFont"
|
||||
sleep 1
|
||||
try
|
||||
Size.SetText "96"
|
||||
catch
|
||||
if (gAsianSup OR gCTLSup) then
|
||||
try
|
||||
SizeWest.SetText "96"
|
||||
SizeWest.SetText "96"
|
||||
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
|
||||
else
|
||||
else
|
||||
Warnlog "Asian or ctl support is NOT enabled, but Size of font is not accessable :-("
|
||||
try
|
||||
SizeWest.SetText "96"
|
||||
qaErrorLog "SizeWest. works"
|
||||
SizeWest.SetText "96"
|
||||
qaErrorLog "SizeWest. works"
|
||||
catch
|
||||
endcatch
|
||||
try
|
||||
SizeEast.SetText "96"
|
||||
qaErrorLog "SizeEast. works"
|
||||
SizeEast.SetText "96"
|
||||
qaErrorLog "SizeEast. works"
|
||||
catch
|
||||
endcatch
|
||||
try
|
||||
Size.SetText "96"
|
||||
qaErrorLog "Size. works"
|
||||
Size.SetText "96"
|
||||
qaErrorLog "Size. works"
|
||||
catch
|
||||
endcatch
|
||||
try
|
||||
SizeCTL.SetText "96"
|
||||
qaErrorLog "SizeCTL. works"
|
||||
SizeCTL.SetText "96"
|
||||
qaErrorLog "SizeCTL. works"
|
||||
catch
|
||||
endcatch
|
||||
endif
|
||||
endcatch
|
||||
TabFont.OK
|
||||
sleep 1
|
||||
ContextPositionAndSize
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
if ( Width.GetText = PosX or Height.GetText = PosY ) Then
|
||||
Printlog "- Text converted into polygon"
|
||||
else
|
||||
Warnlog "- Convert into polygon does not work."
|
||||
end if
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
endif
|
||||
endcatch
|
||||
TabFont.OK
|
||||
sleep 1
|
||||
ContextPositionAndSize
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
'/// compare width and heigth to control is it is still text ///'
|
||||
if ( Width.GetText = PosX or Height.GetText = PosY ) Then
|
||||
Printlog "- Text converted into polygon"
|
||||
else
|
||||
Warnlog "- Convert into polygon does not work."
|
||||
end if
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
Call hCloseDocument
|
||||
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
|
||||
Printlog "-------------------------------------------------end"
|
||||
|
||||
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
|
||||
sleep 3
|
||||
sleep 3
|
||||
kontext "Active"
|
||||
|
||||
Call hNewDocument '/// new document ///'
|
||||
sleep 3
|
||||
InsertGraphicsFromFile '/// insert graphic ///'
|
||||
sleep 3
|
||||
kontext "Active"
|
||||
if Active.Exists Then
|
||||
Active.OK
|
||||
Active.OK
|
||||
end if
|
||||
sleep 5
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
|
||||
sleep 2
|
||||
Oeffnen.Click
|
||||
sleep 2
|
||||
Kontext "Active"
|
||||
if Active.Exists Then
|
||||
Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document"
|
||||
Active.OK
|
||||
sleep 2
|
||||
Call hCloseDocument
|
||||
goto endsub
|
||||
end if
|
||||
Kontext "DocumentImpress"
|
||||
try
|
||||
sleep 5
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
'/// uses input\\impress\\grafik\\columbia.dxf ///
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\columbia.dxf")
|
||||
sleep 2
|
||||
Oeffnen.Click
|
||||
sleep 2
|
||||
Kontext "Active"
|
||||
if Active.Exists Then
|
||||
Warnlog Active.GetText + ", Test will end here because of problems putting graphics into the document"
|
||||
Active.OK
|
||||
sleep 2
|
||||
Call hCloseDocument
|
||||
goto endsub
|
||||
end if
|
||||
Kontext "DocumentImpress"
|
||||
try
|
||||
ContextConvertIntoBitmap '/// convert dxf file to bitmap ///'
|
||||
sleep 1
|
||||
Printlog "- Convert into bitmap works"
|
||||
catch
|
||||
catch
|
||||
Warnlog "- Convert into bitmap does not work"
|
||||
endcatch
|
||||
sleep 2
|
||||
endcase
|
||||
|
||||
endcatch
|
||||
sleep 2
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tdContextConvertIntoBitmap
|
||||
'--------------------------------------------------------
|
||||
testcase tiAendernUmwandelnInKurve
|
||||
|
||||
Printlog " ----- ContextConvertIntoCurve testen"
|
||||
|
||||
Call hNewDocument '/// New impress document///'
|
||||
|
||||
sleep 2
|
||||
Kontext "DocumentImpress"
|
||||
sleep 2
|
||||
sleep 2
|
||||
sleep 3
|
||||
gMouseClick 30,15
|
||||
Call hTextrahmenErstellen ("I test,test,test,test only, if it works for you",20,20,60,30) '/// create textbox///'
|
||||
sleep 2
|
||||
Kontext "DocumentImpress"
|
||||
gMouseDoubleClick 70,70 '/// deselect textbox ///'
|
||||
sleep 2
|
||||
EditSelectAll '/// select textbox ///'
|
||||
sleep 2
|
||||
ContextConvertIntoCurve '/// convert into curve ///'
|
||||
sleep 3
|
||||
gMouseClick 30,15
|
||||
|
||||
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"
|
||||
catch
|
||||
catch
|
||||
Printlog " - Text converted into a curve"
|
||||
endcatch
|
||||
|
||||
endcase
|
||||
endcatch
|
||||
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tiAendernUmwandelnInKurve
|
||||
'--------------------------------------------------------
|
||||
testcase tiAendernUmwandelnInPolygonGrafik
|
||||
|
||||
Printlog "- Context/ConvertIntoPolygon"
|
||||
|
||||
Call hNewDocument '/// new document ///'
|
||||
|
||||
InsertGraphicsFromFile '/// insert graphic (desp.bmp) ///'
|
||||
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" )
|
||||
Oeffnen.Click
|
||||
sleep 3
|
||||
Kontext "DocumentImpress"
|
||||
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
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
'///use graphic : input\\impress\\grafik\\desp.bmp ///
|
||||
Dateiname.SetText ConvertPath ( gTesttoolPath + "global\input\graf_inp\desp.bmp" )
|
||||
Oeffnen.Click
|
||||
sleep 3
|
||||
Kontext "DocumentImpress"
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
|
||||
ContextConvertIntoPolygon '/// convert into polygon ///'
|
||||
Kontext "UmwandelnInPolygon"
|
||||
Printlog "- Testing vectorize dialog"
|
||||
Farbanzahl.ToMax '/// set number of colors to max ///'
|
||||
if Farbanzahl.GetText <> "32" Then Warnlog "- Maximum value for color depth should be 32, but it is: " + Farbanzahl.GetText
|
||||
Farbanzahl.ToMin '/// set number of colors to min ///'
|
||||
sleep 1
|
||||
if Farbanzahl.GetText <> "8" Then Warnlog "- Minimum value for color depth should be 8 but it is: " + Farbanzahl.GetText
|
||||
sleep 2
|
||||
Punktreduktion.SetText "50" '/// set point reduction to 50 ///'
|
||||
sleep 2
|
||||
if Punktreduktion.GetText <> "32 Pixel" Then Warnlog "- Maximum value should be 32, but it is: " + Punktreduktion.GetText
|
||||
sleep 1
|
||||
Punktreduktion.SetText "-50" '/// set an out of range value ///'
|
||||
sleep 1
|
||||
if Punktreduktion.GetText <> "0 Pixel" Then Warnlog "- Minimum value should be 0, but it is: " + Punktreduktion.GetText
|
||||
Loecherfuellen.Uncheck '/// uncheck fill holes ///'
|
||||
if Not Kachelgroesse.IsEnabled Then
|
||||
Printlog "- Control disabled."
|
||||
else
|
||||
Warnlog "- Control should be disabled if Fill is not checked."
|
||||
end if
|
||||
Vorschau.Click '/// open preview ///'
|
||||
sleep 2
|
||||
UmwandelnInPolygon.OK '/// close dialog ///'
|
||||
sleep 5
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tiAendernUmwandelnInPolygonGrafik
|
||||
'--------------------------------------------------------
|
||||
testcase tiAendernUmwandelnIn3D
|
||||
|
||||
Printlog "- Convert into 3D"
|
||||
Call hNewDocument
|
||||
sleep 2
|
||||
gMouseclick 35,35
|
||||
sleep 1
|
||||
try
|
||||
Printlog "- Convert into 3D works"
|
||||
catch
|
||||
Warnlog "- Convert into 3D does not work"
|
||||
endcatch
|
||||
endcase
|
||||
|
||||
Call hNewDocument
|
||||
sleep 1 '/// new impress document ///'
|
||||
hRechteckErstellen (10,10,40,40) '/// create rectangle ///'
|
||||
'/// convert into 3D ///'
|
||||
sleep 2
|
||||
gMouseclick 35,35
|
||||
sleep 1
|
||||
try
|
||||
ContextConvertInto3D '/// try to access convert ito 3d a 2nd time, should be impossible using a 3d object as source ///'
|
||||
Printlog "- Convert into 3D works"
|
||||
catch
|
||||
Warnlog "- Convert into 3D does not work"
|
||||
endcatch
|
||||
Call hCloseDocument '/// close document '///
|
||||
|
||||
endcase 'tiAendernUmwandelnIn3D
|
||||
'--------------------------------------------------------
|
||||
testcase tiAendernUmwandelnIn3DRotationskoerper
|
||||
|
||||
Printlog "- ConvertInto3DRotationobject"
|
||||
Dim PosX
|
||||
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
|
||||
Dim PosX
|
||||
Dim PosY
|
||||
|
||||
Call hNewDocument '/// new document '///
|
||||
Kontext "DocumentImpress"
|
||||
hRechteckErstellen (20,20,50,50) '/// create rectangle ///'
|
||||
sleep 1
|
||||
ContextPositionAndSize '/// get position values for the rectangle ///'
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
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
|
||||
Printlog "- ConvertIntoMetaFile"
|
||||
|
||||
Printlog "- ConvertIntoMetaFile"
|
||||
|
||||
Call hNewDocument '/// new document ///'
|
||||
sleep 3
|
||||
InsertGraphicsFromFile '/// insert graphic ///'
|
||||
sleep 1
|
||||
kontext "Active"
|
||||
sleep 1
|
||||
if Active.Exists Then
|
||||
Active.OK
|
||||
Active.OK
|
||||
end if
|
||||
sleep 1
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
'/// uses input\\impress\\grafik\\desp.gif") ///
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\purzel.gif")
|
||||
sleep 2
|
||||
Oeffnen.Click
|
||||
sleep 5
|
||||
Kontext "DocumentImpress"
|
||||
try
|
||||
ContextConvertIntoMetafile '/// convert bitmap into metafile ///'
|
||||
sleep 2
|
||||
Printlog "- Convert into Metafile does work"
|
||||
catch
|
||||
Warnlog "- Convert into Metafile does not work"
|
||||
endcatch
|
||||
sleep 2
|
||||
endcase
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tiAendernUmwandelnInMetaFile
|
||||
|
||||
|
@@ -49,144 +49,224 @@ testcase tCrossfading
|
||||
dim CounterForX as integer
|
||||
dim anothercounter as integer
|
||||
|
||||
Call hNewDocument '/// New Impress document ///'
|
||||
gMouseClick 50,50
|
||||
sleep 1
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
|
||||
sleep 1
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
kontext "Ueberblenden"
|
||||
X = Schritte.GetText ' /// Get counter-value and save it in X ///'
|
||||
printlog "Steps before we start the test: " + X
|
||||
printlog "Schritte.GetText= " + Schritte.GetText
|
||||
|
||||
|
||||
Schritte.ToMin
|
||||
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? ///'
|
||||
Schritte.More 1
|
||||
for I = 2 to 10 ' /// How many steps do you want? ///'
|
||||
Schritte.More 1
|
||||
if Schritte.GetText <> I then qaerrorlog "Could not change the step-number to" + I
|
||||
Ueberblenden.OK
|
||||
sleep 1
|
||||
try
|
||||
catch
|
||||
qaerrorlog "Could not ungroup objects"
|
||||
endcatch
|
||||
sleep 1
|
||||
|
||||
try
|
||||
ContextPositionAndSize
|
||||
catch
|
||||
qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?"
|
||||
endcatch
|
||||
kontext
|
||||
active.SetPage TabPositionAndSize
|
||||
sleep 1
|
||||
kontext "TabPositionAndSize"
|
||||
if TabPositionAndSize.exists (5) then
|
||||
CounterForX=0
|
||||
CheckX=0
|
||||
TabPositionAndSize.OK
|
||||
else
|
||||
qaerrorlog "Couldn't switch tab page :-( "
|
||||
endif
|
||||
try
|
||||
FormatUngroupDraw '/// open context menu and ungroup objects ///'
|
||||
catch
|
||||
qaerrorlog "Could not ungroup objects"
|
||||
endcatch
|
||||
sleep 1
|
||||
hTypeKeys "<TAB>" '/// Should make the first object active ///'
|
||||
|
||||
'/// Get position and dimensions of elements ///'
|
||||
try
|
||||
ContextPositionAndSize
|
||||
catch
|
||||
qaerrorlog "Couldnt call 'ContextPositionAndSize' - No object selected?"
|
||||
endcatch
|
||||
kontext
|
||||
active.SetPage TabPositionAndSize
|
||||
sleep 1
|
||||
kontext "TabPositionAndSize"
|
||||
if TabPositionAndSize.exists (5) then
|
||||
CounterForX=0
|
||||
CheckX=0
|
||||
FirstX=PositionX.GetText '/// Tet Dimensions of first object ///'
|
||||
TabPositionAndSize.OK
|
||||
else
|
||||
qaerrorlog "Couldn't switch tab page :-( "
|
||||
endif
|
||||
|
||||
|
||||
anothercounter = I+2 '/// How many objects we have on the screen ///'
|
||||
|
||||
if Y > anothercounter then warnlog "Too many steps, something is wrong."
|
||||
try
|
||||
catch
|
||||
errolog "Could not step to the next object"
|
||||
endcatch
|
||||
' Printlog "- Get position and dimensions of elements"
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
sleep 1
|
||||
TabPositionAndSize.OK
|
||||
Kontext "DocumentDraw"
|
||||
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 "Number of objects: " + anothercounter
|
||||
printlog ""
|
||||
endif
|
||||
for Y = 1 to anothercounter '/// How many times we should step to (hopefully) get back to the first one ///'
|
||||
if Y > anothercounter then warnlog "Too many steps, something is wrong."
|
||||
try
|
||||
hTypeKeys "<TAB>" '/// Step to the next object ///'
|
||||
catch
|
||||
errolog "Could not step to the next object"
|
||||
endcatch
|
||||
' Printlog "- Get position and dimensions of elements"
|
||||
ContextPositionAndSize '/// Open Position and Size for this object ///'
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
CheckX=PositionX.GetText '/// Get Position X for this object ///'
|
||||
sleep 1
|
||||
TabPositionAndSize.OK
|
||||
Kontext "DocumentDraw"
|
||||
CounterForX=CounterForX+1 '/// Up one on the object-counter ///'
|
||||
if CheckX=FirstX then '/// Check if Position is the same as the first one ///'
|
||||
if anothercounter = CounterForX then printlog "The first box is at: " + CheckX + " And we're now at " + FirstX + " = Correct steps between the objects, everything's fine."
|
||||
printlog "We should have " + Y + " objects to go through." '/// Just here for debugging. - FHA
|
||||
' printlog "anothercounter= " + anothercounter '/// Just here for debugging. - FHA
|
||||
printlog "Number of objects: " + anothercounter
|
||||
printlog ""
|
||||
endif
|
||||
next Y '/// End or go on with the checking-loop ///'
|
||||
|
||||
sleep 1
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
sleep 1
|
||||
sleep 2
|
||||
kontext "Ueberblenden"
|
||||
next I
|
||||
EditSelectAll '/// Select all ///'
|
||||
EditDelete '/// Delete all ///'
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create rectangle ///'
|
||||
sleep 1
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
sleep 2
|
||||
kontext "Ueberblenden"
|
||||
next I
|
||||
|
||||
'/// And now we're gonna check if we can separate the object into it's parts ///'
|
||||
'/// And check if the numbers of steps / objects is correct ///'
|
||||
|
||||
for Z = 1 to X -1
|
||||
next Z
|
||||
printlog "Value has been restored to: " + Schritte.GetText
|
||||
printlog "X is now: " + X
|
||||
Attributierung.UnCheck
|
||||
Ueberblenden.OK
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
sleep 1
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Kontext "Ueberblenden"
|
||||
if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked."
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
sleep 1
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Kontext "Ueberblenden"
|
||||
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked."
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
sleep 1
|
||||
sleep 1
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Kontext "Ueberblenden"
|
||||
if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again."
|
||||
Ueberblenden.OK
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
sleep 1
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Kontext "Ueberblenden"
|
||||
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again."
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Kontext "Ueberblenden"
|
||||
if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again."
|
||||
sleep 1
|
||||
Schritte.ToMin '/// Select minimum value for number of steps ///'
|
||||
for Z = 1 to X -1
|
||||
Schritte.More '/// Raise the value for number of steps with one ///'
|
||||
next Z
|
||||
printlog "Value has been restored to: " + Schritte.GetText
|
||||
printlog "X is now: " + X
|
||||
Attributierung.UnCheck
|
||||
Ueberblenden.OK
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
EditSelectAll '/// Select all ///'
|
||||
EditDelete '/// Delete all ///'
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
Kontext "Ueberblenden"
|
||||
if Attributierung.IsChecked = TRUE then qaerrorlog "Attributierung / was NOT unchecked."
|
||||
GleicheOrientierung.UnCheck '/// Uncheck "same orienation" ///' -????
|
||||
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
EditSelectAll '/// Select all ///'
|
||||
EditDelete '/// Delete all ///'
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
Kontext "Ueberblenden"
|
||||
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT unchecked."
|
||||
Attributierung.Check '/// Check "Attributing" ///' - ???
|
||||
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditDelete '/// Delete all ///'
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
Kontext "Ueberblenden"
|
||||
if Attributierung.IsChecked = FALSE then qaerrorlog "Attributierung / was NOT checked again."
|
||||
GleicheOrientierung.UnCheck '/// Check "same orientation" ///' -????
|
||||
Ueberblenden.OK
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
EditSelectAll '/// Select all ///'
|
||||
EditDelete '/// Delete all ///'
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
Kontext "Ueberblenden"
|
||||
if GleicheOrientierung.IsChecked = TRUE then qaerrorlog "GleicheOrientierung / was NOT checked again."
|
||||
GleicheOrientierung.Check '/// Check "same orientation" ///' -????
|
||||
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
EditSelectAll '/// Select all ///'
|
||||
EditDelete '/// Delete all ///'
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// create rectangle ///'
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
Kontext "Ueberblenden"
|
||||
if GleicheOrientierung.IsChecked = FALSE then qaerrorlog "GleicheOrientierung / was NOT checked again."
|
||||
GleicheOrientierung.Check '/// Check "same orientation" ///' -????
|
||||
Ueberblenden.OK '/// Close CrossFading-window with "OK" ///'
|
||||
sleep 1
|
||||
|
||||
Kontext "DocumentDraw" '/// EditCrossFading should not be enabled if more than two objects is selected. ///'
|
||||
EditSelectAll '/// Select all ///'
|
||||
EditDelete '/// Delete all ///'
|
||||
|
||||
sleep 1
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 30, 30, 70, 70 ) '/// Create second rectangle ///'
|
||||
gMouseClick 90,90
|
||||
Call hRechteckErstellen ( 20, 20, 50, 50 ) '/// Create third rectangle ///'
|
||||
sleep 1
|
||||
EditSelectAll '/// Select all ///'
|
||||
sleep 1
|
||||
try
|
||||
EditCrossFading '/// Choose Edit / CrossFading ///'
|
||||
sleep 2
|
||||
If active = "Ueberblenden" then
|
||||
qaerrorlog "CrossFading should NOT be selectable since more than two objects is selected."
|
||||
kontext "Ueberblenden"
|
||||
Ueberblenden.CANCEL '/// Close CrossFading-window with "CANCEL" ///'
|
||||
endif
|
||||
sleep 2
|
||||
Kontext "DocumentDraw"
|
||||
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
|
||||
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
|
||||
printlog "End of test"
|
||||
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
|
||||
endcase 'tCrossfading
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -46,10 +46,12 @@
|
||||
testcase t_Introduction
|
||||
|
||||
gApplication = "IMPRESS"
|
||||
|
||||
|
||||
'///Open new presentation
|
||||
printlog "Open new presentation"
|
||||
Call hNewDocument
|
||||
|
||||
|
||||
'///Open the Gallery
|
||||
printlog "Open the Gallery"
|
||||
ToolsGallery
|
||||
Sleep (1)
|
||||
@@ -57,7 +59,8 @@ testcase t_Introduction
|
||||
if Gallery.NotExists(2) then
|
||||
ToolsGallery
|
||||
end if
|
||||
|
||||
|
||||
'///Choose computer theme and insert the third image
|
||||
printlog "Choose an item from the gallery"
|
||||
Gallerys.Select(2)
|
||||
View.TypeKeys "<HOME><RIGHT><RIGHT>"
|
||||
@@ -67,6 +70,7 @@ testcase t_Introduction
|
||||
sleep 2
|
||||
MenuSelect(MenuGetItemID(1)) 'Copy
|
||||
sleep 2
|
||||
'///+ - Check that we really got a copy of the object ///'
|
||||
kontext "DocumentImpress"
|
||||
DocumentImpress.OpenContextMenu(true)
|
||||
sleep 2
|
||||
@@ -74,10 +78,10 @@ testcase t_Introduction
|
||||
sleep 2
|
||||
Kontext "ExportierenDlg"
|
||||
if ExportierenDlg.IsVisible(5) then
|
||||
printlog " Gallery-object correctly copied into Slide."
|
||||
ExportierenDlg.Close
|
||||
else
|
||||
warnlog " Doesn't seem like we copied anything from the Gallery... ?"
|
||||
printlog " Gallery-object correctly copied into Slide."
|
||||
ExportierenDlg.Close
|
||||
else
|
||||
warnlog " Doesn't seem like we copied anything from the Gallery... ?"
|
||||
endif
|
||||
printlog "Delete the item"
|
||||
kontext "DocumentImpress"
|
||||
@@ -94,13 +98,15 @@ testcase t_Introduction
|
||||
catch
|
||||
Warnlog "Insert graphic doesn't work"
|
||||
endcatch
|
||||
|
||||
|
||||
'///Resize object
|
||||
printlog "Resize object"
|
||||
Kontext "DocumentImpress"
|
||||
gMouseClick (10, 10)
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
ContextPositionAndSize '/// Format-position and size
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
@@ -109,7 +115,8 @@ testcase t_Introduction
|
||||
SizePosition.TypeKeys "<DOWN> <RIGHT>"
|
||||
Width.SetText CStr((CInt(Width.GetText)) * 2)
|
||||
TabPositionAndSize.OK
|
||||
|
||||
|
||||
'///Break object
|
||||
printlog "Break object"
|
||||
Kontext "DocumentImpress"
|
||||
gMouseClick (10, 10)
|
||||
@@ -117,7 +124,8 @@ testcase t_Introduction
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
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"
|
||||
DocumentImpress.TypeKeys "<SHIFT TAB>"
|
||||
FormatArea
|
||||
@@ -127,13 +135,15 @@ testcase t_Introduction
|
||||
FillOptions.Select 2
|
||||
ColourList.Select 1
|
||||
TabArea.OK
|
||||
|
||||
|
||||
'///Group the objects
|
||||
printlog "Group the object"
|
||||
kontext "DocumentImpress"
|
||||
DocumentImpress.TypeKeys "<MOD1 A>"
|
||||
hOpenContextMenu '(when the object is marked)
|
||||
hMenuSelectNr(12)
|
||||
|
||||
|
||||
'///Add Layout "Title Only"
|
||||
Printlog "Add Layout"
|
||||
kontext "Tasks"
|
||||
if (NOT Tasks.exists) then
|
||||
@@ -143,21 +153,23 @@ testcase t_Introduction
|
||||
Kontext "LayoutsPreview"
|
||||
LayoutsPreview.TypeKeys "<HOME> <DOWN> <DOWN> <RETURN>"
|
||||
sleep (5)
|
||||
'///Add a background
|
||||
Printlog "Add background"
|
||||
|
||||
|
||||
Kontext "Tasks"
|
||||
printlog "Deselect all tabs from view menu in task pane except the needed."
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(5))
|
||||
MenuSelect(MenuGetItemID(5))
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(4))
|
||||
MenuSelect(MenuGetItemID(4))
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(3))
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(2))
|
||||
Kontext "AvailableForUsePreview"
|
||||
AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
|
||||
sleep (5)
|
||||
sleep (5)
|
||||
'///Add a transition effect
|
||||
Printlog "Add a transition effect"
|
||||
Kontext "Tasks"
|
||||
View.OpenMenu
|
||||
@@ -167,44 +179,45 @@ testcase t_Introduction
|
||||
TransitionSound.GetItemCount 'needed for select
|
||||
Sleep 1
|
||||
TransitionSound.Select 4
|
||||
|
||||
|
||||
'///Close the document
|
||||
Printlog "Close the document"
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
endcase 't_Introduction
|
||||
'--------------------------------------------------------------------
|
||||
|
||||
testcase t_Interoperability
|
||||
|
||||
Dim sTemplatename as string
|
||||
|
||||
gApplication = "IMPRESS"
|
||||
|
||||
|
||||
'///Open PowerPoint presentation
|
||||
printlog "Open PowerPoint presentation"
|
||||
hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/dotNetOverview.ppt"))
|
||||
|
||||
Call sMakeReadOnlyDocumentEditable
|
||||
|
||||
|
||||
'Save the name of the origin background (taken from last slide)
|
||||
Kontext "DocumentImpress"
|
||||
DocumentImpress.TypeKeys "<END>"
|
||||
sleep (4)
|
||||
sTemplatename = DocumentImpress.StatusGetText (6)
|
||||
printlog " Background = " & sTemplatename 'Debugcode
|
||||
|
||||
Kontext "DocumentImpress"
|
||||
DocumentImpress.TypeKeys "<END>"
|
||||
sleep (4)
|
||||
sTemplatename = DocumentImpress.StatusGetText (6)
|
||||
printlog " Background = " & sTemplatename 'Debugcode
|
||||
|
||||
printlog "Choose a masterpage from right pane"
|
||||
|
||||
|
||||
Kontext "Tasks"
|
||||
printlog "Deselect all tabs accept the Master Pages"
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(5))
|
||||
MenuSelect(MenuGetItemID(5))
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(4))
|
||||
MenuSelect(MenuGetItemID(4))
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(3))
|
||||
View.OpenMenu
|
||||
MenuSelect(MenuGetItemID(2))
|
||||
sleep 2
|
||||
sleep 2
|
||||
Kontext "AvailableForUsePreview"
|
||||
AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>"
|
||||
sleep (5)
|
||||
@@ -212,10 +225,11 @@ testcase t_Interoperability
|
||||
Kontext "DocumentImpress"
|
||||
printlog " Background is " & DocumentImpress.StatusGetText (6) 'Debugcode
|
||||
if DocumentImpress.StatusGetText (6) = sTemplatename then
|
||||
warnlog "The background is not changed"
|
||||
else printlog " Background has been changed"
|
||||
warnlog "The background is not changed"
|
||||
else printlog " Background has been changed"
|
||||
endif
|
||||
|
||||
|
||||
'///Switch back to original background
|
||||
printlog "Switch back to original background"
|
||||
Kontext "Tasks"
|
||||
Kontext "AvailableForUsePreview"
|
||||
@@ -223,10 +237,11 @@ testcase t_Interoperability
|
||||
sleep (5)
|
||||
Kontext "DocumentImpress"
|
||||
if DocumentImpress.StatusGetText (6) = sTemplatename then
|
||||
printlog " The background has been set back to default"
|
||||
else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename
|
||||
printlog " The background has been set back to default"
|
||||
else warnlog "The background is " & DocumentImpress.StatusGetText (6) & " but should be: " & sTemplatename
|
||||
endif
|
||||
|
||||
|
||||
'///Resort slides
|
||||
printlog "Resort slides"
|
||||
Kontext "DocumentImpress"
|
||||
Kontext "Slides"
|
||||
@@ -238,28 +253,29 @@ testcase t_Interoperability
|
||||
Kontext "SlidesControl"
|
||||
SlidesControl.TypeKeys "<Mod1 V>"
|
||||
kontext "InsertPaste"
|
||||
if InsertPaste.Exists(1) then
|
||||
if InsertPaste.Exists(1) then
|
||||
Before.Check
|
||||
InsertPaste.OK
|
||||
endif
|
||||
Printlog " Verify that the slide was moved correctly"
|
||||
Kontext "Slides"
|
||||
SlidesControl.TypeKeys "<PAGEUP>"
|
||||
SlidesControl.TypeKeys "<SHIFT F10>"
|
||||
if hMenuFindSelect(27268, true, 3) = false then
|
||||
endif
|
||||
Printlog " Verify that the slide was moved correctly"
|
||||
Kontext "Slides"
|
||||
SlidesControl.TypeKeys "<PAGEUP>"
|
||||
SlidesControl.TypeKeys "<SHIFT F10>"
|
||||
if hMenuFindSelect(27268, true, 3) = false then
|
||||
Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
|
||||
Call hCloseDocument
|
||||
Goto Endsub
|
||||
endif
|
||||
kontext "NameDlgPage"
|
||||
if NameField.GetText <> ".NET Enterprise Federation" then
|
||||
endif
|
||||
kontext "NameDlgPage"
|
||||
if NameField.GetText <> ".NET Enterprise Federation" then
|
||||
Warnlog "Wrong slide found! Expected no 3, but found " + NameField.GetText + "."
|
||||
else
|
||||
else
|
||||
Printlog " The slide was correctly moved"
|
||||
endif
|
||||
NameDlgPage.OK
|
||||
sleep 1
|
||||
|
||||
endif
|
||||
NameDlgPage.OK
|
||||
sleep 1
|
||||
|
||||
'///Switch views
|
||||
printlog "Switch views"
|
||||
ViewWorkspaceOutlineView
|
||||
sleep (2)
|
||||
@@ -270,8 +286,8 @@ testcase t_Interoperability
|
||||
DocumentImpressOutlineView.TypeKeys "<Mod1 C>"
|
||||
sleep (5)
|
||||
if getclipboard() <> ".NET Enterprise" then
|
||||
warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'."
|
||||
else printlog " Switching to Outlineview was successfull"
|
||||
warnlog " Wrong selection in outlineview. Should be '.NET Enterprise', but is '" & getclipboard() +"'."
|
||||
else printlog " Switching to Outlineview was successfull"
|
||||
endif
|
||||
catch
|
||||
warnlog "Switching to Outlineview was not successfull"
|
||||
@@ -319,7 +335,8 @@ testcase t_Interoperability
|
||||
catch
|
||||
warnlog "Switching to Drawingview was not successfull"
|
||||
endcatch
|
||||
|
||||
|
||||
'///Travel through the presentation by left pane
|
||||
printlog "Travel through the presentation by left pane to slide 7"
|
||||
Kontext "DocumentImpress"
|
||||
DocumentImpress.TypeKeys "<HOME><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN><PAGEDOWN>"
|
||||
@@ -328,31 +345,31 @@ testcase t_Interoperability
|
||||
Kontext "SlidesControl"
|
||||
SlidesControl.OpenContextMenu
|
||||
if hMenuFindSelect(27268, true, 3) = false then
|
||||
Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
|
||||
Call hCloseDocument
|
||||
Goto Endsub
|
||||
Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
|
||||
Call hCloseDocument
|
||||
Goto Endsub
|
||||
endif
|
||||
kontext "NameDlgPage"
|
||||
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 + "."
|
||||
else Printlog " Slide 7 is reached"
|
||||
Warnlog "Wrong slide found! Expected no 7, but found " + NameField.GetText + "."
|
||||
else Printlog " Slide 7 is reached"
|
||||
endif
|
||||
NameDlgPage.OK
|
||||
sleep 1
|
||||
|
||||
|
||||
printlog "Autoshape support"
|
||||
Kontext "DocumentImpress"
|
||||
DocumentImpress.TypeKeys "<TAB>"
|
||||
try
|
||||
Kontext "ExtrusionObjectBar"
|
||||
printlog "Checking if ExtrusionObjectBar is already open."
|
||||
printlog "Checking if ExtrusionObjectBar is already open."
|
||||
if ExtrusionObjectBar.Exists then
|
||||
printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
|
||||
printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
|
||||
else
|
||||
printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
|
||||
printlog "Opening ExtrusionObjectBar."
|
||||
ViewToolbarsThreeDSettings
|
||||
endif
|
||||
printlog "ExtrusionObjectBar Exists = " & ExtrusionObjectBar.Exists
|
||||
printlog "Opening ExtrusionObjectBar."
|
||||
ViewToolbarsThreeDSettings
|
||||
endif
|
||||
ExtrusionTiltRight.Click
|
||||
printlog " An autoshape was found and turned right"
|
||||
catch
|
||||
@@ -360,22 +377,23 @@ testcase t_Interoperability
|
||||
endcatch
|
||||
printlog "Close document"
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
endcase 't_Interoperability
|
||||
'--------------------------------------------------------------------
|
||||
|
||||
testcase t_DrawingEngine
|
||||
|
||||
Dim sGroupPosition as string
|
||||
Dim sObjectPosition as string
|
||||
|
||||
|
||||
gApplication = "DRAW"
|
||||
|
||||
|
||||
'///Open a drawing
|
||||
printlog "Open a drawing"
|
||||
hFileOpen (Convertpath (gTesttoolPath + "graphics/required/input/Blueprint.odg"))
|
||||
|
||||
Call sMakeReadOnlyDocumentEditable
|
||||
|
||||
'///Select grouped object and enter group
|
||||
printlog "Select group"
|
||||
Kontext "DocumentDraw"
|
||||
DocumentDraw.TypeKeys "<TAB><TAB>"
|
||||
@@ -392,7 +410,8 @@ testcase t_DrawingEngine
|
||||
Kontext "DocumentDraw"
|
||||
FormatEditGroupDraw
|
||||
sleep 1
|
||||
|
||||
|
||||
'///Select and move single object
|
||||
printlog "Select and move single object"
|
||||
printlog " Select object"
|
||||
Kontext "DocumentDraw"
|
||||
@@ -403,8 +422,8 @@ testcase t_DrawingEngine
|
||||
MenuSelect(MenuGetItemID(15)) 'Select NAME from context
|
||||
kontext "NameDlgObject"
|
||||
if NameField.GetText <> "Chair" then
|
||||
Warnlog "Wrong object selected!"
|
||||
else Printlog " The correct object is selected"
|
||||
Warnlog "Wrong object selected!"
|
||||
else Printlog " The correct object is selected"
|
||||
endif
|
||||
NameDlgObject.OK
|
||||
sleep 1
|
||||
@@ -421,12 +440,13 @@ testcase t_DrawingEngine
|
||||
DocumentDraw.TypeKeys "<UP><UP><UP>"
|
||||
sleep (5)
|
||||
printlog " Verify that the object was moved"
|
||||
ContextPositionAndSize '/// Format-position and size
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
if PositionY.GetText <> sObjectPosition then
|
||||
printlog " Single object was moved"
|
||||
else warnlog "The object has not been moved"
|
||||
printlog " Single object was moved"
|
||||
else warnlog "The object has not been moved"
|
||||
endif
|
||||
TabPositionAndSize.OK
|
||||
printlog " Exit group"
|
||||
@@ -438,11 +458,12 @@ testcase t_DrawingEngine
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
if PositionY.GetText = sGroupPosition then
|
||||
printlog " Group is still on position"
|
||||
else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText
|
||||
printlog " Group is still on position"
|
||||
else warnlog "Group has moved from " & sGroupPosition & " to " & PositionY.GetText
|
||||
endif
|
||||
TabPositionAndSize.OK
|
||||
|
||||
|
||||
'///Close document
|
||||
printlog "Close document"
|
||||
Call hCloseDocument
|
||||
|
||||
|
@@ -49,181 +49,241 @@
|
||||
' Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
|
||||
|
||||
testcase tEditDuplicate
|
||||
dim Ueber_Text_1
|
||||
dim Zaehler
|
||||
dim Ueber_Text_1
|
||||
dim Zaehler
|
||||
|
||||
Kontext "Duplizieren"
|
||||
Ueber_Text_1 = AnzahlAnKopien.GetText
|
||||
sleep 1
|
||||
For Zaehler = 1 to 8
|
||||
sleep 1
|
||||
Kontext "Duplizieren"
|
||||
Call hNewDocument '/// New Impress document ///'
|
||||
Call hRechteckErstellen ( 5, 5, 20, 30 ) '/// Create rectangle ///'
|
||||
EditSelectAll '/// Select rectangle ///'
|
||||
EditDuplicate '/// Edit-duplicate ///'
|
||||
Kontext "Duplizieren"
|
||||
Ueber_Text_1 = AnzahlAnKopien.GetText
|
||||
AnzahlAnKopien.SetText "50" '/// Set number of copies to 50 ///'
|
||||
Duplizieren.Cancel '/// Cancel Edit Duplicate ///'
|
||||
sleep 1
|
||||
For Zaehler = 1 to 8
|
||||
EditDuplicate '/// Edit Duplicate ///'
|
||||
sleep 1
|
||||
Kontext "Duplizieren"
|
||||
AnzahlAnKopien.SetText "30" '/// Number of copies = 30 ///'
|
||||
|
||||
Case 1: XAchse.SetText "0,0"
|
||||
YAchse.SetText "0,45"
|
||||
Hoehe.SetText "-0,1"
|
||||
Breite.SetText "-0,1"
|
||||
Drehwinkel.SetText "3"
|
||||
Anfang.Select Int((Anfang.GetItemCount * Rnd)+1)
|
||||
Case 2,6: XAchse.SetText "0,6"
|
||||
YAchse.SetText "0,0"
|
||||
Hoehe.SetText "0,15"
|
||||
Breite.SetText "0,01"
|
||||
Drehwinkel.SetText "353"
|
||||
Case 3,7: XAchse.SetText "0,0"
|
||||
YAchse.SetText "-0,4"
|
||||
Hoehe.SetText "-0,1"
|
||||
Breite.SetText "0,06"
|
||||
Drehwinkel.SetText "11"
|
||||
Case 4,8: XAchse.SetText "-0,6"
|
||||
YAchse.SetText "0,0"
|
||||
Hoehe.SetText "0,05"
|
||||
Breite.SetText "-0,08"
|
||||
Drehwinkel.SetText "347"
|
||||
Case 5: XAchse.SetText "0,1"
|
||||
YAchse.SetText "0,48"
|
||||
Hoehe.SetText "-0,05"
|
||||
Breite.SetText "-0,05"
|
||||
Drehwinkel.SetText "355"
|
||||
Select Case Zaehler '/// Setting values for axis and angles ///'
|
||||
Case 1: XAchse.SetText "0,0"
|
||||
YAchse.SetText "0,45"
|
||||
Hoehe.SetText "-0,1"
|
||||
Breite.SetText "-0,1"
|
||||
Drehwinkel.SetText "3"
|
||||
Anfang.Select Int((Anfang.GetItemCount * Rnd)+1)
|
||||
Case 2,6: XAchse.SetText "0,6"
|
||||
YAchse.SetText "0,0"
|
||||
Hoehe.SetText "0,15"
|
||||
Breite.SetText "0,01"
|
||||
Drehwinkel.SetText "353"
|
||||
Case 3,7: XAchse.SetText "0,0"
|
||||
YAchse.SetText "-0,4"
|
||||
Hoehe.SetText "-0,1"
|
||||
Breite.SetText "0,06"
|
||||
Drehwinkel.SetText "11"
|
||||
Case 4,8: XAchse.SetText "-0,6"
|
||||
YAchse.SetText "0,0"
|
||||
Hoehe.SetText "0,05"
|
||||
Breite.SetText "-0,08"
|
||||
Drehwinkel.SetText "347"
|
||||
Case 5: XAchse.SetText "0,1"
|
||||
YAchse.SetText "0,48"
|
||||
Hoehe.SetText "-0,05"
|
||||
Breite.SetText "-0,05"
|
||||
Drehwinkel.SetText "355"
|
||||
End Select
|
||||
Ende.Select Int((Ende.GetItemCount * Rnd)+1)
|
||||
Duplizieren.OK '/// Execute Duplicate ///'
|
||||
sleep 1
|
||||
Next Zaehler
|
||||
sleep 2
|
||||
endcase
|
||||
|
||||
Next Zaehler
|
||||
sleep 2
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
|
||||
endcase 'tEditDuplicate
|
||||
'---------------------------------------------------------
|
||||
testcase tEditFields
|
||||
Call hNewDocument
|
||||
sleep 3
|
||||
sleep 1
|
||||
sleep 2
|
||||
sleep 2
|
||||
Kontext "FeldbefehlBearbeitenDraw"
|
||||
sleep 2
|
||||
If FeldtypFix.Ischecked then
|
||||
|
||||
Call hNewDocument
|
||||
sleep 3
|
||||
InsertFieldsDateFix '/// Insert Date-Fix ///'
|
||||
EditSelectAll '/// Select inserted field ///'
|
||||
sleep 1
|
||||
hTypeKeys "<F2>" '/// Go into edit mode (F2) ///'
|
||||
sleep 2
|
||||
EditSelectAll '/// Select the date///'
|
||||
sleep 2
|
||||
EditfieldsDraw '/// Edit -fields///'
|
||||
Kontext "FeldbefehlBearbeitenDraw"
|
||||
sleep 2
|
||||
FeldtypFix.Check '/// check field type fix ///'
|
||||
If FeldtypFix.Ischecked then
|
||||
Printlog "OK FieldtypeFix checkable"
|
||||
else
|
||||
warnlog "FieldtypeFix not checkable"
|
||||
end if
|
||||
sleep 1
|
||||
If FeldtypVariabel.Ischecked then
|
||||
Printlog "OK FieldtypeVariabel enabled"
|
||||
else
|
||||
warnlog "FieldtypeVariabel not enabled"
|
||||
end if
|
||||
else
|
||||
warnlog "FieldtypeFix not checkable"
|
||||
end if
|
||||
FeldtypVariabel.Check '/// check field type variabel///'
|
||||
sleep 1
|
||||
If FeldtypVariabel.Ischecked then
|
||||
Printlog "OK FieldtypeVariabel enabled"
|
||||
else
|
||||
warnlog "FieldtypeVariabel not enabled"
|
||||
end if
|
||||
' For Zaehler = 1 to FeldtypFormat.GetItemCount
|
||||
' FeldTypFormat.Select Zaehler
|
||||
' printlog "OK Format ", Zaehler, " = ", FeldtypFormat.GetSelText
|
||||
' Next Zaehler
|
||||
sleep 2
|
||||
sleep 2
|
||||
endcase
|
||||
|
||||
FeldbefehlBearbeitenDraw.OK '/// close edit fields dialog ///'
|
||||
sleep 2
|
||||
Call hCloseDocument '/// close document ///'
|
||||
sleep 2
|
||||
|
||||
endcase 'tEditFields
|
||||
'--------------------------------------------------------
|
||||
testcase tEditDeleteSlide
|
||||
dim Ueber_Text_1 as string
|
||||
dim Ueber_Text_2 as string
|
||||
dim Ueber_Text_3 as string
|
||||
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
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
|
||||
Oeffnen.Click
|
||||
sleep 3
|
||||
|
||||
Call hNewDocument '/// New document ///'
|
||||
InsertGraphicsFromFile '/// insert graphic (sample.bmp) ///'
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
Link.Check '/// check link ///'
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\enter.bmp")
|
||||
Oeffnen.Click
|
||||
sleep 3
|
||||
EditLinksDraw '/// edit links ///'
|
||||
Kontext "VerknuepfungenBearbeiten"
|
||||
Aktualisieren.Click '/// refresh ///'
|
||||
sleep 1
|
||||
'Aendern 'kann man noch den Dialog aufrufen...
|
||||
Loesen.Click
|
||||
sleep 1
|
||||
Kontext
|
||||
Messagebox.Yes
|
||||
VerknuepfungenBearbeiten.Close '/// close dialog ///'
|
||||
sleep 1
|
||||
try
|
||||
EditLinksDraw '/// check if last changes remain in the dialog ///'
|
||||
Kontext "VerknuepfungenBearbeiten"
|
||||
sleep 1
|
||||
'Aendern 'kann man noch den Dialog aufrufen...
|
||||
Loesen.Click
|
||||
sleep 1
|
||||
Kontext
|
||||
Messagebox.Yes
|
||||
sleep 1
|
||||
try
|
||||
Kontext "VerknuepfungenBearbeiten"
|
||||
Loesen.Click
|
||||
sleep 1
|
||||
Kontext
|
||||
Messagebox.Yes
|
||||
VerknuepfungenBearbeiten.Close
|
||||
warnlog "Break link does not work"
|
||||
catch
|
||||
printlog "OK Link broken"
|
||||
endcatch
|
||||
endcase
|
||||
|
||||
VerknuepfungenBearbeiten.Close
|
||||
warnlog "Break link does not work"
|
||||
catch
|
||||
printlog "OK Link broken"
|
||||
endcatch
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tEditLinks
|
||||
'---------------------------------------------------------
|
||||
testcase tdEditDeleteLayer
|
||||
dim Ueber_Text_1 as string
|
||||
dim Ueber_Text_2 as string
|
||||
dim Ueber_Text_3 as string
|
||||
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
|
||||
Dim Schrieb as string
|
||||
|
||||
Schrieb = gOLEWriter
|
||||
if Schrieb = "" then
|
||||
warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
|
||||
else
|
||||
Dim Schrieb as string
|
||||
|
||||
Call hNewDocument
|
||||
Kontext "OLEObjektEinfuegen"
|
||||
sleep 3
|
||||
if ObjektTyp.GetItemCount = 0 Then
|
||||
Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
|
||||
sleep 1
|
||||
OleObjektEinfuegen.Cancel
|
||||
sleep 1
|
||||
else
|
||||
Schrieb = gOLEWriter
|
||||
if Schrieb = "" then
|
||||
warnlog " the OLE is not defined :-((( gOLEWriter: " + iSprache
|
||||
else
|
||||
|
||||
ObjektTyp.Select Schrieb
|
||||
sleep 1
|
||||
OLEObjektEinfuegen.OK
|
||||
sleep 3 ' Changed from Sleep 1 to Sleep 3
|
||||
gMouseMove 10,10,90,90
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
Call hNewDocument
|
||||
sleep 1 '/// new document ///'
|
||||
InsertObjectOLEObject '/// insert writer ole object ///'
|
||||
Kontext "OLEObjektEinfuegen"
|
||||
sleep 3
|
||||
if ObjektTyp.GetItemCount = 0 Then
|
||||
Warnlog "- No available Ole-entry in the list, maybe an error in the Install.ini?"
|
||||
sleep 1
|
||||
OleObjektEinfuegen.Cancel
|
||||
sleep 1
|
||||
else
|
||||
|
||||
try
|
||||
sleep 2
|
||||
catch
|
||||
Warnlog "- The EditObjectEdit did not work"
|
||||
endcatch
|
||||
ObjektTyp.Select Schrieb
|
||||
sleep 1
|
||||
OLEObjektEinfuegen.OK
|
||||
sleep 3 ' Changed from Sleep 1 to Sleep 3
|
||||
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
|
||||
sleep 1
|
||||
endif
|
||||
endcase
|
||||
sleep 1
|
||||
Call hCloseDocument '/// close document ///'
|
||||
endif
|
||||
endcase 'tEditObjectEdit
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -41,54 +41,54 @@
|
||||
' #1 tiEditSearchAndReplaceBUGS
|
||||
'*
|
||||
'\**********************************************************************************
|
||||
|
||||
testcase tiEditSearchAndReplace
|
||||
Dim sFile 'as string
|
||||
Dim sExpression(2) as string ' Expression to look for: ... Replace with
|
||||
dim sExt as string
|
||||
'/// This test tests the 'Search and Replace' -dialogue. ///'
|
||||
Dim sFile 'as string
|
||||
Dim sExpression(2) as string ' Expression to look for: ... Replace with
|
||||
dim sExt as string
|
||||
|
||||
Select Case Ucase(gApplication)
|
||||
case "DRAW" : sExt = ".odg"
|
||||
case "IMPRESS" : sExt = ".odp"
|
||||
end select
|
||||
Select Case Ucase(gApplication)
|
||||
case "DRAW" : sExt = ".odg"
|
||||
case "IMPRESS" : sExt = ".odp"
|
||||
end select
|
||||
|
||||
'First we need some errornes words to replace. (sExpression)
|
||||
'sExpression(1) has to be 3 times in the document
|
||||
select case iSprache
|
||||
case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz"
|
||||
case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese
|
||||
case 07 : qaerrorlog "No files for Russian yet, will use english instead."
|
||||
sExpression(1) = "Alle" : sExpression(2) = "Allz"
|
||||
case 30 : ' Greek
|
||||
case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands
|
||||
case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French
|
||||
case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish
|
||||
case 35 : ' Finnish
|
||||
case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria
|
||||
case 37 : ' Catalan
|
||||
case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian
|
||||
case 42 : ' Czech
|
||||
case 43 : ' Slowak
|
||||
case 44 : ' English (GB)
|
||||
case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish
|
||||
case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish
|
||||
case 47 : ' Norwegian
|
||||
case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish
|
||||
case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German
|
||||
case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil)
|
||||
case 66 : ' Thai
|
||||
' case 81 : sExpression(1) = "<22><><EFBFBD>" : sExpression(2) = "<22><><EFBFBD>" ' Japanese
|
||||
' case 82 : ' Korean
|
||||
' case 86 : ' Chinese (simplified)
|
||||
' case 88 : ' Chinese (traditional)
|
||||
case 90 : ' Turkish
|
||||
case 91 : ' Hindi
|
||||
case 96 : ' Arab
|
||||
case 97 : ' Hebrew
|
||||
case else :
|
||||
' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
|
||||
printlog " :-) Will use English instead"
|
||||
sExpression(1) = "Alle" : sExpression(2) = "Allz"
|
||||
'First we need some errornes words to replace. (sExpression)
|
||||
'sExpression(1) has to be 3 times in the document
|
||||
select case iSprache
|
||||
case 01 : sExpression(1) = "Alle" : sExpression(2) = "Allz"
|
||||
case 03 : sExpression(1) = "empreza" : sExpression(2) = "Emperor" ' Portuguese
|
||||
case 07 : qaerrorlog "No files for Russian yet, will use english instead."
|
||||
sExpression(1) = "Alle" : sExpression(2) = "Allz"
|
||||
case 30 : ' Greek
|
||||
case 31 : sExpression(1) = "bedoeling" : sExpression(2) = "Bedoling" ' Netherlands
|
||||
case 33 : sExpression(1) = "projjet" : sExpression(2) = "projete" ' French
|
||||
case 34 : sExpression(1) = "lazsos" : sExpression(2) = "Lazsi" ' Spanish
|
||||
case 35 : ' Finnish
|
||||
case 36 : sExpression(1) = "Bozniai" : sExpression(2) = "Boszniai" ' Hungaria
|
||||
case 37 : ' Catalan
|
||||
case 39 : sExpression(1) = "Presentazione" : sExpression(2) = "Raggazi" ' Italian
|
||||
case 42 : ' Czech
|
||||
case 43 : ' Slowak
|
||||
case 44 : ' English (GB)
|
||||
case 45 : sExpression(1) = "installlere" : sExpression(2) = "installer" ' Danish
|
||||
case 46 : sExpression(1) = "desa" : sExpression(2) = "ased" ' Swedish
|
||||
case 47 : ' Norwegian
|
||||
case 48 : sExpression(1) = "programmu" : sExpression(2) = "programu" ' Polish
|
||||
case 49 : sExpression(1) = "Texxt" : sExpression(2) = "Schrieb" ' German
|
||||
case 55 : sExpression(1) = "esktava" : sExpression(2) = "norte" ' Portuguese (Brazil)
|
||||
case 66 : ' Thai
|
||||
' case 81 : sExpression(1) = "<EFBFBD><EFBFBD><EFBFBD>" : sExpression(2) = "<EFBFBD><EFBFBD><EFBFBD>" ' Japanese
|
||||
' case 82 : ' Korean
|
||||
' case 86 : ' Chinese (simplified)
|
||||
' case 88 : ' Chinese (traditional)
|
||||
case 90 : ' Turkish
|
||||
case 91 : ' Hindi
|
||||
case 96 : ' Arab
|
||||
case 97 : ' Hebrew
|
||||
case else :
|
||||
' Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file"
|
||||
printlog " :-) Will use English instead"
|
||||
sExpression(1) = "Alle" : sExpression(2) = "Allz"
|
||||
end select
|
||||
|
||||
if ((bAsianLan) OR (iSprache = 07)) then
|
||||
@@ -113,61 +113,74 @@ testcase tiEditSearchAndReplace
|
||||
Messagebox.OK
|
||||
end if
|
||||
sleep 2
|
||||
hTypeKeys "<MOD1 HOME>" '/// Select the text ///'
|
||||
|
||||
'/// Edit-Find & Replace I///'
|
||||
EditSearchAndReplace
|
||||
sleep 1
|
||||
Kontext "FindAndReplace"
|
||||
'/// Clap the 'more options'-part open ///'
|
||||
More.Click
|
||||
'/// verify, that search is done without 'similarity search' !!! ///'
|
||||
if SimilaritySearch.IsChecked = TRUE then
|
||||
SimilaritySearch.UnCheck
|
||||
warnlog "'Similar search' checkbox was enabled! It shouldn't be the default!"
|
||||
end if
|
||||
SearchFor.SetText sExpression(1) '/// set Search text ///'
|
||||
ReplaceWith.SetText sExpression(2) '/// set Replace text///'
|
||||
|
||||
'/// Word has to be there ONLY three times ///'
|
||||
SearchNow.Click '/// 1st search for text ///'
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) then
|
||||
Printlog Messagebox.GetText
|
||||
Messagebox.OK
|
||||
end if
|
||||
if Messagebox.Exists(2) then
|
||||
Printlog Messagebox.GetText
|
||||
Messagebox.OK
|
||||
end if
|
||||
sleep 1
|
||||
Kontext "FindAndReplace"
|
||||
|
||||
SearchNow.Click '/// 2nd search for text ///'
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) then
|
||||
Printlog Messagebox.GetText
|
||||
Messagebox.OK
|
||||
end if
|
||||
if Messagebox.Exists(2) then
|
||||
Printlog Messagebox.GetText
|
||||
Messagebox.OK
|
||||
end if
|
||||
sleep 1
|
||||
Kontext "FindAndReplace"
|
||||
|
||||
SearchNow.Click '/// 3th search for text///'
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) then
|
||||
Printlog Messagebox.GetText
|
||||
Messagebox.OK
|
||||
end if
|
||||
if Messagebox.Exists(2) then
|
||||
Printlog Messagebox.GetText
|
||||
Messagebox.OK
|
||||
end if
|
||||
sleep 1
|
||||
Kontext "FindAndReplace"
|
||||
|
||||
SearchNow.Click '/// 4th search for text; but it is no more available!///'
|
||||
sleep 2
|
||||
kontext "Messagebox"
|
||||
if Messagebox.Exists Then
|
||||
Printlog "- The word was found 3 times: '" + messagebox.gettext + "'"
|
||||
Messagebox.OK
|
||||
else
|
||||
SearchNow.Click '/// 5th search for word 1///'
|
||||
kontext
|
||||
if Messagebox.Exists (5) Then
|
||||
Printlog "?: "+Messagebox.gettext
|
||||
Warnlog "- No MsgBox appeared: 'changed'"
|
||||
Warnlog "- No MsgBox appeared: 'changed'"
|
||||
Messagebox.OK
|
||||
endif
|
||||
Warnlog "- No MsgBox appeared: 'changed'"
|
||||
end if
|
||||
|
||||
'/// Replace all ///'
|
||||
Kontext "FindAndReplace"
|
||||
sleep 1
|
||||
ReplaceAll.Click
|
||||
Kontext "Messagebox"
|
||||
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
|
||||
printlog messagebox.gettext
|
||||
qaerrorlog "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
@@ -175,6 +188,7 @@ testcase tiEditSearchAndReplace
|
||||
end if
|
||||
Kontext "FindAndReplace"
|
||||
sleep 2
|
||||
SearchNow.Click '/// Search for word 1 to check if all words are replaced ///'
|
||||
Kontext "Messagebox"
|
||||
if Not Messagebox.Exists then
|
||||
Warnlog " Not all words are replaced (Replace All)"
|
||||
@@ -186,13 +200,17 @@ testcase tiEditSearchAndReplace
|
||||
FindAndReplace.Close
|
||||
sleep 3
|
||||
|
||||
'/// Edit-Find & Replace II ///'
|
||||
gMouseClick 50,50
|
||||
sleep 1
|
||||
hTypeKeys "<MOD1 HOME>"
|
||||
EditSearchAndReplace
|
||||
sleep 1
|
||||
Kontext "FindAndReplace"
|
||||
SearchFor.SetText sExpression(2) '/// Search for word 2 ///'
|
||||
ReplaceWith.SetText sExpression(1) '/// Replace with word 1 ///'
|
||||
|
||||
Replace.Click '/// Replace 1 ///'
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(4) Then
|
||||
Kontext "Messagebox"
|
||||
@@ -204,6 +222,7 @@ testcase tiEditSearchAndReplace
|
||||
Kontext "FindAndReplace"
|
||||
sleep 1
|
||||
|
||||
SearchNow.Click '/// 2nd search for word 2 ///'
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) Then
|
||||
Warnlog " All words got replaced, but only the 1st should have been"
|
||||
@@ -214,6 +233,7 @@ testcase tiEditSearchAndReplace
|
||||
Printlog " Word replaced"
|
||||
end if
|
||||
|
||||
'/// Replace all ///'
|
||||
Kontext "FindAndReplace"
|
||||
ReplaceAll.Click
|
||||
kontext "Messagebox"
|
||||
@@ -223,6 +243,7 @@ testcase tiEditSearchAndReplace
|
||||
Printlog "- No messagebox after replace all"
|
||||
end if
|
||||
|
||||
'/// Search for word 2 to check if all are replaced ///'
|
||||
Kontext "FindAndReplace"
|
||||
SearchNow.Click
|
||||
kontext "Messagebox"
|
||||
@@ -237,98 +258,111 @@ testcase tiEditSearchAndReplace
|
||||
More.Click
|
||||
FindAndReplace.Close
|
||||
sleep 2
|
||||
'/// Close document ///'
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tiEditSearchAndReplace
|
||||
'--------------------------------------------------------
|
||||
testcase tiEditSearchAndReplaceBUGS
|
||||
dim i as integer
|
||||
dim bTemp as boolean
|
||||
|
||||
Call hNewDocument
|
||||
sleep 3
|
||||
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
|
||||
'/// inspired by bugs: 101974, 101975, 101976 ///'
|
||||
dim i as integer
|
||||
dim bTemp as boolean
|
||||
|
||||
for i = 1 to 6
|
||||
Printlog "- " + i + " View->Workspace->... ------------------------------------------------------"
|
||||
try
|
||||
select case i
|
||||
'/// open application ///'
|
||||
Call hNewDocument
|
||||
sleep 3
|
||||
'/// 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"
|
||||
ViewWorkspaceDrawingView
|
||||
ViewWorkspaceDrawingView
|
||||
case 2:Printlog " Outline"
|
||||
ViewWorkspaceOutlineView
|
||||
ViewWorkspaceOutlineView
|
||||
case 3:Printlog " Slides"
|
||||
ViewWorkspaceSlidesView
|
||||
ViewWorkspaceSlidesView
|
||||
case 4:Printlog " Notes"
|
||||
ViewWorkspaceNotesView
|
||||
ViewWorkspaceNotesView
|
||||
case 5:Printlog " Handout"
|
||||
' this is done this way, to regcognize BUGID:101975
|
||||
ViewWorkspaceHandoutView
|
||||
' this is done this way, to regcognize BUGID:101975
|
||||
ViewWorkspaceHandoutView
|
||||
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
|
||||
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
|
||||
catch
|
||||
Warnlog "Couldn't really switch the view :-("
|
||||
endcatch
|
||||
endcatch
|
||||
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
|
||||
select case i
|
||||
case 1:ViewWorkspaceDrawingView
|
||||
case 2:ViewWorkspaceOutlineView
|
||||
case 3:ViewWorkspaceSlidesView
|
||||
case 4:ViewWorkspaceNotesView
|
||||
case 5:ViewWorkspaceHandoutView
|
||||
end select
|
||||
active.ok
|
||||
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
|
||||
sleep 5
|
||||
Kontext "FindAndReplace"
|
||||
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"
|
||||
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
|
||||
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
|
||||
'/// close application ///'
|
||||
Call hCloseDocument
|
||||
|
||||
endcase 'tiEditSearchAndReplaceBUGS
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -40,60 +40,73 @@
|
||||
'\********************************************************************
|
||||
|
||||
testcase tiGruppierung
|
||||
Dim PosX 'Variable fuer PositionX
|
||||
Dim PosX 'Variable fuer PositionX
|
||||
|
||||
sleep 3
|
||||
Kontext "DocumentImpress"
|
||||
sleep 2
|
||||
sleep 1
|
||||
sleep 1
|
||||
sleep 1
|
||||
Call hNewDocument '/// new document ///'
|
||||
sleep 3
|
||||
Kontext "DocumentImpress"
|
||||
sleep 2
|
||||
hRechteckErstellen (20,20,40,40) '/// create rectangle ///'
|
||||
sleep 1
|
||||
hRechteckErstellen (60,60,70,10) '/// create 2nd rectangle ///'
|
||||
sleep 1
|
||||
hRechteckErstellen (50,90,70,40) '/// create 3rd rectangle ///'
|
||||
sleep 1
|
||||
Printlog "- Created 3 rectangles for group testing"
|
||||
if (gApplication = "DRAW") then
|
||||
hOpenContextMenu
|
||||
gMouseClick (50,50) '/// Put the mouse-marker in the middle of the screen ///'
|
||||
EditSelectAll '/// select all rectangles ///'
|
||||
if (gApplication = "DRAW") then
|
||||
hOpenContextMenu
|
||||
sleep(2)
|
||||
hMenuSelectNr(12) ' Select "Group"
|
||||
sleep(2)
|
||||
else
|
||||
endif
|
||||
sleep 1
|
||||
else
|
||||
FormatGroupDraw '/// open context menue and group rectangles ///'
|
||||
endif
|
||||
sleep 1
|
||||
Printlog "- Get position and dimensions of elements"
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
sleep 1
|
||||
PosX=PositionX.GetText
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
Kontext "DocumentImpress"
|
||||
gMouseClick 35,35
|
||||
sleep 1
|
||||
sleep 3
|
||||
try
|
||||
sleep 1
|
||||
Warnlog "- Entering the group, no object within the group should have been selected"
|
||||
catch
|
||||
Printlog "- entered group, nothing selected"
|
||||
endcatch
|
||||
gMouseClick (35,35)
|
||||
gMouseMove (30,30,60,60)
|
||||
sleep 1
|
||||
Printlog "- Exit group"
|
||||
' sleep 1
|
||||
' hMenuSelectNr (13)
|
||||
' would be better to call the slot TBO!
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
sleep 1
|
||||
if PosX = PositionX.GetText then
|
||||
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
|
||||
ContextPositionAndSize '/// get dimensions of group ///'
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
sleep 1
|
||||
PosX=PositionX.GetText
|
||||
TabPositionAndSize.OK
|
||||
sleep 1
|
||||
Kontext "DocumentImpress"
|
||||
gMouseClick 35,35
|
||||
sleep 1
|
||||
hTypeKeys "<F3>" '/// entering group using key "F3" ///'
|
||||
sleep 3
|
||||
try
|
||||
EditCut '/// cut rectangle out of document ///'
|
||||
sleep 1
|
||||
Warnlog "- Entering the group, no object within the group should have been selected"
|
||||
catch
|
||||
Printlog "- entered group, nothing selected"
|
||||
endcatch
|
||||
gMouseClick (35,35)
|
||||
gMouseMove (30,30,60,60)
|
||||
sleep 1
|
||||
Printlog "- Exit group"
|
||||
' DocumentImpress.OpenContextMenu '/// leave group, compare dimensions ///'
|
||||
' sleep 1
|
||||
' hMenuSelectNr (13)
|
||||
hTypeKeys "<mod1 F3>" '/// exit group using key "strg F3" ///'
|
||||
' would be better to call the slot TBO!
|
||||
ContextPositionAndSize
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabPositionAndSize
|
||||
Kontext "TabPositionAndSize"
|
||||
sleep 1
|
||||
if PosX = PositionX.GetText then
|
||||
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
|
||||
|
@@ -41,108 +41,125 @@
|
||||
'\*************************************************************************************
|
||||
|
||||
testcase tEditImageMap
|
||||
Kontext "ImageMapEditor"
|
||||
sleep 1
|
||||
printlog "ImageMap editor exists"
|
||||
DialogTest ( ImageMapEditor )
|
||||
try
|
||||
Call hNewDocument '/// new document ///'
|
||||
EditImageMap '/// edit image map ///'
|
||||
Kontext "ImageMapEditor"
|
||||
sleep 1
|
||||
if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
|
||||
printlog "ImageMap editor exists"
|
||||
DialogTest ( ImageMapEditor )
|
||||
try
|
||||
ImageMapEditor.Close
|
||||
Printlog "ImageMap closed"
|
||||
catch
|
||||
catch
|
||||
EditImageMap
|
||||
Printlog "ImageMap closed using the edit-menu entry"
|
||||
endcatch
|
||||
else
|
||||
sleep 2
|
||||
DialogTest ( ImageMapEditor )
|
||||
try
|
||||
endcatch
|
||||
else
|
||||
sleep 2
|
||||
DialogTest ( ImageMapEditor )
|
||||
try
|
||||
ImageMapEditor.Close
|
||||
Printlog "ImageMap closed"
|
||||
catch
|
||||
catch
|
||||
EditImageMap
|
||||
Printlog "ImageMap closed using the edit-menu entry"
|
||||
endcatch
|
||||
end if
|
||||
endcase
|
||||
|
||||
endcatch
|
||||
end if
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tEditImageMap
|
||||
'------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
testcase tEditImageMapProperties
|
||||
|
||||
qaerrorlog "test not yet ready."
|
||||
goto endsub
|
||||
Call hNewDocument '/// new document ///'
|
||||
InsertGraphicsFromFile '/// Insert a graphic and select it ///'
|
||||
sleep (1)
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep (2)
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\SaveAsPicture\SaveAsPicture.pcx")
|
||||
sleep (2)
|
||||
Oeffnen.Click
|
||||
sleep (2)
|
||||
sleep (2)
|
||||
Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\SaveAsPicture\SaveAsPicture.pcx")
|
||||
sleep (2)
|
||||
Oeffnen.Click
|
||||
sleep (2)
|
||||
EditImageMap '/// Open the image map dialog ///'
|
||||
Kontext "ImageMapEditor"
|
||||
sleep (1)
|
||||
if ImageMapEditor.Exists (2) then '/// test dialog controls ///'
|
||||
printlog "ImageMap editor exists"
|
||||
else
|
||||
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"
|
||||
sleep (1)
|
||||
printlog "ImageMap editor exists"
|
||||
else
|
||||
warnlog "Something is wrong, the Imagemap didn't show up."
|
||||
end if
|
||||
if ImageMapEditor.Exists (2) then
|
||||
printlog "ImageMap editor exists"
|
||||
else
|
||||
warnlog "Something is wrong, the ImageMap Editor didn't show up."
|
||||
end if
|
||||
|
||||
Dokument.MouseDown 50,50
|
||||
Dokument.MouseMove 50,50,10,10
|
||||
Dokument.MouseUp 10,10
|
||||
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
|
||||
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
|
||||
|
||||
Frame.SetText "http://www.framed.com"
|
||||
Objectname.SetText "This is a strange name: Huckillerry Bohaahw"
|
||||
Alternativetext.SetText "Alternative, the only way to fly..."
|
||||
Description.SetText "Just a Foney-text... or whatever it's called."
|
||||
kontext "ImageMapEditor"
|
||||
Zuweisen.Click
|
||||
sleep (1)
|
||||
ImageMapEditor.Close
|
||||
|
||||
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
|
||||
'/// Check if the entries we set before has remained the same, with one exception: cnn.com should now have a slash after it. ///'
|
||||
if URL.GetText <> "http://www.cnn.com/" then warnlog "URL should have been: http://www.cnn.com/ . But was " + URL.GetText
|
||||
' if Frame.GetSelText <> "http://www.framed.com" then warnlog "Frame should have been: http://www.framed.com. But was " + Frame.GetSelText
|
||||
if Objectname.GetText <> "This is a strange name: Huckillerry Bohaahw" then warnlog "Objectname. should have been: This is a strange name: Huckillerry Bohaahw. But was " + Objectname.GetText
|
||||
if Alternativetext.GetText <> "Alternative, the only way to fly..." then warnlog "Alternativetext should have been: . But was " + Alternativetext.GetText
|
||||
if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText
|
||||
sleep (1)
|
||||
if Description.GetText <> "Just a Foney-text... or whatever it's called." then warnlog "Description. should have been: . But was " + Description.GetText
|
||||
ImageMapHyperlink.Ok '/// Close the Properties-Dialogue ///'
|
||||
sleep (1)
|
||||
|
||||
kontext "ImageMapEditor"
|
||||
Zuweisen.Click
|
||||
sleep (1)
|
||||
ImageMapEditor.Close
|
||||
sleep (1)
|
||||
kontext "ImageMapEditor"
|
||||
Zuweisen.Click
|
||||
sleep (1)
|
||||
ImageMapEditor.Close
|
||||
sleep (1)
|
||||
|
||||
Call hCloseDocument '/// close document ///'
|
||||
|
||||
endcase 'tEditImageMapProperties
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@@ -39,8 +39,8 @@
|
||||
' #1 tiFormatLine
|
||||
' #1 tLineConnect
|
||||
'\*************************************************************************************
|
||||
|
||||
testcase tiFormatLine
|
||||
|
||||
Dim ZaehlerStil
|
||||
Dim ZaehlerFarbe
|
||||
Dim ZaehlerTransp
|
||||
@@ -49,66 +49,85 @@ testcase tiFormatLine
|
||||
Dim k 'Variable fuer Transparenz (Anzahl)
|
||||
Dim l
|
||||
Dim ZaehlerStilLinks
|
||||
|
||||
|
||||
Call hNewDocument '/// New impress document
|
||||
sleep 3
|
||||
Call hRechteckErstellen (10,10,60,60) '/// create rectangle
|
||||
sleep 2
|
||||
FormatLine '/// open Format line dialog
|
||||
Kontext
|
||||
Active.SetPage TabLinie '///Open TabLine Tabpage
|
||||
Kontext "TabLinie"
|
||||
sleep 2
|
||||
Stil.GetItemCount '/// Get item count for style ///'
|
||||
Farbe.GetItemCount '/// Get item count for color ///'
|
||||
Breite.More 1 '/// change value for ///'
|
||||
ZaehlerStil = Stil.GetItemCount
|
||||
ZaehlerFarbe = Farbe.GetItemCount
|
||||
|
||||
wait 10
|
||||
Stil.Select i
|
||||
wait 10
|
||||
|
||||
for i=1 to ZaehlerStil '/// Apply every style to the rectangle ///'
|
||||
wait 10
|
||||
Stil.Select i
|
||||
wait 10
|
||||
TabLinie.OK '/// Closing dialog with ok
|
||||
' Kontext "DocumentImpress"
|
||||
FormatLine '///Open TabLine Tabpage
|
||||
Kontext
|
||||
Active.SetPage TabLinie
|
||||
Kontext "TabLinie"
|
||||
next i
|
||||
|
||||
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
|
||||
Active.SetPage TabLinie
|
||||
Active.SetPage TabLinie '/// TabLine ///'
|
||||
Kontext "TabLinie"
|
||||
next i
|
||||
|
||||
PrintLog "-- " + Farbe.GetSelText
|
||||
wait 10
|
||||
Farbe.Select j
|
||||
wait 10
|
||||
TabLinie.OK
|
||||
' Kontext "DocumentImpress"
|
||||
FormatLine
|
||||
Kontext
|
||||
Active.SetPage TabLinie
|
||||
Kontext "TabLinie"
|
||||
next j
|
||||
Breite.Less 2
|
||||
for k=1 to 6
|
||||
next k
|
||||
TabLinie.OK
|
||||
'---------------------------------------
|
||||
sleep 2
|
||||
sleep 2
|
||||
sleep 2
|
||||
FormatLine
|
||||
|
||||
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
|
||||
StilLinks.GetItemCount
|
||||
ZaehlerStilLinks=StilLinks.GetItemCount
|
||||
for l=1 to ZaehlerStilLinks '/// Apply all line end styles///'
|
||||
wait 10
|
||||
if EndenSynchronisieren.IsChecked=False Then EndenSynchronisieren.Check '/// check synchronize ///'
|
||||
wait 10
|
||||
StilLinks.Select l
|
||||
if StilLinks.GetSelText<>StilRechts.GetSelText Then
|
||||
WarnLog " Ends not synchronized. " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText '/// check if style is automatically applied for both ends ///'
|
||||
else
|
||||
PrintLog " Left: " + StilLinks.GetSelText + " Right: " + StilRechts.GetSelText
|
||||
end if
|
||||
EndenSynchronisieren.UnCheck
|
||||
next l
|
||||
ZentriertLinks.Check
|
||||
if ZentriertRechts.isChecked = True Then PrintLog " Centered right does work"
|
||||
i = CornerStyle.GetItemCount
|
||||
if i <> 4 then warnlog "CornerStyle should contain four options, but currently has: " + i
|
||||
for i = 1 to 4
|
||||
CornerStyle.Select i
|
||||
if CornerStyle.GetSelIndex <> i then warnlog "Corner Styles was: " + CornerStyle.GetSelIndex + ", should have been " + i
|
||||
Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText
|
||||
Printlog "Corner Style nr: " + i + " = " + CornerStyle.GetSelText
|
||||
next i
|
||||
TabLinie.OK
|
||||
'------------------------------------------
|
||||
@@ -117,12 +136,15 @@ for i = 1 to 4
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
Hinzufuegen.Click '/// Add new line style ///'
|
||||
Kontext "NameDlg"
|
||||
Eingabefeld.SetText "Testlinie2" '/// insert name of style (Testlinie2) ///'
|
||||
NameDlg.OK
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
Loeschen.Click '/// delete created style ///'
|
||||
Kontext "Active"
|
||||
Active.Yes
|
||||
Kontext
|
||||
@@ -135,148 +157,169 @@ for i = 1 to 4
|
||||
LaengeLinks.More 3
|
||||
LaengeRechts.More 3
|
||||
Abstand.SetText "0,1"
|
||||
if AnLinienbreite.IsChecked = True Then AnLinienbreite.Click '/// all fields changed in TabLinienstile ///'
|
||||
PrintLog " All controls could be manipulated."
|
||||
TypLinks.Select 1
|
||||
TypRechts.Select 1
|
||||
WarnLog " A point where you can change its length is not a point anymore"
|
||||
else
|
||||
end if
|
||||
sleep 1
|
||||
try
|
||||
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"
|
||||
if LaengeLinks.IsEnabled And LaengeRechts.IsEnabled =True Then '/// check if its possible to apply a length to a point ///'
|
||||
WarnLog " A point where you can change its length is not a point anymore"
|
||||
else
|
||||
PrintLog " Line style pint tested" '/// All styles for points are changed ///'
|
||||
end if
|
||||
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
|
||||
end if
|
||||
endcatch
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
sleep 1
|
||||
TabLinienstile.OK
|
||||
'--------------------------------------------
|
||||
sleep 2
|
||||
sleep 2
|
||||
FormatLine
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
sleep 2
|
||||
Kontext "Linienstil"
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
sleep 1
|
||||
Liste.GetItemCount
|
||||
Liste.Select 3
|
||||
Kontext "NameDlg"
|
||||
NameDlg.OK
|
||||
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
Kontext "Active"
|
||||
Printlog Active.GetText
|
||||
Active.OK
|
||||
Kontext "NameDlg"
|
||||
Eingabefeld.SetText Eingabefeld.GetText + "1"
|
||||
PrintLog " Name inserted"
|
||||
NameDlg.OK
|
||||
|
||||
Kontext
|
||||
if active.GetRt=304 then
|
||||
active.ok
|
||||
Kontext "NameDlg"
|
||||
Eingabefeld.SetText Eingabefeld.GetText + "1"
|
||||
PrintLog " Name inserted"
|
||||
NameDlg.OK
|
||||
endif
|
||||
if active.GetRt=304 then
|
||||
active.ok
|
||||
warnlog "still not a valid name :-("
|
||||
endif
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
Kontext "Active"
|
||||
Active.Yes
|
||||
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
sleep 1
|
||||
sleep 1
|
||||
Kontext "SpeichernDlg"
|
||||
sleep 1
|
||||
SpeichernDlg.Cancel
|
||||
|
||||
Kontext "TabLinienenden"
|
||||
TabLinienenden.Cancel
|
||||
sleep 2
|
||||
|
||||
'sleep 2
|
||||
'sleep 2
|
||||
|
||||
'kontext "Toolbar"
|
||||
'Kurven.Click
|
||||
'sleep 1
|
||||
'if (gApplication = "DRAW") then
|
||||
' Kontext "DocumentDraw"
|
||||
' gMouseMove (30,50, 40,60)
|
||||
' sleep 1
|
||||
'else
|
||||
' Kontext "DocumentImpress"
|
||||
' gMouseMove (30,50, 40,60)
|
||||
' sleep 1
|
||||
'endif
|
||||
'FormatLine
|
||||
'Kontext
|
||||
'Active.SetPage TabSchatten
|
||||
|
||||
' FormatLine.Cancel
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
TabLinienstile.OK
|
||||
sleep 2
|
||||
FormatLine
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
try
|
||||
Aendern.Click
|
||||
catch
|
||||
Hinzufuegen.Click
|
||||
endcatch
|
||||
Kontext "NameDlg"
|
||||
if Eingabefeld.GetText <> GetClipboardText Then WarnLog "No changes for Line style" '/// check if changed style is in list ///'
|
||||
NameDlg.Cancel
|
||||
sleep 2
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
sleep 1
|
||||
try
|
||||
Loeschen.Click '/// delete changed style ///'
|
||||
Kontext "Active"
|
||||
Active.Yes
|
||||
sleep 3
|
||||
catch
|
||||
if Linienstile.GetItemCount = 0 Then
|
||||
Hinzufuegen.Click
|
||||
Kontext "NameDlg"
|
||||
sleep 1
|
||||
Eingabefeld.SetText "Delete"
|
||||
NameDlg.OK
|
||||
end if
|
||||
endcatch
|
||||
Kontext
|
||||
Active.SetPage TabLinienstile
|
||||
Kontext "TabLinienstile"
|
||||
sleep 1
|
||||
TabLinienstile.OK
|
||||
'--------------------------------------------
|
||||
sleep 2
|
||||
Call hRechteckErstellen (40,40,80,50) '/// create rectangle ///'
|
||||
sleep 2
|
||||
FormatLine
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
sleep 2
|
||||
Kontext "Linienstil"
|
||||
if Linienstil.Exists then Aendern.Click '/// change style ///'
|
||||
sleep 1
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
sleep 1
|
||||
Liste.GetItemCount
|
||||
Liste.Select 3
|
||||
Hinzufuegen.Click '/// add style ///'
|
||||
Kontext "NameDlg"
|
||||
NameDlg.OK
|
||||
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
Aendern.Click '/// change style ///'
|
||||
Kontext "Active"
|
||||
Printlog Active.GetText
|
||||
Active.OK
|
||||
Kontext "NameDlg"
|
||||
Eingabefeld.SetText Eingabefeld.GetText + "1"
|
||||
PrintLog " Name inserted"
|
||||
NameDlg.OK
|
||||
|
||||
Kontext
|
||||
if active.GetRt=304 then
|
||||
active.ok
|
||||
Kontext "NameDlg"
|
||||
Eingabefeld.SetText Eingabefeld.GetText + "1"
|
||||
PrintLog " Name inserted"
|
||||
NameDlg.OK
|
||||
endif
|
||||
if active.GetRt=304 then
|
||||
active.ok
|
||||
warnlog "still not a valid name :-("
|
||||
endif
|
||||
Kontext
|
||||
Active.SetPage TabLinienenden
|
||||
Kontext "TabLinienenden"
|
||||
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
|
||||
|
||||
'-------------------------------------------------------------------------------'
|
||||
testcase tLineConnect
|
||||
|
||||
@@ -287,55 +330,58 @@ testcase tLineConnect
|
||||
Dim i as integer
|
||||
Dim cname as string
|
||||
Dim cfirst as integer
|
||||
|
||||
if bAsianLan then
|
||||
QaErrorLog "tLineConnect ends because Asian languages are not fully supported."
|
||||
goto Endsub
|
||||
|
||||
if bAsianLan then
|
||||
QaErrorLog "tLineConnect ends because Asian languages are not fully supported."
|
||||
goto Endsub
|
||||
end if
|
||||
|
||||
|
||||
Call hNewDocument '/// New Impress / Draw document ///'
|
||||
sleep 3
|
||||
kontext "GraphicObjectbar"
|
||||
if GraphicObjectbar.Exists then
|
||||
if GraphicObjectbar.isDocked = False then
|
||||
GraphicObjectbar.Move 900,900
|
||||
endif
|
||||
if GraphicObjectbar.isDocked = False then
|
||||
GraphicObjectbar.Move 900,900
|
||||
endif
|
||||
endif
|
||||
kontext "Gluepointsobjectbar"
|
||||
if Gluepointsobjectbar.Exists then
|
||||
if Gluepointsobjectbar.isDocked = false then
|
||||
Gluepointsobjectbar.Move 900,900
|
||||
endif
|
||||
if Gluepointsobjectbar.isDocked = false then
|
||||
Gluepointsobjectbar.Move 900,900
|
||||
endif
|
||||
endif
|
||||
kontext "Optionsbar"
|
||||
if Optionsbar.Exists then
|
||||
if Optionsbar.isDocked = false then
|
||||
Optionsbar.Move 900,900
|
||||
end if
|
||||
if Optionsbar.isDocked = false then
|
||||
Optionsbar.Move 900,900
|
||||
end if
|
||||
endif
|
||||
|
||||
|
||||
'/// Create 2 lines ///'
|
||||
kontext "Toolbar"
|
||||
Kurven.Click
|
||||
sleep 1
|
||||
if (gApplication = "DRAW") then
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (30,50, 40,60)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Kurven.Click
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (70,50, 60,60)
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (30,50, 40,60)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Kurven.Click
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (70,50, 60,60)
|
||||
else
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (30,50, 40,60)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Kurven.Click
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (70,50, 60,60)
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (30,50, 40,60)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Kurven.Click
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (70,50, 60,60)
|
||||
endif
|
||||
|
||||
|
||||
printlog "'" + (gApplication) +"'"
|
||||
|
||||
|
||||
'/// Check the amount of objects ///'
|
||||
gMouseClick (10, 10)
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
@@ -346,8 +392,8 @@ testcase tLineConnect
|
||||
kontext "DocumentDraw"
|
||||
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
|
||||
endif
|
||||
if bAsianLan then
|
||||
value1 = left(StatusBarText,(InStr(StatusBarText, "2" )))
|
||||
if bAsianLan then
|
||||
value1 = left(StatusBarText,(InStr(StatusBarText, "2" )))
|
||||
if value1 <> 2 then
|
||||
warnlog "UH? There is supposed to be two objects visible, but was: " + value1 + " and the StatusBarText said: " + StatusBarText + "."
|
||||
end if
|
||||
@@ -358,117 +404,130 @@ testcase tLineConnect
|
||||
warnlog "UH? There is supposed to be two objects visible, but we found " + value1 + " objects."
|
||||
end if
|
||||
end if
|
||||
|
||||
|
||||
'/// Connect the two objects selected ///'
|
||||
hOpenContextMenu
|
||||
sleep 1
|
||||
hMenuSelectNr(13)
|
||||
sleep 1
|
||||
'/// Check the amount of objects ///'
|
||||
gMouseClick (10, 10)
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
if (gApplication = "IMPRESS") then
|
||||
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
|
||||
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
|
||||
else
|
||||
kontext "DocumentDraw"
|
||||
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
|
||||
kontext "DocumentDraw"
|
||||
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
|
||||
endif
|
||||
value2 = left(StatusBarText,1)
|
||||
printlog "StatusBarText was: " + StatusBarText
|
||||
|
||||
|
||||
'/// if same as the first value = wrong ///'
|
||||
if value1 = value2 then
|
||||
warnlog "Expected to find one object, but found " + value2 + " instead."
|
||||
warnlog "Expected to find one object, but found " + value2 + " instead."
|
||||
endif
|
||||
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
|
||||
|
||||
|
||||
'/// unmark the objects, thereafter mark them again ///'
|
||||
gMouseClick (10, 10)
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
'/// Break them from eachother ///'
|
||||
hOpenContextMenu
|
||||
sleep 1
|
||||
hMenuSelectNr(11)
|
||||
sleep 1
|
||||
'/// unmark the objects, thereafter mark them again ///'
|
||||
gMouseClick (10, 10)
|
||||
sleep 1
|
||||
EditSelectAll
|
||||
sleep 1
|
||||
'/// Check the amount of objects ///'
|
||||
if (gApplication = "IMPRESS") then
|
||||
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
|
||||
StatusBarText = DocumentImpress.StatusGetText(DocumentImpress.StatusGetItemID(1))
|
||||
else
|
||||
kontext "DocumentDraw"
|
||||
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
|
||||
kontext "DocumentDraw"
|
||||
StatusBarText = DocumentDraw.StatusGetText(DocumentDraw.StatusGetItemID(1))
|
||||
endif
|
||||
value3 = left(StatusBarText,1)
|
||||
|
||||
|
||||
printlog "StatusBarText was: " + StatusBarText
|
||||
|
||||
|
||||
'/// if the same as any of the ones before: Wrong ///'
|
||||
if (value3 = value1 OR value3 = value2) then
|
||||
warnlog "Expected to find three objects, but found " + value3 + " instead."
|
||||
warnlog "Expected to find three objects, but found " + value3 + " instead."
|
||||
endif
|
||||
|
||||
|
||||
'/// if 3 objects, then everything is ok ///'
|
||||
if value3 = 3 then
|
||||
printlog "Found three objects. Means the test was successful."
|
||||
printlog "Found three objects. Means the test was successful."
|
||||
else
|
||||
warnlog "Wrong value, expected three objects, but found " + value3 + "."
|
||||
warnlog "Wrong value, expected three objects, but found " + value3 + "."
|
||||
endif
|
||||
|
||||
|
||||
|
||||
'/// Go through the different Corner-styles ///'
|
||||
|
||||
hOpenContextMenu
|
||||
hMenuSelectNr(2) 'Choose "Line"
|
||||
|
||||
|
||||
Kontext "TabLinie"
|
||||
cfirst = CornerStyle.GetSelIndex
|
||||
|
||||
|
||||
For i = 1 to CornerStyle.GetItemCount
|
||||
Kontext "TabLinie"
|
||||
if (i > 1) AND (cname <> CornerStyle.GetSelText) then
|
||||
warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText
|
||||
endif
|
||||
CornerStyle.Select i
|
||||
cname = CornerStyle.GetSelText
|
||||
Printlog " Found and selected Corner-Style: " + cname
|
||||
TabLinie.Ok
|
||||
sleep 1
|
||||
hOpenContextMenu
|
||||
hMenuSelectNr(2) 'Choose "Line"
|
||||
Kontext "TabLinie"
|
||||
if (i > 1) AND (cname <> CornerStyle.GetSelText) then
|
||||
warnlog "Cornerstylename wasnt saved. Should have been: " + cname + ". But was: " + CornerStyle.GetSelText
|
||||
endif
|
||||
CornerStyle.Select i
|
||||
cname = CornerStyle.GetSelText
|
||||
Printlog " Found and selected Corner-Style: " + cname
|
||||
TabLinie.Ok
|
||||
sleep 1
|
||||
hOpenContextMenu
|
||||
hMenuSelectNr(2) 'Choose "Line"
|
||||
Next i
|
||||
|
||||
|
||||
Kontext "TabLinie"
|
||||
CornerStyle.Select cfirst
|
||||
TabLinie.Ok
|
||||
|
||||
|
||||
'/// And a nice finish to make life a bit happier for anyone who looks at the test ///'
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
if (gApplication = "DRAW") then
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (40,40, 50,30)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (51,40, 61,30)
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (48,43, 53,50)
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (40,40, 50,30)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (51,40, 61,30)
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentDraw"
|
||||
gMouseMove (48,43, 53,50)
|
||||
else
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (40,40, 50,30)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (51,40, 61,30)
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (48,43, 53,50)
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (40,40, 50,30)
|
||||
sleep 1
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (51,40, 61,30)
|
||||
kontext "Toolbar"
|
||||
Ellipsen.Click
|
||||
Kontext "DocumentImpress"
|
||||
gMouseMove (48,43, 53,50)
|
||||
endif
|
||||
gMouseClick (10, 10)
|
||||
'/// Close the document ///'
|
||||
hCloseDocument
|
||||
'/// Endcase ///'
|
||||
|
||||
endcase 'tiLineConnect
|
||||
|
||||
'-------------------------------------------------------------------------------'
|
||||
|
@@ -50,121 +50,137 @@
|
||||
' #1 tSaveLoadLayoutChart
|
||||
' #1 tSaveLoadLayoutSpreadsheet
|
||||
'\*************************************************************************************
|
||||
|
||||
testcase tFileOpenSaveEtc
|
||||
Dim Dokument$
|
||||
Dim Dokument2$
|
||||
Dim Dokument$
|
||||
Dim Dokument2$
|
||||
|
||||
Dokument$ = ConvertPath ( gOfficePath + "user\work\test1")
|
||||
Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2")
|
||||
Dokument$ = ConvertPath ( gOfficePath + "user\work\test1")
|
||||
Dokument2$ = ConvertPath ( gOfficePath + "user\work\test1_2")
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp")
|
||||
if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg")
|
||||
'/// delete previous created documents: 'user\\work\\test1*.od?' ///'
|
||||
if Dir (Dokument$ + ".odp") <> "" then kill (Dokument$ + ".odp")
|
||||
if Dir (Dokument2$ + ".odg") <> "" then kill (Dokument2$ + ".odg")
|
||||
|
||||
hNewDocument
|
||||
gMouseclick 90,90
|
||||
Call hTextrahmenErstellen ( "This is a test",20,20,40,30 )
|
||||
hFileSaveAsKill (Dokument$ + "." + ExtensionString)
|
||||
Sleep 10
|
||||
hCloseDocument
|
||||
printlog "- Document Saved and Closed"
|
||||
'/// open application ///'
|
||||
hNewDocument
|
||||
gMouseclick 90,90
|
||||
'/// create a textframe with content ///'
|
||||
Call hTextrahmenErstellen ( "This is a test",20,20,40,30 )
|
||||
'/// save file as 'test1' ///'
|
||||
hFileSaveAsKill (Dokument$ + "." + ExtensionString)
|
||||
Sleep 10
|
||||
'/// close Document ///'
|
||||
hCloseDocument
|
||||
printlog "- Document Saved and Closed"
|
||||
|
||||
hFileOpen (Dokument$ + "." + ExtensionString)
|
||||
'/// load document 'test1' ///'
|
||||
hFileOpen (Dokument$ + "." + ExtensionString)
|
||||
|
||||
Sleep 10
|
||||
hCloseDocument
|
||||
printlog "- document Loaded and closed"
|
||||
Sleep 10
|
||||
hFileOpen (Dokument$ + "." + ExtensionString)
|
||||
' check if the document is writable
|
||||
if fIsDocumentWritable = false then
|
||||
' make the document writable and check if it's succesfull
|
||||
if fMakeDocumentWritable = false then
|
||||
warnlog "The document can't be make writeable. Test stopped."
|
||||
goto endsub
|
||||
endif
|
||||
endif
|
||||
Sleep 10
|
||||
gMouseclick 90,90
|
||||
Call hTextrahmenerstellen ( "Change",60,60,80,80 )
|
||||
FileClose
|
||||
Kontext ' message about 'something changed should i [overwrite discard cancel]?'
|
||||
if Messagebox.exists (5) then
|
||||
printlog "2:"+messagebox.gettext
|
||||
Messagebox.Cancel
|
||||
else
|
||||
Warnlog "Mesagebox is missing :-("
|
||||
endif
|
||||
printlog "- Document loaded, changed and closed discarding all changes"
|
||||
|
||||
printlog "- Last version"
|
||||
try
|
||||
catch
|
||||
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
|
||||
|
||||
'********************************************************************************************
|
||||
Sleep 10
|
||||
'/// close Document ///'
|
||||
hCloseDocument
|
||||
printlog "- document Loaded and closed"
|
||||
Sleep 10
|
||||
'/// load document 'test1' ///'
|
||||
hFileOpen (Dokument$ + "." + ExtensionString)
|
||||
' check if the document is writable
|
||||
if fIsDocumentWritable = false then
|
||||
' make the document writable and check if it's succesfull
|
||||
if fMakeDocumentWritable = false then
|
||||
warnlog "The document can't be make writeable. Test stopped."
|
||||
goto endsub
|
||||
endif
|
||||
endif
|
||||
Sleep 10
|
||||
gMouseclick 90,90
|
||||
'/// create another textbox with content ///'
|
||||
Call hTextrahmenerstellen ( "Change",60,60,80,80 )
|
||||
'/// File->Close needn't work, just say CANCEL to the question about saving changes! ///'
|
||||
FileClose
|
||||
Kontext ' message about 'something changed should i [overwrite discard cancel]?'
|
||||
if Messagebox.exists (5) then
|
||||
printlog "2:"+messagebox.gettext
|
||||
Messagebox.Cancel
|
||||
else
|
||||
Warnlog "Mesagebox is missing :-("
|
||||
endif
|
||||
printlog "- Document loaded, changed and closed discarding all changes"
|
||||
|
||||
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
|
||||
|
||||
qaerrorlog "#i88163#, File/properties/user defined fields get mixed up."
|
||||
goto endsub
|
||||
Call hNewDocument
|
||||
@@ -322,146 +338,161 @@ testcase tFileOpenImport
|
||||
endcase
|
||||
|
||||
'********************************************************************************************
|
||||
|
||||
testcase tTestDXF255CharBug
|
||||
dim q as integer
|
||||
call hNewDocument
|
||||
sleep 1
|
||||
kontext "Active"
|
||||
sleep 1
|
||||
|
||||
'/// tries to load a DXF-document which has a string-leght of 255 characters. ///'
|
||||
dim q as integer
|
||||
call hNewDocument
|
||||
InsertGraphicsFromFile '/// insert graphic ///'
|
||||
sleep 1
|
||||
kontext "Active"
|
||||
sleep 1
|
||||
if Active.Exists Then
|
||||
Active.OK
|
||||
Active.OK
|
||||
end if
|
||||
sleep 1
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
|
||||
Oeffnen.Click
|
||||
Sleep 2
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
'/// Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf")) ///'
|
||||
Dateiname.SetText (ConvertPath (gTesttoolpath + "graphics\required\input\255chars.dxf"))
|
||||
Oeffnen.Click
|
||||
Sleep 2
|
||||
|
||||
if gApplication = "DRAW" then
|
||||
Kontext "Documentdraw"
|
||||
if Documentdraw.exists(5) then
|
||||
Documentdraw.TypeKeys ("<Tab>")
|
||||
else
|
||||
warnlog "Not loaded in draw"
|
||||
endif
|
||||
else '(Impress)
|
||||
Kontext "DocumentImpress"
|
||||
if DocumentImpress.exists(5) then
|
||||
DocumentImpress.TypeKeys ("<Tab>")
|
||||
else
|
||||
warnlog "Not loaded in impress"
|
||||
endif
|
||||
endif
|
||||
|
||||
try
|
||||
ContextPositionAndSize
|
||||
kontext
|
||||
messagebox.setpage TabPositionAndSize
|
||||
sleep 1
|
||||
TabPositionAndSize.Close
|
||||
catch
|
||||
warnlog "DXF-Document could not be loaded :-("
|
||||
endcatch
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
if gApplication = "DRAW" then
|
||||
Kontext "Documentdraw"
|
||||
if Documentdraw.exists(5) then
|
||||
Documentdraw.TypeKeys ("<Tab>")
|
||||
else
|
||||
warnlog "Not loaded in draw"
|
||||
endif
|
||||
else '(Impress)
|
||||
Kontext "DocumentImpress"
|
||||
if DocumentImpress.exists(5) then
|
||||
DocumentImpress.TypeKeys ("<Tab>")
|
||||
else
|
||||
warnlog "Not loaded in impress"
|
||||
endif
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
dim i as integer
|
||||
dim Dokument1$
|
||||
dim Dokument2$
|
||||
dim SavedActiveMessage as string
|
||||
dim found as boolean
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
|
||||
Dokument1$ = ConvertPath ( gOfficePath + "user\work\test1." & 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$
|
||||
if Dir (Dokument2$) <> "" then kill Dokument2$
|
||||
'/// open application ///'
|
||||
hNewDocument
|
||||
gMouseclick 90,90
|
||||
'/// create a textframe with content ///'
|
||||
Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 )
|
||||
'/// save file as 'test1.odp' ///'
|
||||
hFileSaveAsKill (Dokument1$)
|
||||
Sleep 10
|
||||
'/// close Document ///'
|
||||
hCloseDocument
|
||||
printlog "- Document 'test1.odp' Saved and Closed"
|
||||
|
||||
hNewDocument
|
||||
gMouseclick 90,90
|
||||
Call hTextrahmenErstellen ( "This is the first file",20,20,40,30 )
|
||||
hFileSaveAsKill (Dokument1$)
|
||||
Sleep 10
|
||||
hCloseDocument
|
||||
printlog "- Document 'test1.odp' Saved and Closed"
|
||||
'/// open application again ///'
|
||||
hNewDocument
|
||||
gMouseclick 90,90
|
||||
'/// create another textframe with content ///'
|
||||
Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 )
|
||||
'/// save file as 'test2.odp' ///'
|
||||
hFileSaveAsKill (Dokument2$)
|
||||
Sleep 10
|
||||
'/// close Document ///'
|
||||
hCloseDocument
|
||||
printlog "- Document 'test2.odp' Saved and Closed"
|
||||
|
||||
hNewDocument
|
||||
gMouseclick 90,90
|
||||
Call hTextrahmenErstellen ( "This is the second file",20,20,40,30 )
|
||||
hFileSaveAsKill (Dokument2$)
|
||||
Sleep 10
|
||||
hCloseDocument
|
||||
printlog "- Document 'test2.odp' Saved and Closed"
|
||||
'/// Delete the first file ///'
|
||||
try
|
||||
kill Dokument1$
|
||||
Printlog " Correctly deleted the file: " + Dokument1$
|
||||
catch
|
||||
warnlog "Could not delete the file: " + Dokument1$
|
||||
endcatch
|
||||
|
||||
try
|
||||
kill Dokument1$
|
||||
Printlog " Correctly deleted the file: " + Dokument1$
|
||||
catch
|
||||
warnlog "Could not delete the file: " + Dokument1$
|
||||
endcatch
|
||||
|
||||
Kontext "AutopilotPraesentation1"
|
||||
sleep 5
|
||||
Existingpresentation.Check
|
||||
sleep 5
|
||||
kontext "active"
|
||||
if active.exists then
|
||||
SavedActiveMessage = Active.GetText
|
||||
QaErrorLog "Message: " + SavedActiveMessage
|
||||
active.ok
|
||||
Kontext "AutopilotPraesentation1"
|
||||
if Existinglist.GetSelText = "test1.odp" then
|
||||
warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
|
||||
endif
|
||||
SavedActiveMessage = ""
|
||||
endif
|
||||
Kontext "AutopilotPraesentation1"
|
||||
Existinglist.TypeKeys "<HOME>"
|
||||
sleep 5
|
||||
found = false
|
||||
for i = 1 to Existinglist.GetItemCount
|
||||
kontext "active"
|
||||
if active.exists then
|
||||
SavedActiveMessage = Active.GetText
|
||||
active.ok
|
||||
endif
|
||||
Kontext "AutopilotPraesentation1"
|
||||
if Existinglist.GetSelText = "test1.odp" then
|
||||
found = true
|
||||
if SavedActiveMessage <> "" then
|
||||
warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
|
||||
else
|
||||
warnlog " The deleted File was found. However without any messagebox."
|
||||
endif
|
||||
endif
|
||||
Existinglist.TypeKeys "<DOWN>"
|
||||
sleep 5
|
||||
next i
|
||||
if found = true then warnlog " An error-message showed up. Eventually a result of '138498'"
|
||||
AutopilotPraesentation1.Cancel
|
||||
Sleep 2
|
||||
try
|
||||
kill Dokument2$
|
||||
Printlog " Correctly deleted the file: " + Dokument2$
|
||||
catch
|
||||
warnlog "Could not delete the file: " + Dokument2$
|
||||
endcatch
|
||||
|
||||
endcase
|
||||
'/// File => New => Presentation ///'
|
||||
FileAutopilotPresentation '/// new document-autopilot ///'
|
||||
Kontext "AutopilotPraesentation1"
|
||||
sleep 5
|
||||
Existingpresentation.Check
|
||||
sleep 5
|
||||
kontext "active"
|
||||
if active.exists then
|
||||
SavedActiveMessage = Active.GetText
|
||||
QaErrorLog "Message: " + SavedActiveMessage
|
||||
active.ok
|
||||
Kontext "AutopilotPraesentation1"
|
||||
if Existinglist.GetSelText = "test1.odp" then
|
||||
warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
|
||||
endif
|
||||
SavedActiveMessage = ""
|
||||
endif
|
||||
Kontext "AutopilotPraesentation1"
|
||||
Existinglist.TypeKeys "<HOME>"
|
||||
sleep 5
|
||||
found = false
|
||||
for i = 1 to Existinglist.GetItemCount
|
||||
kontext "active"
|
||||
if active.exists then
|
||||
SavedActiveMessage = Active.GetText
|
||||
active.ok
|
||||
endif
|
||||
Kontext "AutopilotPraesentation1"
|
||||
if Existinglist.GetSelText = "test1.odp" then
|
||||
found = true
|
||||
if SavedActiveMessage <> "" then
|
||||
warnlog " The deleted File was found. Messagebox said: " + SavedActiveMessage
|
||||
else
|
||||
warnlog " The deleted File was found. However without any messagebox."
|
||||
endif
|
||||
endif
|
||||
Existinglist.TypeKeys "<DOWN>"
|
||||
sleep 5
|
||||
next i
|
||||
if found = true then warnlog " An error-message showed up. Eventually a result of '138498'"
|
||||
AutopilotPraesentation1.Cancel
|
||||
Sleep 2
|
||||
'/// Delete the second file ///'
|
||||
try
|
||||
kill Dokument2$
|
||||
Printlog " Correctly deleted the file: " + Dokument2$
|
||||
catch
|
||||
warnlog "Could not delete the file: " + Dokument2$
|
||||
endcatch
|
||||
|
||||
endcase 'tDeletedTemplate
|
||||
'****************************************************************************************************
|
||||
|
||||
testcase tSaveLoadLayoutEmpty
|
||||
|
@@ -45,193 +45,218 @@ testcase g_mediaplayer
|
||||
dim timevalue2
|
||||
dim timevalue3
|
||||
dim timecounter, iWaitIndex, timefound as integer
|
||||
|
||||
|
||||
if iSprache <> 39 then
|
||||
Printlog "- MediaPlayer"
|
||||
if gPlatgroup = "unx" then
|
||||
QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed."
|
||||
goto endsub
|
||||
QaErrorLog "Solaris / Linux: Soundcard + Java Media Framework (JMF) Media-Libraries is needed."
|
||||
goto endsub
|
||||
endif
|
||||
Datei$ = ConvertPath (convertPath (gTesttoolPath + "graphics\required\input\29secsound.wav"))
|
||||
'/// Open New Document ///'
|
||||
Call hNewDocument
|
||||
sleep 2
|
||||
'/// Check if the Media Player already exists - if so - close it ///'
|
||||
kontext "mPlayer"
|
||||
if mPlayer.exists then ' Close the MediaPlayer
|
||||
warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA."
|
||||
ToolsMediaPlayer
|
||||
printlog "Closed the Media Player"
|
||||
warnlog "The MediaPlayer was visible since some earlier test. Plese notify FHA."
|
||||
ToolsMediaPlayer
|
||||
printlog "Closed the Media Player"
|
||||
endif
|
||||
|
||||
|
||||
'/// Tools - MediaPlayer ///'
|
||||
ToolsMediaPlayer
|
||||
sleep 2
|
||||
'/// Open file ///' 'a bigger / longer one
|
||||
kontext "mPlayer"
|
||||
if mPlayer.exists then
|
||||
printlog "The MediaPlayer was open."
|
||||
printlog "The MediaPlayer was open."
|
||||
else
|
||||
warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test."
|
||||
goto endsub
|
||||
warnlog "Tools - MediaPlayer didnt work. The MediaPlayer wasnt visible. Aborting test."
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
goto endsub
|
||||
endif
|
||||
Mopen.Click
|
||||
kontext "OeffnenDlg"
|
||||
Pfad.SetText Datei$
|
||||
Oeffnen.Click
|
||||
|
||||
|
||||
|
||||
'/// This test wont work correctly under Solaris and Linux, ///'
|
||||
'/// unless some optional Media-libraries are installed. ///'
|
||||
'/// Therefore we warn the tester about it if we cannot open the file. ///'
|
||||
|
||||
iWaitIndex = 0
|
||||
do while OeffnenDlg.Exists AND iWaitIndex < 10
|
||||
sleep (1)
|
||||
iWaitIndex = iWaitIndex + 1
|
||||
sleep (1)
|
||||
iWaitIndex = iWaitIndex + 1
|
||||
loop
|
||||
kontext "Active"
|
||||
if Active.exists then
|
||||
Warnlog "Error when opening file. Last dialogue said: " + Active.GetText
|
||||
Active.OK
|
||||
kontext "Mplayer"
|
||||
ToolsMediaPlayer
|
||||
goto endsub
|
||||
Warnlog "Error when opening file. Last dialogue said: " + Active.GetText
|
||||
Active.OK
|
||||
kontext "Mplayer"
|
||||
ToolsMediaPlayer
|
||||
Call hCloseDocument '/// close document ///'
|
||||
goto endsub
|
||||
else
|
||||
kontext "Mplayer"
|
||||
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."
|
||||
kontext "Mplayer"
|
||||
if Mplayer.exists then printlog "Media Player was opened."
|
||||
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
|
||||
|
@@ -44,24 +44,28 @@
|
||||
testcase tOLE_Copy
|
||||
qaerrorlog "not running due to reconstruction"
|
||||
goto endsub
|
||||
|
||||
printlog "Test to see if three different OLEs can be copied and identified correctly."
|
||||
|
||||
dim writerfilename1 as string
|
||||
writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg")
|
||||
|
||||
|
||||
printlog "Open draw-file" & writerfilename1
|
||||
FileOpen
|
||||
Kontext "OeffnenDlg"
|
||||
sleep 1
|
||||
Dateiname.SetText (writerfilename1)
|
||||
Oeffnen.Click
|
||||
Sleep 3
|
||||
|
||||
|
||||
printlog "When messagebox about Update all links shows up - press yes."
|
||||
kontext "Messagebox"
|
||||
if Messagebox.exists then
|
||||
Messagebox.Yes
|
||||
Messagebox.Yes
|
||||
endif
|
||||
|
||||
|
||||
sleep 3
|
||||
gApplication = "DRAW"
|
||||
printlog "Select first object. Use EditCopy to copy it to the clipboard"
|
||||
sleep 1
|
||||
kontext "DocumentDraw"
|
||||
DocumentDraw.mousedown (10,10)
|
||||
@@ -69,49 +73,57 @@ testcase tOLE_Copy
|
||||
sleep 1
|
||||
DocumentDraw.Typekeys "<TAB>"
|
||||
EditCopy
|
||||
|
||||
|
||||
printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
|
||||
Call hCloseDocument
|
||||
gApplication = "IMPRESS"
|
||||
Call hNewDocument
|
||||
EditPaste
|
||||
|
||||
|
||||
printlog "Select object and check via the Context-menu what it has been opened as."
|
||||
sleep 1
|
||||
Kontext "DocumentImpress"
|
||||
hTypekeys "<MOD1> A"
|
||||
hTypekeys "<RETURN>"
|
||||
hOpenContextMenu
|
||||
|
||||
|
||||
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
|
||||
if MenuGetItemCount <> 5 then
|
||||
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
|
||||
end if
|
||||
|
||||
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
|
||||
sleep 3
|
||||
MenuSelect (1) 'Default
|
||||
|
||||
|
||||
Kontext "RechenleisteCalc"
|
||||
if RechenleisteCalc.Exists then
|
||||
Printlog "This is a spreadsheet-Document. Good"
|
||||
endif
|
||||
|
||||
|
||||
Kontext "DocumentImpress"
|
||||
printlog "Click outside the OLE to deactivate it. Then close the Document "
|
||||
DocumentImpress.mousedown (10,10)
|
||||
DocumentImpress.mouseup (10,10)
|
||||
sleep 3
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
printlog "Open Draw-file "
|
||||
FileOpen
|
||||
Kontext "OeffnenDlg"
|
||||
sleep 1
|
||||
Dateiname.SetText (writerfilename1)
|
||||
Oeffnen.Click
|
||||
Sleep 3
|
||||
|
||||
|
||||
printlog " When messagebox about Update all links shows up - press yes."
|
||||
kontext "Messagebox"
|
||||
if Messagebox.exists then
|
||||
Messagebox.Yes
|
||||
endif
|
||||
sleep 3
|
||||
|
||||
|
||||
printlog "Select second object. Use EditCopy to copy it to the clipboard."
|
||||
gApplication = "DRAW"
|
||||
sleep 1
|
||||
kontext "DocumentDraw"
|
||||
@@ -120,43 +132,49 @@ testcase tOLE_Copy
|
||||
sleep 1
|
||||
DocumentDraw.Typekeys "<TAB><TAB>"
|
||||
EditCopy
|
||||
|
||||
|
||||
printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
|
||||
sleep 1
|
||||
DocumentDraw.mousedown (10,10)
|
||||
DocumentDraw.mouseup (10,10)
|
||||
sleep 1
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
gApplication = "IMPRESS"
|
||||
Call hNewDocument
|
||||
EditPaste
|
||||
|
||||
|
||||
printlog "Select the object, and check via the Context-menu what it has been opened as."
|
||||
sleep 1
|
||||
Kontext "DocumentImpress"
|
||||
hTypekeys "<MOD1> A"
|
||||
hTypekeys "<RETURN>"
|
||||
hOpenContextMenu
|
||||
|
||||
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
|
||||
if MenuGetItemCount <> 5 then
|
||||
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
|
||||
end if
|
||||
|
||||
|
||||
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
|
||||
sleep 3
|
||||
MenuSelect (1) 'Default
|
||||
|
||||
|
||||
Kontext "RechenleisteCalc"
|
||||
if RechenleisteCalc.Exists then
|
||||
Printlog "This is a spreadsheet-Document. Good"
|
||||
endif
|
||||
|
||||
|
||||
kontext "DocumentImpress"
|
||||
sleep 1
|
||||
DocumentImpress.mousedown (10,10)
|
||||
DocumentImpress.mouseup (10,10)
|
||||
sleep 1
|
||||
|
||||
|
||||
printlog "Close document"
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
printlog "Open draw-file"
|
||||
FileOpen
|
||||
Kontext "OeffnenDlg"
|
||||
sleep 1
|
||||
@@ -164,11 +182,13 @@ testcase tOLE_Copy
|
||||
Oeffnen.Click
|
||||
Sleep 3
|
||||
kontext "Messagebox"
|
||||
printlog "When messagebox about Update all links shows up - press yes."
|
||||
if Messagebox.exists then
|
||||
Messagebox.Yes
|
||||
endif
|
||||
sleep 3
|
||||
|
||||
|
||||
printlog "Select third object. Use EditCopy to copy it to the clipboard."
|
||||
gApplication = "DRAW"
|
||||
sleep 1
|
||||
kontext "DocumentDraw"
|
||||
@@ -177,7 +197,8 @@ testcase tOLE_Copy
|
||||
sleep 1
|
||||
DocumentDraw.Typekeys "<TAB><TAB><TAB>"
|
||||
EditCopy
|
||||
|
||||
|
||||
printlog "Close the Document. Open new Impress-Document. Paste the OLE-Object."
|
||||
sleep 1
|
||||
DocumentDraw.mousedown (10,10)
|
||||
DocumentDraw.mouseup (10,10)
|
||||
@@ -187,37 +208,40 @@ testcase tOLE_Copy
|
||||
gApplication = "IMPRESS"
|
||||
Call hNewDocument
|
||||
EditPaste
|
||||
|
||||
|
||||
printlog "Select the object, and check via the Context-menu what it has been opened as."
|
||||
Kontext "DocumentImpress"
|
||||
hTypekeys "<MOD1> A"
|
||||
hTypekeys "<RETURN>"
|
||||
hOpenContextMenu
|
||||
|
||||
|
||||
printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
|
||||
if MenuGetItemCount <> 5 then
|
||||
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
|
||||
end if
|
||||
|
||||
|
||||
printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
|
||||
sleep 3
|
||||
MenuSelect (1) 'Default
|
||||
|
||||
|
||||
Kontext "RechenleisteCalc"
|
||||
if RechenleisteCalc.Exists then
|
||||
Printlog "This is a spreadsheet-Document. Good"
|
||||
endif
|
||||
|
||||
|
||||
printlog "Close Context menu. Then close the Document"
|
||||
Call hCloseDocument
|
||||
|
||||
endcase 'tOLE_Copy
|
||||
|
||||
'-----------------------------------------------------------------------------------------------------------'
|
||||
|
||||
testcase tOLE_SaveLoad
|
||||
|
||||
printlog "Test to see if an OLE can be inserted, saved and loaded correctly."
|
||||
dim filename as string
|
||||
dim filetype as string
|
||||
dim filetype2 as string
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
@@ -229,13 +253,13 @@ testcase tOLE_SaveLoad
|
||||
printlog "Insert->Object->OLE Object..."
|
||||
InsertObjectOLEObject
|
||||
Kontext "OLEObjektInsert"
|
||||
|
||||
|
||||
printlog "Choose create new. Select Writer."
|
||||
Objekttyp.Select 5
|
||||
|
||||
|
||||
printlog "Click OK to close dialog and insert OLE."
|
||||
OLEObjektInsert.OK
|
||||
|
||||
|
||||
printlog "Deselect object."
|
||||
sleep 1
|
||||
kontext "DocumentImpress"
|
||||
@@ -260,7 +284,7 @@ testcase tOLE_SaveLoad
|
||||
Dateiname.Settext (filename)
|
||||
printlog "Saving as: " & filename
|
||||
Speichern.Click
|
||||
|
||||
|
||||
printlog "If the file already exists - press yes to overwrite it."
|
||||
Sleep 3
|
||||
kontext "Messagebox"
|
||||
@@ -268,7 +292,7 @@ testcase tOLE_SaveLoad
|
||||
Messagebox.Yes
|
||||
endif
|
||||
Sleep 3
|
||||
|
||||
|
||||
printlog "Getting type of OLE from save as dialog."
|
||||
hOpenContextMenu
|
||||
hMenuSelectNr(-1)
|
||||
@@ -286,7 +310,7 @@ testcase tOLE_SaveLoad
|
||||
Call hFileOpen (filename)
|
||||
sleep 1
|
||||
hTypekeys "<MOD1 A>"
|
||||
hOpenContextMenu
|
||||
hOpenContextMenu
|
||||
hMenuSelectNr(-1)
|
||||
Kontext "SpeichernDlg"
|
||||
filetype2 = Dateityp.GetSelText
|
||||
@@ -303,25 +327,31 @@ testcase tOLE_SaveLoad
|
||||
|
||||
'FHA TODO
|
||||
'testcase tOLE_DragDrop
|
||||
printlog " Create OLE, drag n drop within the document. "
|
||||
printlog " If Impress, drag and drop from document to another slide. "
|
||||
'endcase 'tOLE_DragDrop
|
||||
|
||||
endcase ' tOLE_Save
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiOpenOLECrash
|
||||
|
||||
dim sFileodp as string
|
||||
dim oFile as string
|
||||
dim i as integer
|
||||
|
||||
printlog "Testing for bug nr: i70019"
|
||||
|
||||
printlog "Open Application"
|
||||
Call hNewDocument
|
||||
sleep 1
|
||||
printlog "1. Open file: generic_de.ppt"
|
||||
FileOpen
|
||||
sleep 1
|
||||
Kontext "OeffnenDlg"
|
||||
printlog " Use file: graphics\\optional\\input\\generic_de.ppt "
|
||||
oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt")
|
||||
Printlog "file: '" + oFile + "'"
|
||||
Dateiname.SetText (oFile)
|
||||
printlog "2. Save this document as an *.odp -file."
|
||||
Oeffnen.Click
|
||||
kontext "DocumentImpress"
|
||||
i = 0
|
||||
@@ -336,7 +366,7 @@ testcase tiOpenOLECrash
|
||||
if DocumentImpress.StatusIsProgress AND i > 19 then
|
||||
warnlog " Took over 20 seconds to load the document Document. Stalled?"
|
||||
endif
|
||||
|
||||
|
||||
FileSaveAs
|
||||
Kontext "SpeichernDlg"
|
||||
sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de"))
|
||||
@@ -347,16 +377,18 @@ testcase tiOpenOLECrash
|
||||
if Messagebox.Exists(2) then
|
||||
Messagebox.Yes
|
||||
Kontext "AlienWarning"
|
||||
if AlienWarning.Exists(2) then
|
||||
Warnlog "Should not be any alienwarning when saving in our own format!"
|
||||
AlienWarning.OK
|
||||
end if
|
||||
printlog "Saved as: " + sFileodp
|
||||
if AlienWarning.Exists(2) then
|
||||
Warnlog "Should not be any alienwarning when saving in our own format!"
|
||||
AlienWarning.OK
|
||||
end if
|
||||
printlog "Saved as: " + sFileodp
|
||||
end if
|
||||
Sleep 3
|
||||
kontext "DocumentImpress"
|
||||
printlog "3. Close Impress."
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
printlog "4.Reopen the *.odp file again"
|
||||
FileOpen
|
||||
Kontext "OeffnenDlg"
|
||||
Dateiname.SetText (sFileodp + ".odp")
|
||||
@@ -367,7 +399,7 @@ testcase tiOpenOLECrash
|
||||
Active.ok
|
||||
Warnlog "failed to open file? :-("
|
||||
end if
|
||||
|
||||
|
||||
i = 0
|
||||
do while (i < 20)
|
||||
try
|
||||
@@ -378,40 +410,45 @@ testcase tiOpenOLECrash
|
||||
endcatch
|
||||
loop
|
||||
if DocumentImpress.StatusIsProgress AND i > 19 then
|
||||
warnlog " Took over 20 seconds to load the document Document. Stalled?"
|
||||
warnlog "Took over 20 seconds to load the document Document. Stalled?"
|
||||
endif
|
||||
|
||||
|
||||
printlog "5. Right-click on the second slide and click on New slide. "
|
||||
Kontext "Slides"
|
||||
SlidesControl.TypeKeys "<PAGEDOWN>" 'Goto second slide. (and get the focus right)
|
||||
SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu (True) 'Open Context-menu
|
||||
hMenuSelectNr (1) 'New Slide
|
||||
|
||||
printlog "6. Change the title-(the text was F<>r den TCM-Test, but this should irrelevant... ;) )."
|
||||
hTypeKeys "<TAB>" 'To select the title.
|
||||
hTypeKeys "F<EFBFBD>r den TCM-Test" 'To enter text
|
||||
hTypeKeys "Fuer den TCM-Test" 'To enter text
|
||||
printlog " 7. Clicked two times on the Click twice to insert object "
|
||||
hTypeKeys "<ESCAPE>"
|
||||
gMouseClick 1,1
|
||||
hTypeKeys "<TAB><TAB>" '(to select the second object)
|
||||
hTypeKeys "<RETURN>"
|
||||
sleep (2)
|
||||
|
||||
|
||||
printlog "8. Choose OpenOffice.org 2.0 Formular"
|
||||
Kontext "OLEObjektInsert"
|
||||
Objekttyp.Select (4)
|
||||
Objekttyp.Select (3)
|
||||
sleep (2)
|
||||
PrintLog " Objeckt: " + Objekttyp.GetSelText + " will be inserted."
|
||||
PrintLog " Object: " + Objekttyp.GetSelText + " will be inserted."
|
||||
printlog "Leave dialog 'Insert OLE Object' with OK"
|
||||
OLEObjektInsert.OK
|
||||
sleep (2)
|
||||
|
||||
|
||||
kontext "CommandsMath"
|
||||
Commands.TypeKeys "A over B + FACT 6 = x"
|
||||
|
||||
|
||||
'printlog " Leave edit mode by typing key [Escape] "
|
||||
'Comment: If I do this, the bug wont occur...
|
||||
'hTypeKeys "<ESCAPE>"
|
||||
|
||||
|
||||
printlog "10. Click on the Save button."
|
||||
kontext "Standardbar"
|
||||
Speichern.Click
|
||||
|
||||
|
||||
printlog "11. Click on the X to close the window while the OLE-object still in Edit-mode."
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
'-----------------oooo-----------------oooo-----------------oooo-----------------
|
||||
|
||||
endcase 'tiOpenOLECrash
|
||||
|
@@ -40,434 +40,479 @@
|
||||
' #1 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
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
Call hNewDocument
|
||||
sleep 1
|
||||
'/// Open application ///'
|
||||
Call hNewDocument
|
||||
sleep 1
|
||||
|
||||
InsertGraphicsFromFile
|
||||
sleep 3
|
||||
kontext "Active"
|
||||
if Active.Exists Then
|
||||
Active.OK
|
||||
end if
|
||||
sleep 5
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif"))
|
||||
sleep 2
|
||||
Oeffnen.Click
|
||||
printlog "Inserted file"
|
||||
sleep 2
|
||||
EditSelectAll
|
||||
sleep 3
|
||||
FormatPositionAndSize
|
||||
kontext
|
||||
active.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
ImageWidth = Width.GetText
|
||||
ImageHeight = Height.GetText
|
||||
printlog "Got values from position and size"
|
||||
ProtectSize.Check
|
||||
TabPositionAndSize.Ok
|
||||
'/// Import picture ///'
|
||||
InsertGraphicsFromFile
|
||||
sleep 3
|
||||
kontext "Active"
|
||||
if Active.Exists Then
|
||||
Active.OK
|
||||
end if
|
||||
sleep 5
|
||||
Kontext "GrafikEinfuegenDlg"
|
||||
sleep 2
|
||||
Dateiname.SetText (ConvertPath(gOfficeBasisPath + "share\gallery\bigapple.gif"))
|
||||
sleep 2
|
||||
Oeffnen.Click
|
||||
printlog "Inserted file"
|
||||
sleep 2
|
||||
'/// Select all ///'
|
||||
EditSelectAll
|
||||
sleep 3
|
||||
'/// Check values and save them ///'
|
||||
FormatPositionAndSize
|
||||
kontext
|
||||
active.SetPage TabPositionAndSize
|
||||
kontext "TabPositionAndSize"
|
||||
ImageWidth = Width.GetText
|
||||
ImageHeight = Height.GetText
|
||||
printlog "Got values from position and size"
|
||||
'/// Check the "Protect Size"-button. And close dialogue. ///'
|
||||
ProtectSize.Check
|
||||
TabPositionAndSize.Ok
|
||||
|
||||
Kontext "GraphicObjectbar"
|
||||
if GraphicObjectbar.Exists = FALSE then
|
||||
ViewToolbarsPicture
|
||||
'/// Add Shaddow via Toolbar-Button ///'
|
||||
Kontext "GraphicObjectbar"
|
||||
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
|
||||
if schatten.GetState(2) <> 0 then '0 = not pressed. 1 = pressed.
|
||||
warnlog "Shaddow-button shouldnt have been checked"
|
||||
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
|
||||
if shadowcolorvalue <> Farbe.GetSelText then
|
||||
warnlog "Color value changed. Should be: " + shadowcolorvalue + ". But is: " + Farbe.getSeltext
|
||||
endif
|
||||
sleep(2)
|
||||
kontext "TabArea"
|
||||
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
|
||||
if shadowtransparencyvalue <> Transparenz.GetText then
|
||||
warnlog "Transparency value changed. Should be: " + shadowtransparencyvalue + ". But is: " + Transparenz.gettext
|
||||
endif
|
||||
TabSchatten.Ok
|
||||
|
||||
'/// Add Cornerstyle via FormatLine ///'
|
||||
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
|
||||
else
|
||||
else
|
||||
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
|
||||
Transparenz.More ',2
|
||||
shadowdistancevalue = Entfernung.GetText
|
||||
shadowcolorvalue = Farbe.GetSelText
|
||||
shadowtransparencyvalue = Transparenz.GetText
|
||||
printlog "Got values from TabArea"
|
||||
TabSchatten.Ok
|
||||
'/// Check Transparency ///'
|
||||
Kontext
|
||||
Active.SetPage TabTransparenz
|
||||
kontext "TabTransparenz"
|
||||
LineareTransparenz.Check
|
||||
shadowtransparencyvalue = MFLinTransparenz.GetText
|
||||
|
||||
FormatArea
|
||||
sleep 1
|
||||
kontext "TabArea"
|
||||
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
|
||||
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
|
||||
sleep 2
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
TabSchatten.Ok
|
||||
|
||||
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 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
|
||||
|
||||
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
|
||||
'/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "ppt"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
|
||||
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
|
||||
sFileName = ( ConvertPath(gOfficePath + "user\work\shaddow-test"))
|
||||
|
||||
Kontext "GraphicObjectbar"
|
||||
if Schatten.GetState(2) <> 1 then
|
||||
warnlog "Shaddow-button shouldnt have been checked"
|
||||
endif
|
||||
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
|
||||
|
||||
sFileName = ( ConvertPath(gOfficePath + "user\work\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 and reload the file ///'
|
||||
FileClose
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) then Messagebox.Yes
|
||||
Sleep 3
|
||||
'/// Open the saved file ///'
|
||||
hFileOpen (sFileName + "." + ExtensionString)
|
||||
printlog "File opened: " + sFileName + "." + ExtensionString
|
||||
Sleep 3
|
||||
'/// Select all ///'
|
||||
EditSelectAll
|
||||
|
||||
FileClose
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) then Messagebox.Yes
|
||||
Sleep 3
|
||||
try
|
||||
hFileOpen sFileName + "." + ExtensionString
|
||||
Sleep 3
|
||||
printlog "opened file successfully"
|
||||
catch
|
||||
warnlog "Error when opening file."
|
||||
endcatch
|
||||
'/// 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
|
||||
|
||||
EditSelectAll
|
||||
sleep 2
|
||||
'/// Check if transparency has disappeared and if the cornerstyle has changed ///'
|
||||
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"
|
||||
if schatten.Getstate(2) <> 1 then
|
||||
warnlog "The Shadow-button should be activated"
|
||||
else
|
||||
Printlog "Shaddowbutton activated, good."
|
||||
endif
|
||||
TabTransparenz.Cancel
|
||||
|
||||
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
|
||||
'/// 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
|
||||
|
||||
FormatArea
|
||||
sleep 1
|
||||
kontext "TabArea"
|
||||
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
|
||||
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
|
||||
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
|
||||
'/// Remove the Shaddow, Transparency and Cornerstyle ///'
|
||||
FormatArea
|
||||
Kontext
|
||||
Messagebox.SetPage TabTransparenz
|
||||
kontext "TabTransparenz"
|
||||
KeineTransparenz.Check
|
||||
sleep 1
|
||||
kontext "TabArea"
|
||||
'/// Switch to Shaddow-tabpage, do some changes, save them, close dialogue ///'
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
Anzeigen.UnCheck
|
||||
TabSchatten.Ok
|
||||
|
||||
Kontext
|
||||
Active.SetPage TabTransparenz
|
||||
kontext "TabTransparenz"
|
||||
LineareTransparenz.Check
|
||||
shadowtransparencyvalue = MFLinTransparenz.GetText
|
||||
'/// If Impress: Save as Powerpoint-file. If Draw: Save as usual Draw-file. ///'
|
||||
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
|
||||
|
||||
sleep 2
|
||||
Kontext
|
||||
active.SetPage TabSchatten
|
||||
kontext "TabSchatten"
|
||||
TabSchatten.Ok
|
||||
'/// Close the office-session ///'
|
||||
FileClose
|
||||
Kontext "Messagebox"
|
||||
if Messagebox.Exists(2) then Messagebox.Yes
|
||||
Sleep 3
|
||||
'/// Open the saved file ///'
|
||||
hFileOpen (sFileName + "." + ExtensionString)
|
||||
printlog "File opened: " + sFileName + "." + ExtensionString
|
||||
Sleep 3
|
||||
'/// Select all ///'
|
||||
EditSelectAll
|
||||
|
||||
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 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
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "ppt"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
end if
|
||||
'/// Check if transparency has disappeared ///'
|
||||
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
|
||||
|
||||
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
|
||||
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 (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
|
||||
'/// Close application ///'
|
||||
Call hCloseDocument
|
||||
Printlog "Finished Shaddow-test for " + gApplication
|
||||
|
||||
endcase ' tiShaddow
|
||||
|
@@ -56,11 +56,14 @@ testcase tFormatStylistFlyer
|
||||
Dim ySize%
|
||||
|
||||
printlog " - Format/Stylist : using all possible things to manipulate the flyer"
|
||||
'/// open application ///'
|
||||
Call hNewDocument
|
||||
Kontext "Gestalter"
|
||||
'/// Check if stylist is there. Expected: not there ///'
|
||||
if Gestalter.NotExists = false Then
|
||||
qaErrorLog " - Expected Stylist to be closed; But is Open. Check tests."
|
||||
else
|
||||
hTypekeys "<F11>" '/// open stylist by pressing key [F11] ///'
|
||||
sleep 1
|
||||
end if
|
||||
Kontext "Gestalter"
|
||||
@@ -68,67 +71,89 @@ testcase tFormatStylistFlyer
|
||||
Warnlog " No stylist popped up using F11; opening now via slotID"
|
||||
FormatStylist
|
||||
end if
|
||||
'///+ save stylist position and size ///'
|
||||
xPos% = Gestalter.GetPosX
|
||||
yPos% = Gestalter.GetPosY
|
||||
xSize% = Gestalter.GetSizeX
|
||||
ySize% = Gestalter.GetSizeY
|
||||
'///+ if Stylist is docked; undock ///'
|
||||
if Gestalter.IsDocked then Gestalter.UnDock
|
||||
Gestalter.Move 10, 10
|
||||
Sleep 1
|
||||
Gestalter.Move 300, 400
|
||||
Sleep 1
|
||||
Gestalter.Move 590, 790
|
||||
Sleep 1
|
||||
Gestalter.Move xPos%, yPos%
|
||||
Sleep 1
|
||||
printlog " - '///move stylist ///"
|
||||
'///+ move stylist to 10,10 ///'
|
||||
Gestalter.Move 10, 10
|
||||
Sleep 1
|
||||
'///+ move stylist to 300,400 ///'
|
||||
Gestalter.Move 300, 400
|
||||
Sleep 1
|
||||
'///+ move stylist to 590,790 ///'
|
||||
Gestalter.Move 590, 790
|
||||
Sleep 1
|
||||
'///+ move stylist back to saved start position ///'
|
||||
Gestalter.Move xPos%, yPos%
|
||||
Sleep 1
|
||||
|
||||
Gestalter.Size 200, 200
|
||||
Sleep 1
|
||||
Gestalter.Size 300, 400
|
||||
Sleep 1
|
||||
Gestalter.Size 150, 250
|
||||
Sleep 1
|
||||
Gestalter.Size xSize%, ySize%
|
||||
Sleep 1
|
||||
printlog " - '///size stylist ///"
|
||||
'///+ change size to 200,200 ///'
|
||||
Gestalter.Size 200, 200
|
||||
Sleep 1
|
||||
'///+ change size to 300,400 ///'
|
||||
Gestalter.Size 300, 400
|
||||
Sleep 1
|
||||
'///+ change size to 150,250 ///'
|
||||
Gestalter.Size 150, 250
|
||||
Sleep 1
|
||||
'///+ change size back to saved size ///'
|
||||
Gestalter.Size xSize%, ySize%
|
||||
Sleep 1
|
||||
|
||||
printlog " - Close stylist reopen stylist, check if appearence is same as before"
|
||||
xPos% = Gestalter.GetPosX
|
||||
yPos% = Gestalter.GetPosY
|
||||
xSize% = Gestalter.GetSizeX
|
||||
ySize% = Gestalter.GetSizeY
|
||||
FormatStylist
|
||||
Sleep 1
|
||||
FormatStylist
|
||||
sleep (1)
|
||||
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 " - Close stylist reopen stylist, check if appearence is same as before"
|
||||
'/// save stylist position and size ///'
|
||||
xPos% = Gestalter.GetPosX
|
||||
yPos% = Gestalter.GetPosY
|
||||
xSize% = Gestalter.GetSizeX
|
||||
ySize% = Gestalter.GetSizeY
|
||||
'/// close stylist Format->Stylist ///'
|
||||
FormatStylist
|
||||
Sleep 1
|
||||
'/// open stylist Format->Stylist ///'
|
||||
FormatStylist
|
||||
sleep (1)
|
||||
if xPos% <> Gestalter.GetPosX then Warnlog "The x-Pos. has changed : Should be -> '"+ xPos% + "' Is -> '"+ Gestalter.GetPosX +"'."
|
||||
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"
|
||||
Gestalter.Dock
|
||||
Sleep 1
|
||||
if (NOT Gestalter.IsDocked) then
|
||||
warnlog " stylist not docked but should"
|
||||
endif
|
||||
if (Gestalter.IsDocked) Then
|
||||
Gestalter.UnDock
|
||||
endif
|
||||
Sleep 1
|
||||
|
||||
printlog " - maximize/minimize stylist"
|
||||
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 " - dock stylist"
|
||||
'/// dock stylist ///'
|
||||
Gestalter.Dock
|
||||
Sleep 1
|
||||
if (NOT Gestalter.IsDocked) then
|
||||
warnlog " stylist not docked but should"
|
||||
endif
|
||||
'/// UNdock stylist ///'
|
||||
if (Gestalter.IsDocked) Then
|
||||
Gestalter.UnDock
|
||||
endif
|
||||
Sleep 1
|
||||
|
||||
printlog " - maximize/minimize stylist"
|
||||
'/// minimize stylist ///'
|
||||
Gestalter.Minimize
|
||||
Sleep 1
|
||||
'/// maximize stylist ///'
|
||||
Gestalter.Maximize
|
||||
Sleep 1
|
||||
if (NOT Gestalter.IsMax) then
|
||||
warnlog " The stylist did not return to maximized state"
|
||||
endif
|
||||
'/// close stylist ///'
|
||||
Gestalter.Close
|
||||
Call hCloseDocument
|
||||
|
||||
endcase 'tFormatStylistFlyer
|
||||
'--------------------------------------------------------
|
||||
testcase tFormatStylistDocuments
|
||||
|
||||
Dim xPos% as Integer
|
||||
Dim yPos% as Integer
|
||||
Dim xSize% as Integer
|
||||
@@ -188,9 +213,11 @@ testcase tFormatStylistDocuments
|
||||
Gestalter.Close
|
||||
end if
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tFormatStylistDocuments
|
||||
'--------------------------------------------------------
|
||||
testcase tFormatStylistTemplatesUse
|
||||
|
||||
Dim i as Integer
|
||||
Dim save as integer
|
||||
|
||||
@@ -228,9 +255,11 @@ testcase tFormatStylistTemplatesUse
|
||||
|
||||
sleep 3
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tFormatStylistTemplatesUse
|
||||
'--------------------------------------------------------
|
||||
testcase tFormatStylistTemplateCreate
|
||||
|
||||
goto endsub
|
||||
dim i
|
||||
dim Zaehler
|
||||
@@ -269,29 +298,31 @@ testcase tFormatStylistTemplateCreate
|
||||
i=0
|
||||
do
|
||||
inc i
|
||||
loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler))
|
||||
if i>zaehler then
|
||||
loop while ((Ansicht.getItemText(i) <> "ATesttool") AND (i <= zaehler))
|
||||
if i>zaehler then
|
||||
warnlog " error"
|
||||
endif
|
||||
Ansicht.Select i
|
||||
sleep 1
|
||||
Ansicht.TypeKeys "<SPACE>"
|
||||
sleep 1
|
||||
Loeschen.Click
|
||||
Kontext "Active"
|
||||
Active.Yes
|
||||
sleep 1
|
||||
Kontext "Vorlagenkatalog"
|
||||
Vorlagenkatalog.Close
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Call hCloseDocument
|
||||
sleep 1
|
||||
endcase
|
||||
|
||||
endif
|
||||
Ansicht.Select i
|
||||
sleep 1
|
||||
Ansicht.TypeKeys "<SPACE>"
|
||||
sleep 1
|
||||
Loeschen.Click
|
||||
Kontext "Active"
|
||||
Active.Yes
|
||||
sleep 1
|
||||
Kontext "Vorlagenkatalog"
|
||||
Vorlagenkatalog.Close
|
||||
sleep 1
|
||||
Kontext "DocumentDraw"
|
||||
gMouseClick 90,90
|
||||
sleep 1
|
||||
Call hCloseDocument
|
||||
sleep 1
|
||||
|
||||
endcase 'tFormatStylistTemplateCreate
|
||||
'--------------------------------------------------------
|
||||
testcase tFormatStylistTemplateSelect
|
||||
|
||||
dim i as integer
|
||||
dim sListDown(21) as string
|
||||
dim sListUp(21) as string
|
||||
@@ -367,9 +398,11 @@ testcase tFormatStylistTemplateSelect
|
||||
TabArea.OK
|
||||
sleep 2
|
||||
hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tFormatStylistTemplateSelect
|
||||
'---------------------------------------------------------
|
||||
testcase tFormatStylistTemplateNew
|
||||
|
||||
dim sListDown(21) as string
|
||||
dim sListUp(21) as string
|
||||
dim sTemp as string
|
||||
@@ -452,22 +485,24 @@ testcase tFormatStylistTemplateNew
|
||||
inc i
|
||||
sTemp = Vorlagenliste.GetText
|
||||
Vorlagenliste.TypeKeys "<Up>"
|
||||
loop while (("Testtool" <> sTemp) AND (i<20))
|
||||
Vorlagenliste.TypeKeys "<Return>"
|
||||
Kontext "Gestalter"
|
||||
Gestalter.Close
|
||||
|
||||
Printlog " - check template"
|
||||
FormatCharacter
|
||||
Kontext
|
||||
Active.SetPage TabFont
|
||||
Kontext "TabFont"
|
||||
TabFont.OK
|
||||
hTypeKeys ("<escape>",2)
|
||||
hCloseDocument
|
||||
endcase
|
||||
loop while (("Testtool" <> sTemp) AND (i<20))
|
||||
Vorlagenliste.TypeKeys "<Return>"
|
||||
Kontext "Gestalter"
|
||||
Gestalter.Close
|
||||
|
||||
Printlog " - check template"
|
||||
FormatCharacter
|
||||
Kontext
|
||||
Active.SetPage TabFont
|
||||
Kontext "TabFont"
|
||||
TabFont.OK
|
||||
hTypeKeys ("<escape>",2)
|
||||
hCloseDocument
|
||||
|
||||
endcase 'tFormatStylistTemplateNew
|
||||
'--------------------------------------------------------
|
||||
testcase tiFormatStylist
|
||||
|
||||
Dim Num1 as integer ' graphics : first line indent ; the one with 0,6cm in the summary
|
||||
Dim Num2 as integer ' presentations : background ; just one tabpage pops up: Area
|
||||
Dim Num3 as integer ' : background objects ; Line pops up
|
||||
@@ -637,8 +672,9 @@ testcase tiFormatStylist
|
||||
Kontext "Gestalter"
|
||||
if Gestalter.Exists Then Warnlog "- Stylist could not be closed pressing F11"
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tiFormatStylist
|
||||
'---------------------------------------------------------
|
||||
sub hWalkTheStyles (optional a as integer,optional b as integer)
|
||||
' TODO: TBO DialogTest should go to Recource test!
|
||||
dim i as integer
|
||||
@@ -752,9 +788,11 @@ sub hWalkTheStyles (optional a as integer,optional b as integer)
|
||||
Call DialogTest (TabOptionenNumerierung)
|
||||
sleep 1
|
||||
endif
|
||||
end sub
|
||||
|
||||
|
||||
end sub 'hWalkTheStyles
|
||||
'---------------------------------------------------------
|
||||
testcase tFormatStylist
|
||||
|
||||
Dim sTemp as String
|
||||
dim sSettings(20,3) ' control_name; control_type; value
|
||||
dim i as integer
|
||||
@@ -841,9 +879,11 @@ testcase tFormatStylist
|
||||
endif
|
||||
endif
|
||||
Call hCloseDocument
|
||||
endcase
|
||||
|
||||
|
||||
endcase 'tFormatStylist
|
||||
'--------------------------------------------------------
|
||||
function hSelectInList (window, sEntry as String) as Boolean
|
||||
|
||||
Dim i as Integer
|
||||
Dim sTemp as String
|
||||
Dim sLastTemp as String
|
||||
@@ -861,9 +901,11 @@ if (sEntry = sTemp) then
|
||||
else
|
||||
hSelectInList = FALSE
|
||||
endif
|
||||
end function
|
||||
|
||||
end function 'hSelectInList
|
||||
'---------------------------------------------------------
|
||||
function hWalkTheStyles2 (atemp)
|
||||
|
||||
'function hWalkTheStyles2 (bSet as boolean, aSettings(), atemp as variant) as string
|
||||
dim i as integer
|
||||
dim x as integer
|
||||
@@ -984,6 +1026,4 @@ function hWalkTheStyles2 (atemp)
|
||||
' sleep 1
|
||||
' Call DialogTest (TabOptionenNumerierung)
|
||||
' sleep 1
|
||||
end function
|
||||
|
||||
|
||||
end function 'hWalkTheStyles2
|
||||
|
@@ -46,75 +46,83 @@
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiToolsThesaurus
|
||||
|
||||
Dim DasWort$
|
||||
Dim ZaehlerBedeutung
|
||||
Dim DasWort$
|
||||
Dim ZaehlerBedeutung
|
||||
|
||||
'/// for normal text, the thesaurus is enabled, if the format->character->language of the word has a thesaurus///'
|
||||
'///+ unfortunately in textboxes this doesn't work, you can give the word a langauge, but this is been ignored by///'
|
||||
'///+ our thesaurus :-(((///'
|
||||
'/// so especially for asian languages you have to set a default language in the options, to be able to use///'
|
||||
'///+ the thesaurus there - fallback to englisch, because there is no ? thesaurus for cjk languages ??///'
|
||||
|
||||
' As long as OOo has no modules for that, disabled
|
||||
if gOOO = True then
|
||||
printlog "No spellchecking in OOo"
|
||||
goto endsub
|
||||
endif
|
||||
'/// First we make sure we test a language where Thesa
|
||||
' As long as OOo has no modules for that, disabled
|
||||
if gOOO = True then
|
||||
printlog "No spellchecking in OOo"
|
||||
goto endsub
|
||||
endif
|
||||
|
||||
select case iSprache
|
||||
case 01 : DasWort$ = "Hello"
|
||||
case 03 : DasWort$ = "Alo"
|
||||
case 07 : printlog "- No Thesaur for Russian available"
|
||||
goto endsub
|
||||
case 30 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 31 : DasWort$ = "Guiten"
|
||||
case 33 : DasWort$ = "Bonjour"
|
||||
case 34 : DasWort$ = "Hola"
|
||||
case 35 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 36 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 37 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 39 : DasWort$ = "Ciao"
|
||||
case 42 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 45 : DasWort$ = "Hej"
|
||||
case 46 : DasWort$ = "Välkommen"
|
||||
case 47 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 48 : Printlog "- No Thesaurus in Polish!"
|
||||
goto endsub
|
||||
case 49 : DasWort$ = "Hallo"
|
||||
case 50 : DasWort$ = "Prosojnica"
|
||||
case 51 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 55 : Printlog "- No Thesaurus in Brazilian!"
|
||||
goto endsub
|
||||
case 90 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 01 : DasWort$ = "Hello"
|
||||
case 03 : DasWort$ = "Alo"
|
||||
case 07 : printlog "- No Thesaur for Russian available"
|
||||
goto endsub
|
||||
case 30 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 31 : DasWort$ = "Guiten"
|
||||
case 33 : DasWort$ = "Bonjour"
|
||||
case 34 : DasWort$ = "Hola"
|
||||
case 35 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 36 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 37 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 39 : DasWort$ = "Ciao"
|
||||
case 42 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 45 : DasWort$ = "Hej"
|
||||
case 46 : DasWort$ = "Välkommen"
|
||||
case 47 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 48 : Printlog "- No Thesaurus in Polish!"
|
||||
goto endsub
|
||||
case 49 : DasWort$ = "Hallo"
|
||||
case 50 : DasWort$ = "Prosojnica"
|
||||
case 51 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
case 55 : Printlog "- No Thesaurus in Brazilian!"
|
||||
goto endsub
|
||||
case 90 : Printlog "- No Thesaurus available !"
|
||||
goto endsub
|
||||
|
||||
case else : if bAsianLan then
|
||||
hSetSpellHypLanguage
|
||||
DasWort$ = "Hello"
|
||||
else
|
||||
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
|
||||
DasWort$ = "Hello"
|
||||
endif
|
||||
end select
|
||||
case else : if bAsianLan then
|
||||
hSetSpellHypLanguage
|
||||
DasWort$ = "Hello"
|
||||
else
|
||||
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here"
|
||||
DasWort$ = "Hello"
|
||||
endif
|
||||
end select
|
||||
|
||||
printlog " Thesaurus without any word in the document"
|
||||
try
|
||||
Kontext "Thesaurus"
|
||||
Thesaurus.Cancel
|
||||
WarnLog " If no word is in the document, Thesaurus shouldn't be available"
|
||||
catch
|
||||
PrintLog " No Thesaurus available"
|
||||
endcatch
|
||||
printlog " Thesaurus without any word in the document"
|
||||
Call hNewDocument '/// New document ///'
|
||||
try
|
||||
ExtrasThesaurusDraw '/// try thesaurus in empty document ///'
|
||||
Kontext "Thesaurus"
|
||||
Thesaurus.Cancel
|
||||
WarnLog " If no word is in the document, Thesaurus shouldn't be available"
|
||||
catch
|
||||
PrintLog " No Thesaurus available"
|
||||
endcatch
|
||||
|
||||
PrintLog " Thesaurus with 1 word: " + DasWort$
|
||||
PrintLog " Thesaurus with 1 word: " + DasWort$
|
||||
|
||||
Call hTextrahmenErstellen (DasWort$,20,20,50,30)
|
||||
sleep 1
|
||||
Call hTextrahmenErstellen (DasWort$,20,20,50,30)
|
||||
sleep 1
|
||||
|
||||
hTypeKeys "<Home><SHIFT END>"
|
||||
'------------------------
|
||||
hTypeKeys "<Home><SHIFT END>"
|
||||
'------------------------
|
||||
ToolsOptions
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
hToolsOptions("LANGUAGESETTINGS","Languages")
|
||||
@@ -122,161 +130,179 @@ Westlich.Select 32
|
||||
Kontext "ExtrasOptionenDlg"
|
||||
ExtrasOptionenDlg.OK
|
||||
sleep 1
|
||||
'------------------------
|
||||
try
|
||||
Kontext "Thesaurus"
|
||||
if Thesaurus.Exists(3) then
|
||||
'------------------------
|
||||
try
|
||||
ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///'
|
||||
Kontext "Thesaurus"
|
||||
if Thesaurus.Exists(3) then
|
||||
if Wort.GetSelText <> DasWort$ Then WarnLog "marked word should be:" + DasWort$ + " but it is:" + Wort.GetSelText
|
||||
ZaehlerBedeutung=Bedeutung.GetItemCount
|
||||
if Bedeutung.GetItemCount = 0 Then
|
||||
PrintLog " There are no suggestions for this word"
|
||||
sleep 1
|
||||
else
|
||||
if ZaehlerBedeutung=1 Then
|
||||
Bedeutung.Select ZaehlerBedeutung
|
||||
else
|
||||
Bedeutung.Select (ZaehlerBedeutung - 1)
|
||||
end if
|
||||
sleep 1
|
||||
sleep 1
|
||||
if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field"
|
||||
if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'"
|
||||
endif
|
||||
Thesaurus.Cancel
|
||||
else
|
||||
warnlog " thesaurus didn't come up, that's bad :-("
|
||||
end if
|
||||
catch
|
||||
warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!"
|
||||
endcatch
|
||||
if Wort.GetSelText = DasWort$ Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///'
|
||||
ZaehlerBedeutung=Bedeutung.GetItemCount
|
||||
if Bedeutung.GetItemCount = 0 Then
|
||||
PrintLog " There are no suggestions for this word"
|
||||
sleep 1
|
||||
else
|
||||
if ZaehlerBedeutung=1 Then
|
||||
Bedeutung.Select ZaehlerBedeutung
|
||||
else
|
||||
Bedeutung.Select (ZaehlerBedeutung - 1)
|
||||
end if
|
||||
sleep 1
|
||||
Synonym.Select 1 '/// Select synonym 1///'
|
||||
sleep 1
|
||||
if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field"
|
||||
if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'"
|
||||
endif
|
||||
Thesaurus.Cancel
|
||||
else
|
||||
warnlog " thesaurus didn't come up, that's bad :-("
|
||||
end if
|
||||
catch
|
||||
warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!"
|
||||
endcatch
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
|
||||
endcase 'tiToolsThesaurus
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiToolsHyphenation1
|
||||
|
||||
printlog " - Hyphenation without any text"
|
||||
sleep 3
|
||||
Kontext "Silbentrennung"
|
||||
printlog " - Hyphenation without any text"
|
||||
Call hNewDocument '/// New impress document ///'
|
||||
sleep 3
|
||||
ExtrasSilbentrennungDraw '/// Try Silbentrennung with empty document ///'
|
||||
Kontext "Silbentrennung"
|
||||
if Silbentrennung.Exists(1) = True Then
|
||||
Warnlog " - Dialog ist da"
|
||||
Silbentrennung.Cancel
|
||||
Warnlog " - Dialog ist da"
|
||||
Silbentrennung.Cancel
|
||||
else
|
||||
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
|
||||
Printlog " - Hyphenation activated"
|
||||
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
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
testcase tiToolsHyphenation2
|
||||
|
||||
dim iWaitIndex as integer
|
||||
dim sExt as string
|
||||
Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7
|
||||
dim sDraw as string
|
||||
dim sFile as string
|
||||
PrintLog "- Tools/Hyphenation2"
|
||||
Select Case Ucase(gApplication)
|
||||
case "DRAW" : sExt = ".odg"
|
||||
case "IMPRESS" : sExt = ".odp"
|
||||
end select
|
||||
dim iWaitIndex as integer
|
||||
dim sExt as string
|
||||
Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7
|
||||
dim sDraw as string
|
||||
dim sFile as string
|
||||
PrintLog "- Tools/Hyphenation2"
|
||||
Select Case Ucase(gApplication)
|
||||
case "DRAW" : sExt = ".odg"
|
||||
case "IMPRESS" : sExt = ".odp"
|
||||
end select
|
||||
|
||||
if ((not bAsianLan) AND (iSprache <> 07)) then
|
||||
sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt
|
||||
Call hFileOpen (sFile)
|
||||
endif
|
||||
if ((not bAsianLan) AND (iSprache <> 07)) then
|
||||
sFile = gTesttoolpath + "graphics\required\input\silben_"+iSprache+sExt
|
||||
Call hFileOpen (sFile)
|
||||
endif
|
||||
|
||||
case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
|
||||
case 07 : qaerrorlog "- No Hypenation for Russian available"
|
||||
goto endsub
|
||||
case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit"
|
||||
case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e"
|
||||
case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o"
|
||||
case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal"
|
||||
case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu"
|
||||
case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka"
|
||||
case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e"
|
||||
case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g"
|
||||
case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a"
|
||||
case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia"
|
||||
case else : if bAsianLan then
|
||||
printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
|
||||
printlog " :-) will use English instead"
|
||||
Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt)
|
||||
DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
|
||||
else
|
||||
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile
|
||||
hNewDocument
|
||||
endif
|
||||
end select
|
||||
select case iSprache '/// Open prepared document ///'
|
||||
case 01 :DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
|
||||
case 07 : qaerrorlog "- No Hypenation for Russian available"
|
||||
goto endsub
|
||||
case 31 :DasWort = "siteit" : DasWort2 = "iteit" : DasWort3 = "teit" : DasWort4 = "eit"
|
||||
case 33 :DasWort = "ture" : DasWort2 = "ure" : DasWort3 = "re" : DasWort4 = "e"
|
||||
case 34 :DasWort = "chvo" : DasWort2 = "hvo" : DasWort3 = "vo" : DasWort4 = "o"
|
||||
case 36 :DasWort = "zatnal" : DasWort2 = "atnal" : DasWort3 = "tnal" : DasWort4 = "nal"
|
||||
case 39 :DasWort = "sentu" : DasWort2 = "entu" : DasWort3 = "ntu" : DasWort4 = "tu"
|
||||
case 46 :DasWort = "niska" : DasWort2 = "iska" : DasWort3 = "ska" : DasWort4 = "ka"
|
||||
case 48 :DasWort = "nie" : DasWort2 = "ie" : DasWort3 = "e"
|
||||
case 49 :DasWort = "nung" : DasWort2 = "ung" : DasWort3 = "ng" : DasWort4 = "g"
|
||||
case 50 :DasWort = "nica" : DasWort2 = "ica" : DasWort3 = "ca" : DasWort4 = "a"
|
||||
case 55 :DasWort = "gia" : DasWort2 = "ia" : DasWort3 = "a" : DasWort4 = "ogia"
|
||||
case else : if bAsianLan then
|
||||
printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)"
|
||||
printlog " :-) will use English instead"
|
||||
Call hFileOpen (gTesttoolpath + "graphics\required\input\silben_"+"1"+sExt)
|
||||
DasWort = "ation" : DasWort2 = "tion" : DasWort3 = "ion" : DasWort4 = "on" '+Chr(34)
|
||||
else
|
||||
Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create file: "+sFile
|
||||
hNewDocument
|
||||
endif
|
||||
end select
|
||||
|
||||
Call sMakeReadOnlyDocumentEditable
|
||||
Call sMakeReadOnlyDocumentEditable
|
||||
|
||||
printlog " - Test hyphenation"
|
||||
hTypeKeys "<Return>"
|
||||
printlog " - Test hyphenation"
|
||||
EditSelectAll '/// Press CTRL + A to select all ///'
|
||||
'/// press return to go into the edit mode ///'
|
||||
hTypeKeys "<Return>"
|
||||
|
||||
sleep 1
|
||||
' WA for draw, or smth else: get text part before hyphenation:
|
||||
if iSprache = "1" OR bAsianLan = TRUE then
|
||||
else
|
||||
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
|
||||
endif
|
||||
EditCopy
|
||||
sDraw = GetClipboardText()
|
||||
gMouseClick 50,50
|
||||
sleep 3
|
||||
EditCopy
|
||||
sleep 1
|
||||
' WA for draw, or smth else: get text part before hyphenation:
|
||||
if iSprache = "1" OR bAsianLan = TRUE then
|
||||
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
|
||||
else
|
||||
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>"
|
||||
endif
|
||||
EditCopy
|
||||
sDraw = GetClipboardText()
|
||||
EditSelectAll '/// Select whole text ///'
|
||||
ExtrasSilbentrennungDraw '/// Run Hyphenation ///'
|
||||
gMouseClick 50,50
|
||||
hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>" '/// Select part of text and compare it with original text at this place ///'
|
||||
sleep 3
|
||||
EditCopy
|
||||
printlog GetClipboardText
|
||||
select case GetClipboardText
|
||||
case DasWort : printlog " - Hyphenation worked"
|
||||
case DasWort2 : printlog " - Hyphenation worked"
|
||||
case DasWort3 : printlog " - Hyphenation worked"
|
||||
case DasWort4 : printlog " - Hyphenation worked"
|
||||
case else : warnlog " - Hyphenation didnt work"
|
||||
end select
|
||||
if GetClipboardText <> sDraw then
|
||||
Printlog " - WA draw hyphenation did work :-)"
|
||||
else
|
||||
Warnlog " - Hyphenation did not work"
|
||||
Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'"
|
||||
end if
|
||||
sleep 1
|
||||
|
||||
select case GetClipboardText
|
||||
case DasWort : printlog " - Hyphenation worked"
|
||||
case DasWort2 : printlog " - Hyphenation worked"
|
||||
case DasWort3 : printlog " - Hyphenation worked"
|
||||
case DasWort4 : printlog " - Hyphenation worked"
|
||||
case else : warnlog " - Hyphenation didnt work"
|
||||
end select
|
||||
if GetClipboardText <> sDraw then
|
||||
Printlog " - WA draw hyphenation did work :-)"
|
||||
else
|
||||
Warnlog " - Hyphenation did not work"
|
||||
Printlog "Expected: '"+DasWort+"'; or something different than: '"+sDraw+"'; But what we got was: '"+GetClipboardText+"'"
|
||||
end if
|
||||
sleep 1
|
||||
Call hCloseDocument '/// Close document ///'
|
||||
|
||||
endcase 'tiToolsHyphenation2
|
||||
|
||||
'-------------------------------------------------------------------------------
|
||||
@@ -292,6 +318,7 @@ testcase tToolsMacro
|
||||
ToolsMacro
|
||||
Kontext "Makro"
|
||||
|
||||
'/// to get the count of all macros, the list needs to get elapsed-all ///'
|
||||
for j = 1 to 2
|
||||
Zaehler=MakroAus.GetItemCount
|
||||
MakroAus.typeKeys "<end>"
|
||||
@@ -405,5 +432,5 @@ testcase tToolsMacro
|
||||
'TODO: organizer testing!
|
||||
Call hCloseDocument
|
||||
Call hCloseDocument
|
||||
|
||||
|
||||
endcase 'tToolsMacro
|
||||
|
@@ -40,13 +40,13 @@
|
||||
'\********************************************************************
|
||||
|
||||
testcase tViewZoom
|
||||
dim Zaehler as integer
|
||||
dim Position1 as integer
|
||||
dim Position2 as integer
|
||||
Dim Datei$
|
||||
Printlog "- view Zoom"
|
||||
dim Zaehler as integer
|
||||
dim Position1 as integer
|
||||
dim Position2 as integer
|
||||
Dim Datei$
|
||||
Printlog "- view Zoom"
|
||||
|
||||
if (gApplication = "IMPRESS") then
|
||||
if (gApplication = "IMPRESS") then
|
||||
ExtensionString = "odp"
|
||||
else
|
||||
ExtensionString = "odg"
|
||||
@@ -55,78 +55,85 @@ testcase tViewZoom
|
||||
Datei$ = ConvertPath (gOfficePath + "user\work\test." & ExtensionString)
|
||||
|
||||
Printlog "- View-Zoom testing"
|
||||
if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-)
|
||||
ViewZoom
|
||||
Kontext "Massstab"
|
||||
Massstab.OK
|
||||
Kontext "SD_Farbleiste"
|
||||
sleep 1
|
||||
if SD_Farbleiste.Exists then
|
||||
Printlog "- Color toolbar will be disabled now"
|
||||
ViewToolbarsColorBar
|
||||
end if
|
||||
For Zaehler = 1 to 9
|
||||
Position1 = 5 * Zaehler - 3
|
||||
Position2 = 105 - 5 * Zaehler
|
||||
Call hRechteckErstellen (Position1, Position1, Position2, Position2)
|
||||
FormatArea
|
||||
kontext
|
||||
Active.SetPage TabFarben
|
||||
Kontext "TabFarben"
|
||||
Farbe.Select 5*Zaehler
|
||||
TabFarben.OK
|
||||
sleep 1
|
||||
gMouseClick 50,0
|
||||
Next Zaehler
|
||||
sleep 2
|
||||
sleep 3
|
||||
ViewZoom
|
||||
Kontext "Massstab"
|
||||
VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "45"
|
||||
Massstab.OK
|
||||
sleep 2
|
||||
gMouseClick 50,1
|
||||
ViewZoom
|
||||
Kontext "Massstab"
|
||||
Select Case Zaehler
|
||||
Case 1: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "40"
|
||||
Case 2: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "50"
|
||||
Case 3: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "75"
|
||||
Case 4: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "100"
|
||||
Case 5: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "150"
|
||||
Case 6: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "200"
|
||||
if dir(Datei$) <> "" then app.Kill(Datei$) ' to avoid the anoying overwrite warnlog :-)
|
||||
Call hNewDocument '/// new document ///'
|
||||
ViewZoom
|
||||
Kontext "Massstab"
|
||||
Vergroesserung100.Check '/// set zoom to 50% ///'
|
||||
Massstab.OK
|
||||
'/// create a number of rectangles with different color properties ///'
|
||||
Kontext "SD_Farbleiste"
|
||||
sleep 1
|
||||
if SD_Farbleiste.Exists then
|
||||
Printlog "- Color toolbar will be disabled now"
|
||||
ViewToolbarsColorBar
|
||||
end if
|
||||
'/// All rectangles are created with same dimensions but using different zoom settings ///'
|
||||
For Zaehler = 1 to 9
|
||||
Position1 = 5 * Zaehler - 3
|
||||
Position2 = 105 - 5 * Zaehler
|
||||
Call hRechteckErstellen (Position1, Position1, Position2, Position2)
|
||||
FormatArea
|
||||
kontext
|
||||
Active.SetPage TabFarben
|
||||
Kontext "TabFarben"
|
||||
Farbe.Select 5*Zaehler
|
||||
TabFarben.OK
|
||||
sleep 1
|
||||
gMouseClick 50,0
|
||||
Next Zaehler
|
||||
sleep 2
|
||||
hFileSaveAs (Datei$) '/// save document ///'
|
||||
sleep 3
|
||||
for Zaehler = 1 to 6 '/// changing zoom settings and checking functionality with controlling the color of the selected rectangle ///'
|
||||
ViewZoom
|
||||
Kontext "Massstab"
|
||||
VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "45"
|
||||
Massstab.OK
|
||||
sleep 2
|
||||
gMouseClick 50,1
|
||||
ViewZoom
|
||||
Kontext "Massstab"
|
||||
Select Case Zaehler
|
||||
Case 1: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "40"
|
||||
Case 2: VergroesserungStufenlos.check
|
||||
Stufenlos.Settext "50"
|
||||
Case 3: VergroesserungStufenlos.check
|
||||
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
|
||||
'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
|
||||
|
||||
'GanzeSeite.push
|
||||
'Optimal.push
|
||||
'Seitenbreite.push
|
||||
sleep 2
|
||||
'GanzeSeite.push
|
||||
'Optimal.push
|
||||
'Seitenbreite.push
|
||||
sleep 2
|
||||
|
||||
Call hCloseDocument '/// close document ///'
|
||||
endcase
|
||||
|
@@ -324,7 +324,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes
|
||||
printlog " - 'add all' for the rest of the files"
|
||||
DateiListe.Select 1
|
||||
HinzufuegenAlle.Click
|
||||
sleep (1)
|
||||
sleep (8)
|
||||
printlog " - apply-dialog -> cancel"
|
||||
Kontext "ApplyGallery"
|
||||
for j=1 to 100
|
||||
@@ -341,7 +341,7 @@ testcase tGallery_CreateAndWorkWithANewGalleryThemes
|
||||
printlog " - 'add all' for the rest of the files"
|
||||
DateiListe.Select 1
|
||||
HinzufuegenAlle.Click
|
||||
sleep (2)
|
||||
sleep (8)
|
||||
Kontext "ApplyGallery"
|
||||
for j=1 to 100
|
||||
If ApplyGallery.Exists then
|
||||
|
@@ -332,10 +332,10 @@ testcase tViewNavigator
|
||||
'/// Check that the dragmodus has 3 modes
|
||||
printlog " Check that the dragmodus has 3 modes"
|
||||
Dragmodus.OpenMenu
|
||||
if MenuGetItemCount <> 3 then
|
||||
if hMenuItemGetCount <> 3 then
|
||||
warnlog "Not enough modes for dragmodus"
|
||||
end if
|
||||
MenuSelect (0)
|
||||
hMenuSelectNr (0)
|
||||
'/// Close Navigator
|
||||
printlog " Close Navigator"
|
||||
Kontext "Navigator"
|
||||
|
Reference in New Issue
Block a user