summaryrefslogtreecommitdiff
path: root/testautomation
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-10-01 11:19:42 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-10-01 11:19:42 +0000
commite6c0c6f0a6fc392d3e4775cfba57cd29ed74a29e (patch)
tree604a32e31f01fe50a59d1a04c112b01f719cb572 /testautomation
parent541434c445bc4c7e70b79bca22171228592d6830 (diff)
CWS-TOOLING: integrate CWS automationdev300m58cat0
2009-09-29 14:46:30 +0200 oc r276530 : #i105448# sleep added to resolv timingproblem 2009-09-28 10:29:46 +0200 oc r276482 : #i105404# t_ToolsMacro needs saved file 2009-09-27 10:51:09 +0200 tbo r276478 : #105393# on MacOS X only 3 items in tools menu 2009-09-25 18:02:25 +0200 oc r276473 : CWS-TOOLING: rebase CWS automationdev300m58cat0 to trunk@276429 (milestone: DEV300:m60) 2009-09-24 11:06:00 +0200 hde r276411 : save test-files locally 2009-09-23 15:40:07 +0200 hde r276400 : deleting of autotext optimized 2009-09-23 15:39:20 +0200 hde r276399 : Dialog 'Bereiche' opened after deleting autotext 2009-09-23 10:42:26 +0200 jsk r276370 : Added warnlog for exceeded timeout, i want the test to warn instead of aborting. Connected issue is #i105289# 2009-09-22 10:41:22 +0200 oc r276347 : #i105254# c_arrayconstants.inc enhanced 2009-09-21 20:37:26 +0200 tbo r276344 : #i105249# workaround firststartwizard regression by calling hDisableQuickstarterAPI() 2009-09-17 10:55:59 +0200 wg r276231 : i105141 2009-09-16 09:20:58 +0200 oc r276191 : #i105109# sleeps increased
Diffstat (limited to 'testautomation')
-rw-r--r--testautomation/chart2/required/includes/ch2_menu.inc10
-rwxr-xr-xtestautomation/framework/optional/includes/filedlg_multiselection.inc17
-rwxr-xr-xtestautomation/framework/required/includes/wizard_firsttime.inc4
-rwxr-xr-xtestautomation/graphics/optional/includes/global/g_tables.inc3
-rwxr-xr-xtestautomation/spreadsheet/optional/includes/arrayconstants/c_arrayconstants.inc14
-rwxr-xr-xtestautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc1
-rwxr-xr-xtestautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc8
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields2.inc112
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields4.inc1368
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields6.inc2
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields7.inc30
-rwxr-xr-xtestautomation/writer/optional/includes/option/wh_o_1.inc2
-rwxr-xr-xtestautomation/writer/optional/includes/option/wh_o_2.inc2
-rwxr-xr-xtestautomation/writer/required/includes/w_002_.inc9
-rwxr-xr-xtestautomation/writer/tools/includes/w_tool2.inc67
15 files changed, 888 insertions, 761 deletions
diff --git a/testautomation/chart2/required/includes/ch2_menu.inc b/testautomation/chart2/required/includes/ch2_menu.inc
index 5d6105f0f458..df03c4dcabb8 100644
--- a/testautomation/chart2/required/includes/ch2_menu.inc
+++ b/testautomation/chart2/required/includes/ch2_menu.inc
@@ -50,6 +50,10 @@ testcase tMainMenu
dim iHelpMenuItemCount as integer
iHelpMenuItemCount = 5 : if ( gPlatform = "osx" ) then iHelpMenuItemCount = 4
+ dim iToolsMenuItemCount as integer
+ iToolsMenuItemCount = 4 : if ( gPlatform = "osx" ) then iToolsMenuItemCount = 3
+ 'Options entry is called Preferences and resides in application MacOS X menu
+
printlog "Close all document windows (File / Close)"
Do Until GetDocumentCount = 0
Call hCloseDocument
@@ -173,12 +177,12 @@ testcase tMainMenu
warnlog "There should 8 items in the FORMAT/Title menu but there are " + iCount + " items."
end if
- printlog "check if there are 4 items in the TOOLS menu."
+ printlog "check if there are " + iToolsMenuItemCount + " items in the TOOLS menu."
DocumentCalc.UseMenu
hMenuSelectNr(6)
iCount = hMenuItemGetCount()
- if (iCount <> 4) then
- warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
+ if (iCount <> iToolsMenuItemCount) then
+ warnlog "There should " + iToolsMenuItemCount + " items in the tools menu but there are " + iCount + " items."
end if
call hMenuClose()
diff --git a/testautomation/framework/optional/includes/filedlg_multiselection.inc b/testautomation/framework/optional/includes/filedlg_multiselection.inc
index 834d7f17bade..d95ae9e1a8b0 100755
--- a/testautomation/framework/optional/includes/filedlg_multiselection.inc
+++ b/testautomation/framework/optional/includes/filedlg_multiselection.inc
@@ -56,6 +56,7 @@ testcase tFiledlgMultiselection1()
dim lTime as long
dim lWait as long
dim lTimeSum as long
+ dim iCurrentTime as long
dim iDocType as integer
@@ -71,7 +72,7 @@ testcase tFiledlgMultiselection1()
dim brc as boolean
const TESTFILE_COUNT = 60 ' the number of documents in cWorkPath
- const TESTFILE_TIMEOUT = 120000
+ const TESTFILE_TIMEOUT = 480000
' Minimum cleanup
while( getDocumentCount > 0 )
@@ -144,12 +145,20 @@ testcase tFiledlgMultiselection1()
lTime = GetSystemTicks
iOpenDocuments = 0
while ( iOpenDocuments < TESTFILE_COUNT )
- iOpenDocuments = getDocumentCount
- if ( (getSystemTicks - lTime) > TESTFILE_TIMEOUT ) then
- warnlog( "Loading files max wait time exceed (120 seconds), aborting" )
+ iOpenDocuments = getDocumentCount()
+ iCurrentTime = getSystemTicks - lTime
+
+ ' exit the hard way
+ if ( iCurrentTime > TESTFILE_TIMEOUT ) then
+ warnlog( "Loading files max wait time exceed (" & _
+ TESTFILE_TIMEOUT/1000 & "), aborting" )
goto endsub
endif
wend
+
+ if ( iCurrentTime > 120000 ) then
+ warnlog( "#i105289# Slow loading of files, should be less than 120 seconds on all platforms" )
+ endif
lWait = getSystemTicks - lTime ' time diff
printlog( "All documents loaded in " & lWait & " ms" )
diff --git a/testautomation/framework/required/includes/wizard_firsttime.inc b/testautomation/framework/required/includes/wizard_firsttime.inc
index b8560aab869c..ba40479b0eb7 100755
--- a/testautomation/framework/required/includes/wizard_firsttime.inc
+++ b/testautomation/framework/required/includes/wizard_firsttime.inc
@@ -243,6 +243,9 @@ testcase tUpdtWizardFirsttime
OptionenDlg.cancel()
endif
+ ' due to issue i105248 the Quickstart disabler needs to get called again, because the First Start Wizard resets the veto
+ call hDisableQuickstarterAPI()
+
do while( getDocumentCount() > 0 )
call hCloseDocument()
loop
@@ -250,4 +253,3 @@ testcase tUpdtWizardFirsttime
'///</ul>
endcase
-
diff --git a/testautomation/graphics/optional/includes/global/g_tables.inc b/testautomation/graphics/optional/includes/global/g_tables.inc
index 616ab1b8c72e..6b647963025c 100755
--- a/testautomation/graphics/optional/includes/global/g_tables.inc
+++ b/testautomation/graphics/optional/includes/global/g_tables.inc
@@ -40,7 +40,7 @@
' #1 tiInsertTableUsingMenu
' #1 tiInsertTableUsingButton
' #1 tiTableObjectBar
-' #1 tiInsertTableUsingToolbarbutton
+' #1 tiInsertTableUsingToolbarbuttonView
'*
'\******************************************************************
@@ -317,6 +317,7 @@ testcase tiTableObjectBar
DocumentDraw.TypeKeys "<SHIFT RIGHT>"
endif
Kontext "TableObjectBar"
+ if TableObjectBar.NotExists(2) then ViewToolbarsTable
ZellenVerbinden.Click
printlog "Cells merged."
diff --git a/testautomation/spreadsheet/optional/includes/arrayconstants/c_arrayconstants.inc b/testautomation/spreadsheet/optional/includes/arrayconstants/c_arrayconstants.inc
index 7b50548d0244..54402e5b5f16 100755
--- a/testautomation/spreadsheet/optional/includes/arrayconstants/c_arrayconstants.inc
+++ b/testautomation/spreadsheet/optional/includes/arrayconstants/c_arrayconstants.inc
@@ -141,6 +141,15 @@ testcase tArrayconstants01
'///Check that the cellvalue is "Err:533"
printlog "Check that the cellvalue is ""Err:533"""
call fCalcCompareCellValue ("A8",sError533)
+
+ '///In cell A9 enter "={-1;2;3}"
+ printlog "In cell A9 enter ""={-1;2;3}"""
+ call fCalcSelectRange ("A9")
+ kontext "DocumentCalc"
+ DocumentCalc.TypeKeys ("={-1;2;3} <RETURN>")
+ '///Check that the cellvalue is "-1"
+ printlog "Check that the cellvalue is ""-1"""
+ call fCalcCompareCellValue ("A9",-1)
'///Save document
printlog "Save document"
@@ -193,6 +202,11 @@ testcase tArrayconstants01
scellcontent = "={1;2;{3;4;5}}"
call fCalcCompareCellFormular ("A8",scellcontent)
+ '///+Check that the editline shows "={-1;2;3}" for cell A9
+ printlog " Check that the editline shows ""={-1;2;3}"" for cell A9"
+ scellcontent = "={-1;2;3}"
+ call fCalcCompareCellFormular ("A9",scellcontent)
+
'///Close Document
printlog "Close Document"
call hCloseDocument
diff --git a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc
index 84da9631ecb8..7f9d9f0627af 100755
--- a/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc
+++ b/testautomation/spreadsheet/optional/includes/so7pp1/c_so7_pp1_ibis.inc
@@ -146,6 +146,7 @@ testcase tIBIS111158
end if
'/// Close all disturbing menus
Kontext "ControlPropertiesDialog"
+ sleep(1)
ControlPropertiesDialog.close
sleep(2)
Kontext "FormularNavigator"
diff --git a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc
index 82d4951ced95..5614ada575ee 100755
--- a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc
+++ b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu2.inc
@@ -151,14 +151,14 @@ testcase tToolsMacro
printlog " Close ' BeanShell Macros' dialog by 'Close'"
ScriptOrganizer.Close
Call hCloseDocument
- printlog " Open testdocument 'gTesttoolPath + spreadsheet\required\input\DocwithMacro.ods'"
+ printlog " Open testdocument 'gTesttoolPath + spreadsheet\required\input\DocwithMacro.ods'"
Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\DocwithMacro.ods" ))
- Kontext
+ Kontext
if Active.exists then
Active.ok
end if
- Call sMakeReadOnlyDocumentEditable
- '/// Use 'Tools – Macro – Signature'
+ Printlog " Save document as 'user/work/DocwithMacro.ods'"
+ Call hFileSaveAsKill convertpath(gOfficePath & "user/work/DocwithMacro.ods")
printlog " Use 'Tools – Macro – Signature'"
ToolsMacrosSignature
Kontext "DigitalSignature"
diff --git a/testautomation/writer/optional/includes/fields/w_fields2.inc b/testautomation/writer/optional/includes/fields/w_fields2.inc
index 55e0ff590f9f..06f5df39a68d 100755
--- a/testautomation/writer/optional/includes/fields/w_fields2.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields2.inc
@@ -392,59 +392,65 @@ endcase
'-----------------------------------------------------------------
testcase tDocumentFilename
- if bAsianLan = true then
- QaErrorLog "No testing with Asian language. Aborting."
- exit sub
- end if
-
- Dim sTestFile as String
- Dim sFilename(4) as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
-
- sFilename(0) = "pageTest.sxw"
- sFilename(1) = "pageTest"
- sFilename(2) = Convertpath (gTesttoolpath + "writer\optional\input\fields\")
- sFilename(3) = sTestFile
-
- printlog "Insert/Fields/Other/Document / File name"
- '/// <b> Insert/Fields/Other/Document / File name </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<End><Return>"
-
- '/// Insert/Fields/Other/Document / File name
- '/// Insert File name, File name without extension ,
- '/// Path , Path/File name
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("File name")
- for i = 0 to 3
- Kontext "TabDokumentFeldbefehle"
- Formatliste.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift LEFT>" 'HOME
- Sleep 1
- if fGetFieldContent() <> sFilename(i) then
- Warnlog i &" - Should get " & sFilename(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
+ if bAsianLan = true then
+ QaErrorLog "No testing with Asian language. Aborting."
+ goto endsub
+ end if
+
+ Dim sOriginalFile as String
+ Dim sTestFile as String
+ Dim sFilename(4) as String
+ Dim i as Integer
+
+ sTestFile = Convertpath (gOfficepath + "user\work\pageTest.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+
+ sFilename(0) = "pageTest.sxw"
+ sFilename(1) = "pageTest"
+ sFilename(2) = Convertpath (gOfficepath + "user\work\")
+ sFilename(3) = sTestFile
+
+ printlog "Insert/Fields/Other/Document / File name"
+
+ Call hNewDocument
+
+ '/// Open test file pageTest.sxw
+ Call hFileOpen(sTestFile)
+
+ Call wTypeKeys "<MOD1 Home>"
+ Call wTypeKeys "<End><Return>"
+
+ printlog "Insert/Fields/Other/Document / File name"
+ printlog "Insert File name, File name without extension , Path , Path/File name"
+ printlog "Check if the insertion is correct"
+ Call fInsertFieldsOther("TabDokumentFeldbefehle")
+ Feldtyp.Select fGetType("File name")
+ for i = 0 to 3
+ Kontext "TabDokumentFeldbefehle"
+ Formatliste.Select i+1
+ Sleep 1
+ Einfuegen.Click
+ sleep 1
+ Call wTypeKeys "<F9>"
+ Sleep 2
+ Call wTypeKeys "<Shift LEFT>" 'HOME
+ Sleep 1
+ if fGetFieldContent() <> sFilename(i) then
+ Warnlog i &" - Should get " & sFilename(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<Delete>"
+ next i
+ Kontext "TabDokumentFeldbefehle"
+ TabDokumentFeldbefehle.Close
+
+ Call hCloseDocument
endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc
index 736e3649bf56..f0444a21271b 100755
--- a/testautomation/writer/optional/includes/fields/w_fields4.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields4.inc
@@ -267,74 +267,83 @@ endcase
'-----------------------------------------------------------------
testcase tDocInformationUserDefined
-qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
-goto endsub
-
- Dim sTestFile as String
- Dim sVarResult() as String
- Dim sFixResult() as String
- Dim i as integer
- Dim j as Integer
-
- j = UBound(sVarResult)
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sVarResult = Array( _
+ qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
+ goto endsub
+
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sVarResult() as String
+ Dim sFixResult() as String
+ Dim i as integer
+ Dim j as Integer
+
+ j = UBound(sVarResult)
+ sTestFile = Convertpath (gOfficepath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+
+ sVarResult = Array( _
"A1" , _
"B2" , _
"C3" , _
"D4" , _
)
- sFixResult = Array( _
+ sFixResult = Array( _
"Lennon" , _
"McCartney" , _
"Harrison" , _
"Star" , _
)
- printlog "Doc Information - User Defined"
- '/// <b> Doc Information - User Defined </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- '/// File / Properties / Description , input some
- '/// + text in Description
- Call fFileProperties("TabDokument")
- Info0.Settext sVarResult(0)
- Info1.Settext sVarResult(1)
- Info2.Settext sVarResult(2)
- Info3.Settext sVarResult(3)
- TabBenutzer.OK
-
- '/// Check if the User defined is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Info fields")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i= 0 to UBound(sVarResult)
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call hCloseDocument
+ printlog "Doc Information - User Defined"
+
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ '/// File / Properties / Description , input some
+ '/// + text in Description
+ Call fFileProperties("TabDokument")
+ Info0.Settext sVarResult(0)
+ Info1.Settext sVarResult(1)
+ Info2.Settext sVarResult(2)
+ Info3.Settext sVarResult(3)
+ TabBenutzer.OK
+
+ '/// Check if the User defined is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Info fields")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i= 0 to UBound(sVarResult)
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call hCloseDocument
endcase
@@ -342,103 +351,112 @@ endcase
testcase tDocInformationCreated
- Dim sTestFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "07/20/2000"
- sFixResult(2) = "11:41:21"
-
- printlog "Doc Information - Created"
- '/// <b> Doc Information - Created </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call fFindWord ("Created")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author :Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- '/// Check if the Created field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Created")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
+ Dim sTestFile as String
+ Dim sOriginalFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "07/20/2000"
+ sFixResult(2) = "11:41:21"
+
+ printlog "Doc Information - Created"
+ '/// <b> Doc Information - Created </b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+ Call sMakeReadOnlyDocumentEditable
+
+ Call fFindWord ("Created")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author :Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// File / Properties / General , check "Apply user
+ '/// + data" , click "delete" button
+ Call fFileProperties("TabDokument")
+ BenutzerdatenVerwenden.Check
+ Sleep 1
+ Loeschen.Click
+ Sleep 1
+ TabDokument.OK
+
+ '/// Check if the Created field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Created")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ Call hCloseDocument
endcase
@@ -446,240 +464,256 @@ endcase
testcase tDocInformationModified
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos.sxw" )
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/18/2000"
- sFixResult(2) = "11:40:11"
-
- printlog "Doc Information - Modified"
- '/// <b> Doc Information - Modified </b>
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
- Call hFileSaveAsKill (sSaveAsFile)
-
- Call fFindWord ("Modified")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the Modified field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Modified")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ Dim sTestFile as String
+ Dim sOriginalFile as String
+ Dim sSaveasFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "08/18/2000"
+ sFixResult(2) = "11:40:11"
+
+ printlog "Doc Information - Modified"
+ '/// <b> Doc Information - Modified </b>
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+ Call hFileSaveAsKill (sSaveAsFile)
+
+ Call fFindWord ("Modified")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// File / Properties / General , check "Apply user
+ '/// + data" , click "delete" button
+ Call fFileProperties("TabDokument")
+ BenutzerdatenVerwenden.Check
+ Sleep 1
+ Loeschen.Click
+ Sleep 1
+ TabDokument.OK
+
+ FileSave
+ try
+ Kontext "Active"
+ Active.Yes
+ catch
+ endcatch
+ Sleep 3
+
+ '/// Check if the Modified field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Modified")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
'-----------------------------------------------------------------
testcase tDocInformationModifiedSavefile
- QaErrorLog "#i102792# - tDocInformationModifiedSavefile outcommented due to issue."
- goto endsub
-
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos.sxw" )
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/18/2000"
- sFixResult(2) = "11:40:11"
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Modified (save file)"
- '/// <b> Doc Information - Modified (save file)</b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call fFindWord ("Modified")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Check if the Modified field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Modified")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- QAErrorlog "#i41327# Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- QAErrorlog "#i41327# Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ QaErrorLog "#i102792# - tDocInformationModifiedSavefile outcommented due to issue."
+ goto endsub
+
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sSaveasFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "08/18/2000"
+ sFixResult(2) = "11:40:11"
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ printlog "Doc Information - Modified (save file)"
+ '/// <b> Doc Information - Modified (save file)</b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ Call fFindWord ("Modified")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// Save the file as another file
+ Call hFileSaveAsKill(sSaveAsFile)
+
+ '/// Check if the Modified field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Modified")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ QAErrorlog "#i41327# Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ QAErrorlog "#i41327# Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -687,117 +721,126 @@ endcase
testcase tDocInformationPrinted
- Dim sTestFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/11/2004"
- sFixResult(2) = "11:46:06"
-
- printlog "Doc Information - Printed"
- '/// <b> Doc Information - Printed </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call fFindWord ("Last printed")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Call wTypeKeys "<Shift Right>"
- Sleep 1
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Print file
- FilePrint
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer! The testcase isn't tested !"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- goto NoTest
- end if
- else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- kontext "active"
- if active.exists(5) then
- QaErrorLog "Error Printing..."
- Active.ok
- end if
- end if
-
- '/// Check if the Printed field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Last printed")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should NOT get " & sFixResult(2)
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-NoTest:
- Call hCloseDocument
+ Dim sTestFile as String
+ Dim sOriginalFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "08/11/2004"
+ sFixResult(2) = "11:46:06"
+
+ printlog "Doc Information - Printed"
+ '/// <b> Doc Information - Printed </b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ Call fFindWord ("Last printed")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Call wTypeKeys "<Shift Right>"
+ Sleep 1
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// Print file
+ FilePrint
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Ok
+ QAErrorLog "No Default-Printer! The testcase isn't tested !"
+ Kontext "DruckenDlg"
+ Sleep 1
+ DruckenDlg.Cancel
+ goto NoTest
+ end if
+ else
+ Kontext "DruckenDlg"
+ Sleep 1
+ DruckenDlg.OK
+ kontext "active"
+ if active.exists(5) then
+ QaErrorLog "Error Printing..."
+ Active.ok
+ end if
+ end if
+
+ '/// Check if the Printed field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Last printed")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ Warnlog "Should NOT get " & sFixResult(2)
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ NoTest:
+ Call hCloseDocument
endcase
@@ -805,95 +848,104 @@ endcase
testcase tDocInformationRevisionnumber
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sVarResult = "17" : sFixResult = "4"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Revision number"
- '/// <b> Doc Information - Revision number</b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Press F9
- Call wTypeKeys "<F9>"
-
- '/// Save the file
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the Revision number field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Version")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sSaveasFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult as String
+ Dim sFixResult as String
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sVarResult = "17" : sFixResult = "4"
+
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ printlog "Doc Information - Revision number"
+ '/// <b> Doc Information - Revision number</b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// Save the file as another file
+ Call hFileSaveAsKill(sSaveAsFile)
+
+ '/// Press F9
+ Call wTypeKeys "<F9>"
+
+ '/// Save the file
+ FileSave
+ try
+ Kontext "Active"
+ Active.Yes
+ catch
+ endcatch
+ Sleep 3
+
+ '/// Check if the Revision number field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Version")
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult then
+ Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult then
+ Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -901,79 +953,87 @@ endcase
testcase tDocInformationTotaleditingtime
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sFixResult = "00:29:05"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Tatal editing time"
- '/// <b> Doc Information - Tatal editing time </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Press F9
- Call wTypeKeys "<F9>"
-
- Call fFindWord ("Accessed")
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult = fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Save the file
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the tatal editing time field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Accessed")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult then
- Warnlog "Should NOT get " & sVarResult
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sSaveasFile as String
+ Dim sVarResult as String
+ Dim sFixResult as String
+
+ sFixResult = "00:29:05"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ printlog "Doc Information - Tatal editing time"
+ '/// <b> Doc Information - Tatal editing time </b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ '/// Save the file as another file
+ Call hFileSaveAsKill(sSaveAsFile)
+
+ '/// Press F9
+ Call wTypeKeys "<F9>"
+
+ Call fFindWord ("Accessed")
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult = fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Save the file
+ FileSave
+ try
+ Kontext "Active"
+ Active.Yes
+ catch
+ endcatch
+ Sleep 3
+
+ '/// Check if the tatal editing time field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Accessed")
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult then
+ Warnlog "Should NOT get " & sVarResult
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult then
+ Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
+ end if
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields6.inc b/testautomation/writer/optional/includes/fields/w_fields6.inc
index 1d25c81ac69d..376813e22e40 100755
--- a/testautomation/writer/optional/includes/fields/w_fields6.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields6.inc
@@ -788,8 +788,6 @@ endcase
'-----------------------------------------------------------------
testcase tFunctionsCombineCharacter
-Warnlog "#i102752# - tFunctionsCombineCharacter outcommented due to bug."
-goto endsub
Dim sCombineCharacter as String
Dim sTestFile as String
diff --git a/testautomation/writer/optional/includes/fields/w_fields7.inc b/testautomation/writer/optional/includes/fields/w_fields7.inc
index 96e851691fa6..c73408d4702f 100755
--- a/testautomation/writer/optional/includes/fields/w_fields7.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields7.inc
@@ -188,6 +188,7 @@ testcase tL10NtestDate
end if
Dim sTestFile as String
+ Dim sOriginalFile as string
Dim sDate() as String
Dim iCountry() as Integer
Dim i , j as Integer
@@ -199,6 +200,7 @@ testcase tL10NtestDate
if iSprache <> 01 then
QAErrorlog "This is a English-only testcase"
+ goto endsub
end if
Call hNewDocument
@@ -219,7 +221,16 @@ testcase tL10NtestDate
ExtrasOptionenDlg.Cancel
Call hCloseDocument
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Date.sxw")
+ sTestFile = Convertpath (gOfficepath + "user\work\Date.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Date.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+
sDate = Array( _
"Tuesday, August 3, 2004" , _
@@ -244,7 +255,6 @@ testcase tL10NtestDate
'/// Open test file Date.sxw
Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
'/// Check if Date is changed after language is changed
j = UBound(iCountry)
@@ -296,10 +306,11 @@ endcase
testcase tL10NtestTime
if iSprache <> 1 then
QaErrorLog "Currently no any other language than English. Aborting."
- exit sub
+ goto endsub
end if
Dim sTestFile as String
+ Dim sOriginalFile as string
Dim sTime() as String
Dim iCountry() as Integer
Dim i as Integer
@@ -312,6 +323,7 @@ testcase tL10NtestTime
if iSprache <> 01 then
QAErrorlog "This is a English-only testcase"
+ goto endsub
end if
Call hNewDocument
@@ -332,7 +344,16 @@ testcase tL10NtestTime
ExtrasOptionenDlg.Cancel
Call hCloseDocument
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Time.sxw")
+ sTestFile = Convertpath (gOfficepath + "user\work\Time.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Time.sxw")
+ ' document has to be copied to local file system to avoid opening a read-only file
+ ' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
+ FileCopy (sOriginalFile, sTestFile)
+ if hFileExists ( sTestFile ) = false then
+ Warnlog "Test document couldn't be copied to local file system. Test aborted!"
+ goto endsub
+ end if
+
sTime = Array( _
"04:46:08 PM" , _
@@ -357,7 +378,6 @@ testcase tL10NtestTime
'/// Open test file Time.sxw
Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
'/// Check if time is changed after language is changed
j = UBound(iCountry)
diff --git a/testautomation/writer/optional/includes/option/wh_o_1.inc b/testautomation/writer/optional/includes/option/wh_o_1.inc
index c27598c2816a..508030bdc4d7 100755
--- a/testautomation/writer/optional/includes/option/wh_o_1.inc
+++ b/testautomation/writer/optional/includes/option/wh_o_1.inc
@@ -559,7 +559,7 @@ testcase tToolsOptionsHTMLGrid
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.Cancel
- sleep (2)
+ sleep (4)
'-------------------------------------------------------------------------------
printlog ("'/// Function Test: Grid Resolution ///'")
diff --git a/testautomation/writer/optional/includes/option/wh_o_2.inc b/testautomation/writer/optional/includes/option/wh_o_2.inc
index 998aab11714a..ca7c0a789349 100755
--- a/testautomation/writer/optional/includes/option/wh_o_2.inc
+++ b/testautomation/writer/optional/includes/option/wh_o_2.inc
@@ -130,7 +130,7 @@ testcase tToolsOptionsHTMLPrint
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- sleep (2)
+ sleep (4)
Call hFileSaveAsKill(gOfficepath + "user\work\printtest.html")
Call hCloseDocument
diff --git a/testautomation/writer/required/includes/w_002_.inc b/testautomation/writer/required/includes/w_002_.inc
index d1e1f90986cf..1665b9aed268 100755
--- a/testautomation/writer/required/includes/w_002_.inc
+++ b/testautomation/writer/required/includes/w_002_.inc
@@ -664,7 +664,6 @@ endcase
'---------------------------------------------------
testcase tEditAutotext
- Dim j as integer
Dim k as integer
Dim i as integer
Dim CurrentEntryNr as integer
@@ -679,16 +678,14 @@ testcase tEditAutotext
DialogTest ( AutoText )
Kontext "AutoText"
-
- PrintLog "Click Categories"
- Bereiche.Click
- Sleep 1
-
Printlog "If it exists: Delete DummyAutotext."
if wDeleteAutotext("DummyAutotext") = true then
qaerrorlog "DummyAutotext from previous testrun found, now deleted."
end if
+ PrintLog "Click Categories"
+ Bereiche.Click
+ Sleep 1
Kontext "BereicheBearbeitenAutoText"
if BereicheBearbeitenAutoText.Exists then
DialogTest ( BereicheBearbeitenAutoText )
diff --git a/testautomation/writer/tools/includes/w_tool2.inc b/testautomation/writer/tools/includes/w_tool2.inc
index e9c9df318a53..280d18b51677 100755
--- a/testautomation/writer/tools/includes/w_tool2.inc
+++ b/testautomation/writer/tools/includes/w_tool2.inc
@@ -347,7 +347,12 @@ function wDeleteAutotext(vAutotextName as string) as boolean
'/// returns true if Autotext could be deleted
'/// Attention: Autotext-Dialog leaves open after deleting autotext
- Dim j as integer, sAll as integer
+ Dim j as integer
+ Dim ik as integer
+ Dim bDeleted as boolean
+ Dim sAllGroups as integer
+ Dim sAllInGroups as integer
+
Kontext "Autotext"
if Not Autotext.Exists then EditAutotext
@@ -367,30 +372,40 @@ function wDeleteAutotext(vAutotextName as string) as boolean
wait 500
next j
- Liste.Select 1
- Liste.TypeKeys "+"
- sAll = Liste.GetItemCount
- For j = 1 to sAll
- Liste.TypeKeys "<Down>"
- if Liste.Gettext = vAutotextName then
- try
- Menue.Click
- wait 500
- Call hMenuSelectNr ( 3 )
- Kontext "Active"
- if Active.Exists and Active.GetRT = 304 then
- Active.yes
- wDeleteAutotext = true
- else
- Warnlog "No messages to confirm deleting the Autotext!"
- end if
- exit for
- catch
- Warnlog "Menu Autotext->'Delete' disabled ! Test failed !"
- endcatch
- end if
- Liste.TypeKeys "+"
- sAll = Liste.GetItemCount
- next j
+ bDeleted = false
+ ' count all groups
+ sAllGroups = Liste.GetItemCount
+ ' travel through all groups
+ For ik = 1 to sAllGroups
+ Liste.Select ik
+ Liste.TypeKeys "+"
+
+ sAllInGroups = Liste.GetItemCount - sAllGroups
+ For j = 1 to sAllInGroups
+ Liste.TypeKeys "<Down>"
+ if Liste.Gettext = vAutotextName then
+ try
+ Menue.Click
+ wait 500
+ Call hMenuSelectNr ( 3 )
+ Kontext "Active"
+ if Active.Exists and Active.GetRT = 304 then
+ Active.yes
+ wDeleteAutotext = true
+ else
+ Warnlog "No messages to confirm deleting the Autotext!"
+ end if
+ bDeleted = true
+ exit for
+ catch
+ Warnlog "Menu Autotext->'Delete' disabled ! Test failed !"
+ endcatch
+ end if
+ next j
+ if bDeleted = true then exit for
+ ' close group
+ Liste.Select ik
+ Liste.TypeKeys "-"
+ next ik
end function