diff options
Diffstat (limited to 'testautomation/writer/optional/includes/fields')
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields1.inc | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields2.inc | 179 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields3.inc | 20 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields4.inc | 114 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields5.inc | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields6.inc | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | testautomation/writer/optional/includes/fields/w_fields7.inc | 35 |
7 files changed, 120 insertions, 236 deletions
diff --git a/testautomation/writer/optional/includes/fields/w_fields1.inc b/testautomation/writer/optional/includes/fields/w_fields1.inc index 2f727260b6c2..2f727260b6c2 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields1.inc +++ b/testautomation/writer/optional/includes/fields/w_fields1.inc diff --git a/testautomation/writer/optional/includes/fields/w_fields2.inc b/testautomation/writer/optional/includes/fields/w_fields2.inc index 4f2c5c39388c..168fed204ebe 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields2.inc +++ b/testautomation/writer/optional/includes/fields/w_fields2.inc @@ -319,8 +319,8 @@ testcase tDocumentChapter Call hNewDocument '/// Open test file chapterTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + Call wTypeKeys "<MOD1 End><Return>" @@ -357,12 +357,12 @@ endcase testcase tDocumentDate Dim sDate as String - + printlog "Insert/Fields/Other/Document / Date" '/// <b> Insert/Fields/Other/Document / Date </b> - + Call hNewDocument - + '/// Insert/Fields/Other/Document / Date '/// Check if the insertion is correct Call fInsertFieldsOther("TabDokumentFeldbefehle") @@ -371,14 +371,14 @@ testcase tDocumentDate Einfuegen.Click Kontext "TabDokumentFeldbefehle" TabDokumentFeldbefehle.Close - + Call wTypeKeys "<Shift Left>" EditCopy Sleep 1 if GetClipboard = "" then Warnlog "Field returns an empty string" end if - + Call hCloseDocument endcase @@ -386,65 +386,57 @@ endcase '----------------------------------------------------------------- testcase tDocumentFilename - 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 FileExists ( 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 + + if ( bAsianLan ) then + QaErrorLog "No testing with Asian language. Aborting." + goto endsub + 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) = hGetWorkPath() + sFilename(3) = hFileGetLocalPath( sTestFile ) + + printlog "Insert/Fields/Other/Document / File name" + + Call hNewDocument + + '/// Open test file pageTest.sxw + hFileOpenLocally( 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 @@ -470,8 +462,8 @@ testcase tDocumentPage Call hNewDocument '/// Open test file pageTest.sxw which includes 3 pages - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Go to the 2nd page Call wTypeKeys "<MOD1 Home>" @@ -867,22 +859,12 @@ endcase testcase tDocumentStatistics Dim sTestFile as String - Dim sOriginalFile as string Dim sStatistics() as String Dim sType as string Dim i as Integer sStatistics = Array( "2", "2", "3", "13", "2", "2", "1" ) - - sTestFile = Convertpath (gOfficepath + "user\work\statisticsTest.sxw") - sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if + sTestFile= Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.sxw") printlog "Insert/Fields/Other/Document / Statistics" '/// <b> Insert/Fields/Other/Document / Statistics </b> @@ -890,7 +872,7 @@ testcase tDocumentStatistics '/// Open test file statisticsTest.sxw which includes '/// 2 tables , 2 pictures , 22 paragraph , 1 object , '/// 2 words , 12 characters and 2 pages - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) Call wTypeKeys "<MOD1 Home><Down>" @@ -928,40 +910,31 @@ endcase testcase tDocumentTemplate Dim sTestFile as String - Dim sOriginalFile as string Dim sDirectory as String Dim oDirectory as String Dim sLanguage as String Dim sFormat() as String Dim sResult(6) as String Dim i as Integer - + sLanguage = fGetDirLanguage() - sTestFile = Convertpath (gOfficepath + "user\work\diploma.ott") - sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\diploma.ott") - ' 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if - - sResult(0) = fGetCateGory() + sTestFile = convertpath( gTesttoolpath + "writer\optional\input\fields\diploma.ott" ) + + sResult(0) = fGetCategory() sResult(1) = "diploma.ott" sResult(2) = "diploma" - sResult(3) = Convertpath (gOfficepath + "user\work") - sResult(4) = sTestFile + sResult(3) = convertpath( gOfficePath & "user/work" ) + sResult(4) = hGetWorkFile( sResult( 1 ) ) sResult(5) = fGetStyle() - + printlog "Insert/Fields/Other/Document / Template" '/// <b> Insert/Fields/Other/Document / Template </b> - + '/// Open test file diploma.ott - Call hFileOpen(sTestFile) - + hFileOpenLocally( sTestFile ) + Call wTypeKeys "<MOD1 Home>" - + '/// Insert/Fields/Other/Document / Template '/// Insert Category , File name , File name without extension , '/// + Path , Path/File name , Style @@ -991,10 +964,8 @@ testcase tDocumentTemplate next i Kontext "TabDokumentFeldbefehle" TabDokumentFeldbefehle.Close - - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop + + hFileCloseAll() endcase '----------------------------------------------------------------- diff --git a/testautomation/writer/optional/includes/fields/w_fields3.inc b/testautomation/writer/optional/includes/fields/w_fields3.inc index 7b4e7f50722b..64261c7e1ac6 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields3.inc +++ b/testautomation/writer/optional/includes/fields/w_fields3.inc @@ -94,8 +94,8 @@ testcase tSetReferenceNoSelection Call hNewDocument '/// Open test file pageTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Set curson to the 2nd page Call wTypeKeys "<MOD1 Home>" @@ -182,8 +182,8 @@ testcase tInsertReferencePage Call hNewDocument '/// Open test file pageTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Set curson to the 2nd page Call wTypeKeys "<MOD1 Home>" @@ -242,8 +242,8 @@ testcase tInsertReferenceChapter Call hNewDocument '/// Open test file chapterTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Set curson to the 2nd line Call wTypeKeys "<MOD1 Home>" @@ -685,8 +685,8 @@ testcase tInsertBookmarkPage Call hNewDocument '/// Open test file pageTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Set curson to the 2nd page Call wTypeKeys "<MOD1 Home>" @@ -743,8 +743,8 @@ testcase tInsertBookmarkChapter Call hNewDocument '/// Open test file chapterTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Set curson to the 2nd line Call wTypeKeys "<MOD1 Home>" diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc index d1e16a1a36be..315c6b0f96d3 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields4.inc +++ b/testautomation/writer/optional/includes/fields/w_fields4.inc @@ -67,8 +67,8 @@ testcase tDocInformationTitle Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// File / Properties / Description , input some '/// + new text in Title @@ -119,8 +119,8 @@ testcase tDocInformationSubject Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// File / Properties / Description , input some '/// + text in Subject @@ -171,8 +171,8 @@ testcase tDocInformationKeywords Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// File / Properties / Description , input some '/// + text in Keywords @@ -223,8 +223,8 @@ testcase tDocInformationDescription Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// File / Properties / Description , input some '/// + text in Description @@ -264,23 +264,13 @@ testcase tDocInformationUserDefined QAErrorLog "#i112077#Tabpage 'Custom properties' has no declaration" 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if - + sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw" sVarResult = Array( _ "A1" , _ "B2" , _ @@ -301,7 +291,7 @@ testcase tDocInformationUserDefined Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) '/// File / Properties / Description , input some '/// + text in Description @@ -344,26 +334,17 @@ endcase testcase tDocInformationCreated - 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 sTestFile 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if + sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw" sVarResult(0) = sFirstName1 + " " + sLastName1 sVarResult(1) = fGetDate1(Date) @@ -378,8 +359,8 @@ testcase tDocInformationCreated Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + Call fFindWord ("Created") Call wTypeKeys "<End><Right><Down><Down><Down><Home>" @@ -458,7 +439,6 @@ endcase testcase tDocInformationModified Dim sTestFile as String - Dim sOriginalFile as String Dim sSaveasFile as String Dim sFirstName as String Dim sLastName as String @@ -469,15 +449,7 @@ testcase tDocInformationModified 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if + sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw" sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" ) sVarResult(0) = sFirstName1 + " " + sLastName1 @@ -495,7 +467,7 @@ testcase tDocInformationModified Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) Call hFileSaveAsKill (sSaveAsFile) Call fFindWord ("Modified") @@ -595,7 +567,6 @@ testcase tDocInformationModifiedSavefile goto endsub Dim sTestFile as String - Dim sOriginalFile as string Dim sSaveasFile as String Dim sFirstName as String Dim sLastName as String @@ -606,15 +577,7 @@ testcase tDocInformationModifiedSavefile 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if + sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw" sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" ) sVarResult(0) = sFirstName1 + " " + sLastName1 @@ -632,7 +595,7 @@ testcase tDocInformationModifiedSavefile Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) Call fFindWord ("Modified") Call wTypeKeys "<End><Right><Down><Down><Down><Home>" @@ -715,7 +678,6 @@ endcase testcase tDocInformationPrinted Dim sTestFile as String - Dim sOriginalFile as String Dim sFirstName as String Dim sLastName as String Dim sFirstName1 as String @@ -725,17 +687,7 @@ testcase tDocInformationPrinted 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if - - + sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw" sVarResult(0) = sFirstName1 + " " + sLastName1 sVarResult(1) = fGetDate1(Date) @@ -749,7 +701,7 @@ testcase tDocInformationPrinted Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) Call fFindWord ("Last printed") Call wTypeKeys "<End><Right><Down><Down><Down><Home>" @@ -842,7 +794,6 @@ endcase testcase tDocInformationRevisionnumber Dim sTestFile as String - Dim sOriginalFile as string Dim sSaveasFile as String Dim sFirstName as String Dim sLastName as String @@ -854,15 +805,7 @@ testcase tDocInformationRevisionnumber 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if + sTestFile = gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw" sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" ) if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile ) @@ -873,7 +816,7 @@ testcase tDocInformationRevisionnumber Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) '/// Change author to author : Test2 Test1 ToolsOptions @@ -947,21 +890,12 @@ endcase testcase tDocInformationTotaleditingtime 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if + sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw") sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" ) if FileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile ) @@ -972,7 +906,7 @@ testcase tDocInformationTotaleditingtime Call hNewDocument '/// Open test file fields_docinfos.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) '/// Save the file as another file Call hFileSaveAsKill(sSaveAsFile) diff --git a/testautomation/writer/optional/includes/fields/w_fields5.inc b/testautomation/writer/optional/includes/fields/w_fields5.inc index 334d01906307..75f94e8a3351 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields5.inc +++ b/testautomation/writer/optional/includes/fields/w_fields5.inc @@ -722,7 +722,7 @@ testcase tVariablesDDEFieldManual '/// Open the test file which you just closed , add something , '/// Save the file - Call hFileOpen(sDDEFile) + hFileOpenLocally( sDDEFile) Call wTypeKeys "<MOD1 Home>" Call wTypeKeys "XYZ" FileSave @@ -818,7 +818,7 @@ testcase tVariablesDDEFieldAutomatic '/// Open the test file which you just closed , add something , '/// Save the file - Call hFileOpen(sDDEFile) + hFileOpenLocally( sDDEFile) Call wTypeKeys "<MOD1 Home>" Call wTypeKeys "XYZ" FileSave diff --git a/testautomation/writer/optional/includes/fields/w_fields6.inc b/testautomation/writer/optional/includes/fields/w_fields6.inc index e310b67740af..f29eff451edb 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields6.inc +++ b/testautomation/writer/optional/includes/fields/w_fields6.inc @@ -795,8 +795,8 @@ testcase tFunctionsCombineCharacter Call hNewDocument '/// Open test file pageTest.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + Call wTypeKeys "<MOD1 Home>" Call wTypeKeys "<Right>" diff --git a/testautomation/writer/optional/includes/fields/w_fields7.inc b/testautomation/writer/optional/includes/fields/w_fields7.inc index 5893e324366b..c5b21d00d5eb 100755..100644 --- a/testautomation/writer/optional/includes/fields/w_fields7.inc +++ b/testautomation/writer/optional/includes/fields/w_fields7.inc @@ -119,8 +119,8 @@ testcase tL10NtestAboveBelow Call hNewDocument '/// Open test file AboveBelow.sxw - Call hFileOpen(sTestFile) - Call sMakeReadOnlyDocumentEditable + hFileOpenLocally( sTestFile ) + '/// Check if reference above/below is changed after language is changed @@ -182,7 +182,6 @@ 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 @@ -215,17 +214,7 @@ testcase tL10NtestDate ExtrasOptionenDlg.Cancel Call hCloseDocument - 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if - - + sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Date.sxw") sDate = Array( _ "Tuesday, August 3, 2004" , _ "mardi 3 août 2004" , _ @@ -248,7 +237,7 @@ testcase tL10NtestDate Call hNewDocument '/// Open test file Date.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) '/// Check if Date is changed after language is changed j = UBound(iCountry) @@ -304,7 +293,6 @@ testcase tL10NtestTime end if Dim sTestFile as String - Dim sOriginalFile as string Dim sTime() as String Dim iCountry() as Integer Dim i as Integer @@ -338,17 +326,8 @@ testcase tL10NtestTime ExtrasOptionenDlg.Cancel Call hCloseDocument - 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 FileExists ( sTestFile ) = false then - Warnlog "Test document couldn't be copied to local file system. Test aborted!" - goto endsub - end if - - + + sTestFile = gTesttoolpath + "writer\optional\input\fields\Time.sxw" sTime = Array( _ "04:46:08 PM" , _ "04:46:08 PM" , _ @@ -371,7 +350,7 @@ testcase tL10NtestTime Call hNewDocument '/// Open test file Time.sxw - Call hFileOpen(sTestFile) + hFileOpenLocally( sTestFile ) '/// Check if time is changed after language is changed j = UBound(iCountry) |