diff options
Diffstat (limited to 'testautomation/writer/required')
18 files changed, 1456 insertions, 1423 deletions
diff --git a/testautomation/writer/required/includes/w_001_.inc b/testautomation/writer/required/includes/w_001_.inc index 24292afc4a2a..8cd43ccbcbae 100644..100755 --- a/testautomation/writer/required/includes/w_001_.inc +++ b/testautomation/writer/required/includes/w_001_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Required-Testcases for the File-menu. '* @@ -55,9 +55,6 @@ end sub testcase tFileNewLabels -QAErrorLog "#i102218# - tFileNewLabels outcommented due to bug." -goto endsub - Dim iSheetFormat as integer Dim iBrandIndex as integer Dim iType as integer @@ -78,7 +75,7 @@ goto endsub cBrandList( 10 ) = "Sigel" PrintLog "Open Labels-dialog with File / New / Labels" - if ( hCreateLabels ) then + if ( hCreateLabels() ) then Call DialogTest( TabEtiketten ) @@ -86,7 +83,8 @@ goto endsub PrintLog "Check number of brands and types (see #i44801# for details)" For iSheetFormat = 1 to 2 - + + kontext "TabEtiketten" Select Case( iSheetFormat ) Case 1 Endlos.Check @@ -247,9 +245,6 @@ endcase testcase tFileNewBusinessCards -QAErrorLog "#i102218# - tFileNewBusinessCards outcommented due to bug." -goto endsub - Dim iFormat as integer Dim iBrand as integer Dim iType as integer @@ -359,7 +354,7 @@ goto endsub Kontext "Active" if ( Active.GetRT = 304 ) then - Warnlog( "UNexpected messagebox: " & Active.GetText() ) + Warnlog( "Unexpected messagebox: " & Active.GetText() ) Active.Ok end if diff --git a/testautomation/writer/required/includes/w_001a_.inc b/testautomation/writer/required/includes/w_001a_.inc index ad4951e89a44..b33751752512 100644..100755 --- a/testautomation/writer/required/includes/w_001a_.inc +++ b/testautomation/writer/required/includes/w_001a_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description: Testcases for the Writer Required-test. '* @@ -224,23 +224,15 @@ testcase tFileTemplatesAddressbookSource UseBindings FileTemplatesAddressbookSource - WaitSlot(2000) PrintLog " In 'Address Book Assignement' dialog click pushbutton 'Administrate'" Kontext "AddressbookSource" - if AddressbookSource.Exists then + if AddressbookSource.Exists( 2 ) then Call DialogTest (AddressbookSource) Administrate.Click - Sleep 2 + PrintLog " Close 'Data Source Administration' with 'Cancel'" Kontext "DatabaseProperties" - if Not DatabaseProperties.Exists then - Kontext "AddressSourceAutopilot" - if AddressSourceAutopilot.Exists then - AddressSourceAutopilot.Cancel - end if - Kontext "AddressbookSource" - AddressbookSource.Cancel - else + if ( DatabaseProperties.Exists( 2 ) ) then PrintLog " DatabaseProperties.SetPage TabConnection" Kontext "TabConnection" Call DialogTest ( TabConnection ) @@ -249,6 +241,13 @@ testcase tFileTemplatesAddressbookSource Kontext "AddressbookSource" PrintLog " Close dialog" AddressbookSource.Cancel + else + Kontext "AddressSourceAutopilot" + if AddressSourceAutopilot.Exists( 1 ) then + AddressSourceAutopilot.Cancel + end if + Kontext "AddressbookSource" + AddressbookSource.Cancel end if end if @@ -315,13 +314,8 @@ testcase tFilePagePreview gehtnicht = FALSE printlog " Open new document" Select Case gApplication - Case "WRITER" - Call hNewDocument - - Case "MASTERDOCUMENT" - Call hNewDocument - - Case "HTML" + Case "WRITER", "MASTERDOCUMENT" : hNewDocument() + Case else printlog "Not in Writer/Web!" goto endsub end select @@ -358,9 +352,9 @@ testcase tFilePagePreview if Active.Exists then QAErrorlog "No default printer!" Active.ok - Sleep 1 + Kontext "Printing" - if Printing.Exists then Printing.Cancel + if Printing.Exists( 2 ) then Printing.Cancel else printlog " Close 'Print' dialog with cancel" Kontext "Printing" @@ -392,9 +386,9 @@ testcase tFilePrinterSetup if Active.GetRT = 304 then QAErrorLog "No Default Printer!" Active.Ok - Sleep 2 + Kontext "DruckerEinrichten" - if DruckerEinrichten.Exists then + if DruckerEinrichten.Exists( 2 ) then Call DialogTest ( DruckerEinrichten ) DruckerEinrichten.Cancel end if diff --git a/testautomation/writer/required/includes/w_001b_.inc b/testautomation/writer/required/includes/w_001b_.inc index 979ae00504b8..e20d497482f0 100644..100755 --- a/testautomation/writer/required/includes/w_001b_.inc +++ b/testautomation/writer/required/includes/w_001b_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Required-Testcases for the File-menu. '* @@ -90,11 +90,8 @@ testcase tFileSendCreateHTMLDocument PrintLog "- File / Send / Create HTML-Dokument" PrintLog "Open new document" Select Case gApplication - Case "WRITER" - Call hNewDocument - Case "MASTERDOCUMENT" - Call hNewDocument - Case "HTML" + Case "WRITER", "MASTERDOCUMENT" : hNewDocument() + Case else printlog "Not in WriterWeb!" goto endsub end select @@ -159,11 +156,8 @@ testcase tFileSendOutlineToPresentation endif Kontext "Navigator" - if Navigator.Exists then Navigator.Close - PrintLog "Close documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop + hCloseDialog( Navigator, "Close,optional" ) + hFileCloseAll() endcase '----------------------------------------------------------- @@ -259,13 +253,9 @@ testcase tFileSendCreateAutoabstract endcatch Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 + hCloseDialog( Navigator, "Close,optional" ) + hFileCloseAll() - PrintLog "Close active documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop endcase '----------------------------------------------------------- @@ -321,12 +311,11 @@ testcase tFileSendAutoabstractToPresentation Warnlog "- Outline in Impress not created!" endif Kontext "Navigator" - if Navigator.Exists then Navigator.Close - Sleep 1 + hCloseDialog( Navigator, "Close,optional" ) Call hCloseDocument PrintLog "Close active document" - Call wDocSetContext + hSetDocumentContext() FileClose endcase '-------------------------------------------------------------------------------------------------------------------------------------------- @@ -694,10 +683,7 @@ testcase tMasterDocFileSendOutlineToPresentation endif Kontext "Navigator" - if Navigator.Exists then - Navigator.Close - WaitSlot() - endif + hCloseDialog( Navigator, "Close,optional" ) PrintLog "Close documents" hFileCloseAll() @@ -755,10 +741,7 @@ testcase tMasterDocFileSendCreateAutoabstract Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile ) Kontext "Navigator" - if ( Navigator.Exists ) then - Navigator.Close - WaitSlot() - endif + hCloseDialog( Navigator, "Close,optional" ) Kontext "DocumentWriter" PrintLog "File / Send / Create Autoabstract" @@ -788,10 +771,7 @@ testcase tMasterDocFileSendCreateAutoabstract endif Kontext "Navigator" - if ( Navigator.Exists ) then - Navigator.Close() - WaitSlot() - endif + hCloseDialog( Navigator, "Close,optional" ) PrintLog "Close documents" hFileCloseAll() @@ -811,10 +791,7 @@ testcase tMasterDocFileSendAutoabstractToPresentation Call hFileOpen ( gTesttoolPath + "writer\required\input\" + sFile ) Kontext "Navigator" - if Navigator.Exists then - Navigator.Close - Waitslot() - endif + hCloseDialog( Navigator, "Close,optional" ) Kontext "DocumentWriter" PrintLog "File / Send / Create Autoabstract To Presentation" @@ -854,15 +831,12 @@ testcase tMasterDocFileSendAutoabstractToPresentation endif Kontext "Navigator" - if Navigator.Exists then - Navigator.Close - WaitSlot() - endif + hCloseDialog( Navigator, "Close,optional" ) Call hCloseDocument PrintLog "Close active document" - Call wDocSetContext + hSetDocumentContext() FileClose gApplication = "WRITER" diff --git a/testautomation/writer/required/includes/w_002_.inc b/testautomation/writer/required/includes/w_002_.inc index 73de7ba6edeb..20ddaf92a6b9 100755 --- a/testautomation/writer/required/includes/w_002_.inc +++ b/testautomation/writer/required/includes/w_002_.inc @@ -1,5 +1,5 @@ 'encoding UTF-8 Do not remove or change this line! -'************************************************************************** +'******************************************************************************* ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ' ' Copyright 2000, 2010 Oracle and/or its affiliates. @@ -23,13 +23,13 @@ ' <http://www.openoffice.org/license.html> ' for a copy of the LGPLv3 License. ' -'/************************************************************************ -'* ** -'* owner : helge.delfs@sun.com ** -'* ** -'* short description : ** -'* ** -'\****************************************************************** +'/****************************************************************************** +'* ** +'* owner : helge.delfs@oracle.com ** +'* ** +'* short description : ** +'* ** +'\****************************************************************************** sub w_002_ @@ -60,14 +60,13 @@ sub w_002_ Call tEditImageMap Call tEditObjectEdit - 'Writer Web - gApplication = "HTML" - Call tHtmlDocEditFields - gApplication = "WRITER" - 'Writer Master Document gApplication = "MASTERDOCUMENT" Call tMasterDocEditNavigator + + gApplication "HTML" + Call tEditFields + gApplication = "WRITER" end sub @@ -82,6 +81,7 @@ testcase tEditUndoRedo PrintLog "Insert table" Call hTabelleEinfuegen + PrintLog "Edit / Undo" hUseAsyncSlot( "EditUndo" ) @@ -93,13 +93,14 @@ testcase tEditUndoRedo PrintLog "File / Close" hUseAsyncSlot( "FileClose" ) - Kontext - if ( Active.Exists ) then - if Active.GetRT = 304 then - WarnLog ( "Messagebox: '" & Active.Gettext & "' should not appear" ) - Active.No - end if + + Kontext "Active" + if ( Active.Exists( 1 ) ) then + warnlog( "No messagebox was expected upon file close" ) + printlog( Active.getText ) + Active.no() end if + endcase '---------------------------------------------------- @@ -172,64 +173,62 @@ testcase tEditPasteSpecial PrintLog "Open new document" Call hNewDocument - if gSamePC = TRUE then - PrintLog " - External Clipboard" - PrintLog "Enter some text in external clipboard" - SetClipboard "Text from external clipboard!" + PrintLog " - External Clipboard" + PrintLog "Enter some text in external clipboard" + SetClipboard "Text from external clipboard!" - PrintLog "Paste from external clipboard with Edit / Paste in Office" - hUseAsyncSlot( "EditPaste" ) + PrintLog "Paste from external clipboard with Edit / Paste in Office" + hUseAsyncSlot( "EditPaste" ) - Call wTypeKeys("<Mod1 A>") - Wait(200) - hUseAsyncSlot( "EditCopy" ) + Call wTypeKeys("<Mod1 A>") + Wait(200) + hUseAsyncSlot( "EditCopy" ) - if GetClipboardText <> "Text from external clipboard!" then - Warnlog "External Clipboard not available!" - Warnlog "Is: " & GetClipboardText - end if - Call wTypeKeys("<End><Return>") - SetClipboard "" - SetClipboard "2nd Text from external clipboard!" - try - PrintLog "Edit / Paste / Special" - hUseAsyncSlot( "EditPasteSpecialWriter" ) - - Kontext "InhaltEinfuegen" - if ( InhaltEinfuegen.Exists( 2 ) ) then - try - Auswahl.Select 1 - catch - Warnlog "Unable to select entry in format list !" - InhaltEinfuegen.Close - Call hCloseDocument - goto endsub - endcatch - InhaltEinfuegen.OK - Wait(200) - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - Warnlog "Maybe Bug#109331" - Warnlog Active.Gettext - try - Active.Ok - catch - Active.No - endcatch - end if - else - Call wTypeKeys("<Home><Shift End>") - hUseAsyncSlot( "EditCopy" ) - if GetClipboardText <> "2nd Text from external clipboard!" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText + if GetClipboardText <> "Text from external clipboard!" then + Warnlog "External Clipboard not available!" + Warnlog "Is: " & GetClipboardText + end if + Call wTypeKeys("<End><Return>") + SetClipboard "" + SetClipboard "2nd Text from external clipboard!" + try + PrintLog "Edit / Paste / Special" + hUseAsyncSlot( "EditPasteSpecialWriter" ) + + Kontext "InhaltEinfuegen" + if ( InhaltEinfuegen.Exists( 2 ) ) then + try + Auswahl.Select 1 + catch + Warnlog "Unable to select entry in format list !" + InhaltEinfuegen.Close + Call hCloseDocument + goto endsub + endcatch + InhaltEinfuegen.OK + Wait(200) + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + Warnlog "Maybe Bug#109331" + Warnlog Active.Gettext + try + Active.Ok + catch + Active.No + endcatch end if else - Warnlog "Dialog 'Paste Special' is not up!" + Call wTypeKeys("<Home><Shift End>") + hUseAsyncSlot( "EditCopy" ) + if GetClipboardText <> "2nd Text from external clipboard!" then Warnlog "Wrong Text inserted! Is: " & GetClipboardText end if - catch - Exceptlog - endcatch - end if + else + Warnlog "Dialog 'Paste Special' is not up!" + end if + catch + Exceptlog + endcatch PrintLog " - Internal Clipboard with StarOffice Writer-Text" PrintLog "Enter some text in writer and copy it" @@ -316,11 +315,7 @@ testcase tEditChanges PrintLog "Passwort-dialog has to come up, cancel it" Kontext "Passwort" - if ( Passwort.Exists( 1 ) ) then - Passwort.Close - else - Warnlog "Password-dialog is not up!" - end if + hCloseDialog( Passwort, "close" ) PrintLog "Edit / Changes / Accept or Reject" EditChangesAcceptOrReject @@ -368,52 +363,67 @@ endcase '---------------------------------------------------- testcase tEditCompareDocument + PrintLog "- Edit/Compare Document" - Select Case gApplication - Case "WRITER" - Call hNewDocument - PrintLog "Open new document" - EditCompareDocumentCalc - PrintLog "Edit / Compare document" - Case "MASTERDOCUMENT" - printlog "Comparing documents not in Masterdocument!" - goto endsub - Case "HTML" - printlog "Comparing documents not in WriterWeb!" + + dim sFile as string + sFile = gTesttoolPath & "writer\required\input\bt.sxw" + + if ( gApplication <> "WRITER" ) then + printlog( "Test only designed for WRITER, skipping" ) goto endsub - end select + endif - if gUseSysDlg = False then - Kontext "OeffnenDlg" - Dateiname.SetText ConvertPath ( gTesttoolPath & "writer\required\input\bt.sxw" ) - PrintLog "in File-Open-dialog load ..\writer\required\input\bt.sxw" - Oeffnen.Click - end if - Kontext "FilterAuswahl" - if Filterauswahl.Exists then Filterauswahl.OK - Sleep 1 - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - end if + call hNewDocument() + + printlog( "Open test document") + EditCompareDocumentCalc + + Kontext "OeffnenDlg" + printlog( "File Open dialog" ) + if ( OeffnenDlg.exists( 2 ) ) then + + printlog( "Load file: " & sFile ) + Dateiname.SetText ConvertPath ( sFile ) + Oeffnen.Click() + + Kontext "FilterAuswahl" + printlog( "Check for filterselection dialog (comes up e.g. if file is broken)" ) + if Filterauswahl.Exists( 2 ) then + warnlog( "Dialog <Filterauswahl> was not expected at this point" ) + Filterauswahl.OK() + else + printlog( "No dialog <Filterauswahl>, good" ) + endif + + Kontext "Active" + if Active.Exists( 1 ) then + warnlog( "Unexpected messagebox displayed:" ) + printlog( Active.getText() ) + Active.Ok() + else + printlog( "No unexpected messageboxes, good." ) + endif - Kontext "Redlining" - PrintLog "Dialog 'Accept and Reject changes' has to come up" - if Redlining.Exists then - TabControl.SetPage TabListe - wait 200 - Kontext "Redlining" - TabControl.SetPage TabFilter Kontext "Redlining" - Redlining.Close - PrintLog "Close dialog" + PrintLog "Dialog 'Accept and Reject changes' has to come up" + if Redlining.Exists( 1 ) then + TabControl.SetPage TabListe + wait 200 + Kontext "Redlining" + TabControl.SetPage TabFilter + Kontext "Redlining" + hCloseDialog( Redlining, "close" ) + else + Warnlog "- Dialog 'Redlining' does not exist!" + endif else - Warnlog "- Dialog 'Redlining' does not exist!" - end if + warnlog( "Dialog <FileOpen> did not open") + endif - Call hCloseDocument PrintLog "Close active document" + Call hCloseDocument + endcase '---------------------------------------------------- @@ -529,24 +539,15 @@ testcase tViewNavigator Kontext "NavigatorWriter" Umschalten.Click - Kontext "NavigatorGlobalDoc" - Sleep (1) - printlog " - Bearbeiten" - try - Bearbeiten.Click - catch - Sleep (2) - try - Bearbeiten.Click - catch - Warnlog " Either taking more than three seconds to switch Navigator-modes, or something has gone wrong." - endcatch - endcatch - wait (300) + Kontext "NavigatorGlobalDoc" + printlog( "Click <Edit>" ) + if ( hClickButton( Bearbeiten ) = -1 ) then + warnlog( "Unable to click <Edit> button, cannot switch Navigator-Mode" ) + endif Kontext "Navigator" - Navigator.Close + hCloseDialog( Navigator, "close" ) Call hCloseDocument PrintLog "Close active document" goto endsub @@ -680,9 +681,9 @@ testcase tEditAutotext PrintLog "Click Categories" Kontext "Autotext" Bereiche.Click - Sleep 1 + Kontext "BereicheBearbeitenAutoText" - if BereicheBearbeitenAutoText.Exists then + if BereicheBearbeitenAutoText.Exists( 2 ) then DialogTest ( BereicheBearbeitenAutoText ) PrintLog "Create a new categorie" Bereich.SetText "Hallo" @@ -695,12 +696,11 @@ testcase tEditAutotext if Neu.IsEnabled then Neu.Click Wait (200) - if Loeschen.IsEnabled then - PrintLog "Delete created categorie" - Loeschen.Click - else - Warnlog "- Not able to delete new category. Button disabled!" - end if + + printlog( "Click <Delete>" ) + if ( hClickButton( Loeschen ) = -1 ) then + warnlog( "Unable to delete category, the button is disabled" ) + endif else if gNetzInst = False then Warnlog "- Category cannot be created!" @@ -720,20 +720,19 @@ testcase tEditAutotext Kontext "PfadeAuswaehlen" PrintLog "On 'Select Paths' dialog click 'add'" Hinzufuegen.Click - wait 200 + Kontext "OeffnenDlg" - if OeffnenDlg.Exists then + if OeffnenDlg.Exists( 2 ) then PrintLog "Cancel File-Open dialog" - OeffnenDlg.Cancel + hCloseDialog( OeffnenDlg, "cancel" ) else Warnlog "Dialog ' Select Paths' not up!" end if - wait 200 + Kontext "PfadeAuswaehlen" PrintLog "Cancel dialog 'Select Paths'" - PfadeAuswaehlen.Cancel + hCloseDialog( PfadeAuswaehlen, "cancel" ) - Wait (300) Kontext "AutoText" PrintLog "We have to create an autotext first" PrintLog "to assure the 'Autotext'-Button enabled" @@ -788,6 +787,7 @@ testcase tEditAutotext Call hCloseDocument goto endsub end if + printlog "Select created autotext" EditAutotext WaitSlot (2000) @@ -856,14 +856,16 @@ testcase tEditAutotext exit do end if Loop + ' Dialog needs some time to be opened Kontext "MakroZuweisen" - if NOT MakroZuweisen.Exists(5) then - warnlog "AutoText-Macro - Assign Macro took longer than 5 seconds to load. Check why." + printlog( "Close <MakroZuweisen> dialog" ) + if ( MakroZuweisen.exists( 5 ) ) then + call Dialogtest( MakroZuweisen ) + hCloseDialog( MakroZuweisen, "close" ) else - PrintLog "Cancel 'Macro' dialog" - MakroZuweisen.Cancel - end if + warnlog "AutoText-Macro - Assign Macro took longer than 5 seconds to load. Check why." + endif catch Warnlog "Menu Autotext->'Macro' disabled !" Call hMenuClose @@ -922,200 +924,143 @@ endcase testcase tEditHyperlink Printlog "- Edit / Hyperlink" - Call hNewDocument + PrintLog "Open new document" - InsertHyperlink + Call hNewDocument + PrintLog "Insert / Hyperlink" - WaitSlot(5000) - Kontext "Hyperlink" - - Call wEinfuegenHyperlink(1) - Kontext "TabHyperlinkInternet" - Internet.Check - ZielUrl.Settext "http://www.sonor.de" - PrintLog "Enter URL " - Kontext "Hyperlink" - PrintLog "Click 'Apply'" - Uebernehmen.Click - PrintLog "Close Hyperlink dialog" - Hyperlink.Close - - Call wDocSetContext - try - PrintLog "Check if correct URL has been set to document" - hUseAsyncSlot( "EditCopy" ) + InsertHyperlink + + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then + + PrintLog "Insert / Hyperlink" + Call wEinfuegenHyperlink(1) + + Kontext "TabHyperlinkInternet" + printlog( "Check <Internet>" ) + Internet.Check() + + PrintLog "Enter URL " + ZielUrl.Settext "http://www.sonor.de" + + Kontext "Hyperlink" + PrintLog "Click 'Apply'" + Uebernehmen.Click + + kontext "HyperlinkDialog" + PrintLog "Close Hyperlink dialog" + hClickButton( CloseButton ) + else + warnlog( "Dialog <Hyperlink> did not open" ) + hCloseDocument() + goto endsub + endif + + hSetDocumentContext() + + PrintLog "Check if correct URL has been set to document" + if ( hUseAsyncSlot( "EditCopy" ) > -1 ) then if GetClipBoardtext = "" then Warnlog "No Hyperlink or wrong hyperlink in document!" & GetClipBoardtext end if - catch - Warnlog "No Hyperlink in document!" - goto endsub - endcatch + else + warnlog( "Slot <EditCopy> could not be executed. Most likely the hyperlink was not selected" ) + endif PrintLog "Set cursor into link" Call wTypeKeys("<Left>") - try - PrintLog "Edit / Hyperlink has to be enabled" - EditHyperlink - Kontext "Hyperlink" - if Hyperlink.Exists then - Hyperlink.Close - else - Warnlog "- Hyperlinkdialog not up" - end if - catch - Warnlog "- Not able to edit Hyperlink!" - endcatch + + PrintLog "Edit / Hyperlink has to be enabled" + if ( hUseAsyncSlot( "EditHyperlink" ) > -1 ) then + kontext "HyperlinkDialog" + hClickButton( CloseButton ) + else + warnlog( "Slot <EditHyperlink> could not be called" ) + endif PrintLog "Close active document" Call hCloseDocument endcase -'---------------------------------------------------------------- +' ---------------------------------------------------------------- testcase tEditFields - PrintLog "- Edit/Fields" - PrintLog "Open new document" - Call hNewDocument + PrintLog( "Edit/Fields: Edit Fields dialog: " & gApplication ) + dim iCurrentType as integer - PrintLog "Select Insert / Fields Other" - InsertFieldsOther - Kontext - Active.Setpage TabDokumentFeldbefehle - Kontext "TabDokumentFeldbefehle" - Sleep 1 - PrintLog "Insert Field 'Sender -> Company'" - Select Case gApplication - Case "HTML" - Select case iSprache - case 01 : Feldtyp.Select 5 'Sender - Auswahl.Select 1 'Company - case 03 : Feldtyp.Select 8 - Auswahl.Select 1 - case 07 : Feldtyp.Select 5 - Auswahl.Select 1 - case 31 : Feldtyp.Select 1 - Auswahl.Select 1 - case 33 : Feldtyp.Select 2 - Auswahl.Select 1 - case 34 : Feldtyp.Select 6 - Auswahl.Select 1 - case 36 : Feldtyp.Select 3 - Auswahl.Select 1 - case 39 : Feldtyp.Select 3 - Auswahl.Select 1 - case 45 : Feldtyp.Select 1 - Auswahl.Select 1 - case 46 : Feldtyp.Select 2 - Auswahl.Select 1 - case 48 : Feldtyp.Select 3 - Auswahl.Select 1 - case 49 : Feldtyp.Select 1 - Auswahl.Select 1 - case 51 : Feldtyp.Select 5 - Auswahl.Select 1 - case 52 : Feldtyp.Select 5 - Auswahl.Select 1 - case 55 : Feldtyp.Select 7 - Auswahl.Select 1 - case 81 : Feldtyp.Select 4 - Auswahl.Select 1 - case 82 : Feldtyp.Select 2 - Auswahl.Select 1 - case 84 : Feldtyp.Select 3 - Auswahl.Select 1 - case 86 : Feldtyp.Select 1 - Auswahl.Select 1 - case 88 : Feldtyp.Select 2 - Auswahl.Select 1 - - case else : Warnlog "Missing language support!" - TabDokumentFeldbefehle.Cancel - PrintLog "Close active document" - Call hCloseDocument - goto endsub - end select - Case else - Select case iSprache - case 01 : Feldtyp.Select 6 'Sender - Auswahl.Select 1 'Company - case 03 : Feldtyp.Select 9 - Auswahl.Select 1 - case 07 : Feldtyp.Select 6 - Auswahl.Select 1 - case 31 : Feldtyp.Select 1 - Auswahl.Select 1 - case 33 : Feldtyp.Select 3 - Auswahl.Select 1 - case 34 : Feldtyp.Select 8 - Auswahl.Select 1 - case 36 : Feldtyp.Select 4 - Auswahl.Select 1 - case 39 : Feldtyp.Select 4 - Auswahl.Select 1 - case 45 : Feldtyp.Select 1 - Auswahl.Select 1 - case 46 : Feldtyp.Select 2 - Auswahl.Select 1 - case 48 : Feldtyp.Select 3 - Auswahl.Select 1 - case 49 : Feldtyp.Select 1 - Auswahl.Select 1 - case 51 : Feldtyp.Select 6 - Auswahl.Select 1 - case 52 : Feldtyp.Select 6 - Auswahl.Select 1 - case 55 : Feldtyp.Select 9 - Auswahl.Select 1 - case 81 : Feldtyp.Select 5 - Auswahl.Select 1 - case 82 : Feldtyp.Select 2 - Auswahl.Select 2 - case 84 : Feldtyp.Select 5 - Auswahl.Select 1 - case 86 : Feldtyp.Select 1 - Auswahl.Select 1 - case 88 : Feldtyp.Select 2 - Auswahl.Select 1 - - case else : Warnlog "Missing language support!" - TabDokumentFeldbefehle.Cancel - PrintLog "Close active document" - Call hCloseDocument - goto endsub - end select - end select - - Einfuegen.Click - Wait (400) - PrintLog "Close Fields dialog" - Schliessen.Click - - PrintLog "Put cursor in front of field" - Call wTypeKeys("<Home>") - - PrintLog "Edit / Fields" - EditFields - WaitSlot (2000) + PrintLog( "Open new document" ) + Call hNewDocument() - Kontext "FeldbefehlBearbeitenDokument" - Call DialogTest ( FeldbefehlBearbeitenDokument ) + printlog( "Insert->Field->Other" ) + hUseAsyncSlot( "InsertFieldsOther" ) - PrintLog "In 'Edit Fields' dialog select 'Edit'" - if Bearbeiten.IsVisible and Bearbeiten.IsEnabled then - Bearbeiten.Click - Kontext "TabBenutzerdaten" - TabBenutzerdaten.Cancel - Kontext "FeldbefehlBearbeitenDokument" + ' Note that the tabdialog does not have a unique ID yet, so we treat it as "Active" + kontext + if ( Active.exists( 2 ) ) then + + printlog( "Switch to <Document> tab" ) + Active.setPage( TabDokumentFeldbefehle ) + + kontext "TabDokumentFeldbefehle" + printlog( "Select sender item from the user data, insert the field, close the dialog" ) + if ( TabDokumentFeldbefehle.isVisible() ) then + + ' Search for the sender item in the "Type" listbox by counting the + ' number of items in the "Select" box. Only the sender item has + ' more than 12 (usually 15) selectable options. + ' This is done to make sure that we have an enabled "Edit..." button + ' in the "Edit Fields" dialog called later in this test + printlog( "Search for suitable field type" ) + for iCurrentType = 1 to FeldTyp.getItemCount() + FeldTyp.select( iCurrentType ) + if ( Auswahl.isEnabled() and Auswahl.getItemCount() > 12 ) then + exit for + endif + next iCurrentType + + hClickButton( Einfuegen ) + hCloseDialog( TabDokumentFeldbefehle , "close" ) + + PrintLog( "Move cursor infront of field (start of document)" ) + Call wTypeKeys("<Home>") + + PrintLog( "Edit / Fields" ) + hUseAsyncSlot( "EditFields" ) + + Kontext "FeldbefehlBearbeitenDokument" + if ( FeldbefehlBearbeitenDokument.exists( 2 ) ) then + Call DialogTest ( FeldbefehlBearbeitenDokument ) + + PrintLog( "In 'Edit Fields' dialog select 'Edit'" ) + hClickButton( Bearbeiten ) + + Kontext "TabBenutzerdaten" + if ( TabBenutzerdaten.exists( 2 ) ) then + printlog( "<TabBenutzerdaten> is open. Good." ) + call DialogTest( TabBenutzerdaten ) + hCloseDialog( TabBenutzerdaten, "cancel" ) + else + warnlog( "<TabBenutzerdaten> did not open" ) + endif + else + warnlog( "<TabDokumentFeldbefehle> is not visible" ) + endif + + PrintLog( "Close dialog" ) + Kontext "FeldbefehlBearbeitenDokument" + hCloseDialog( FeldbefehlBearbeitenDokument, "cancel" ) + else + warnlog( "<FeldbefehlBearbeitenDokument> did not open" ) + endif else - Warnlog "Button 'Edit' in Dialog disabled!" - end if + warnlog( "Unable to open <InsertFieldsOther>") + endif + + PrintLog( "Close active document" ) + Call hCloseDocument() - PrintLog "Close dialog" - FeldbefehlBearbeitenDokument.Cancel - PrintLog "Close active document" - Call hCloseDocument endcase '---------------------------------------------------------------- @@ -1203,9 +1148,7 @@ endcase '---------------------------------------------------------------- testcase tEditIndexEntry - qaErrorLog "#158646# - Insert Indexes Entry causes crash." - goto endsub - + PrintLog "- Edit/Index Entry" if gApplication = "HTML" then printlog "Not in WriterWeb!" @@ -1249,53 +1192,66 @@ endcase testcase tEditLinks PrintLog "- Edit/Links" - if gApplication = "HTML" then + + dim sFile as string + sFile = gTesttoolPath & "writer\required\input\graphics\jolink.jpg" + + if ( gApplication = "HTML" ) then printlog "Not in WriterWeb!" goto endsub end if + printlog( "Open a new document" ) Call hNewDocument - Call hGrafikVerknuepftEinfuegen ( gTesttoolPath & "writer\required\input\graphics\jolink.jpg" ) - Wait 200 - try - EditLinksWriter - catch + + printlog( "Insert graphic file (linked): " & sFile ) + Call hGrafikVerknuepftEinfuegen ( sFile ) + + printlog( "Edit->Links" ) + if ( hUseAsyncSlot( "EditLinksWriter" ) = -1 ) then Warnlog "Error on calling Edit / Links ! (disabled)" Call hCloseDocument goto endsub - endcatch + endif Kontext "VerknuepfungenBearbeiten" - if VerknuepfungenBearbeiten.Exists then + if ( VerknuepfungenBearbeiten.Exists( 1 ) ) then Call DialogTest ( VerknuepfungenBearbeiten ) - Wait 200 - try - Aendern.Click + + Kontext "VerknuepfungenBearbeiten" + printlog( "Click <Change>" ) + if ( hClickButton( Aendern ) > -1 ) then Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel - catch + call DialogTest( GrafikEinfuegenDlg ) + hCloseDialog( GrafikEinfuegenDlg, "cancel" ) + else Warnlog "Error modifying the link!" - endcatch + endif Kontext "VerknuepfungenBearbeiten" - Wait 200 - try - Aktualisieren.Click - catch + printlog( "Click <Update>" ) + if ( hClickButton( Aktualisieren ) = -1 ) then Warnlog "Error on updating the link!" - endcatch - Wait 200 + endif - try - Loesen.Click + Kontext "VerknuepfungenBearbeiten" + printlog( "Click <Release>" ) + if ( hClickButton( Loesen ) > -1 ) then Kontext "Active" - if Active.Exists then Active.No - catch - Warnlog "- Error on breaking the link!" - endcatch + printlog( "Check for confirmation message" ) + if ( Active.Exists( 1 ) ) then + printlog( "Message displayed, good. Closing with <No>" ) + printlog( Active.getText() ) + Active.No + else + Warnlog( "The <Are you sure you want to remove the selected link?> message is missing" ) + endif + else + Warnlog( "Unable to break the link to the file" ) + endif Kontext "VerknuepfungenBearbeiten" - VerknuepfungenBearbeiten.Close + hCloseDialog( VerknuepfungenBearbeiten, "close" ) else Warnlog "Dialog Edit / Links not opened!" end if @@ -1321,23 +1277,41 @@ endcase '------------------------------------------------------ testcase tEditImageMap - PrintLog "- Edit / ImageMap" + PrintLog "- Edit / ImageMap" + + dim sFile as string + sFile = gTesttoolPath & "writer\required\input\graphics\jolink.jpg" + PrintLog "Open new document" Call hNewDocument - if hGrafikEinfuegen ( gTesttoolPath & "writer\required\input\graphics\jolink.jpg" )=true then + printlog( "Insert graphics file: " & sFile ) + if ( hGrafikEinfuegen( sFile ) ) then + + printlog( "Edit->Imagemap" ) + EditImageMap + Kontext "ImageMapEditor" - if ImageMapEditor.Exists then ImageMapEditor.Close - try - EditImageMap - Kontext "ImageMapEditor" + if ( ImageMapEditor.exists( 1 ) ) then Call DialogTest (ImageMapEditor) - Sleep 1 - ImageMapEditor.Close - catch - Warnlog "Edit/ImageMap disabled!" - endcatch + hCloseDialog( ImageMapEditor, "close" ) + + printlog( "Check for <Imagemap changed> messagebox (should not appear)" ) + kontext "Active" + if ( Active.exists( 1 ) ) then + qaerrorlog( "#i109605# - <imagemap changed> message displayed." ) + printlog( Active.getText ) + Active.no() + else + printlog( "No messagebox on close, good." ) + endif + + else + warnlog( "Dialog <ImageMapEditor> did not open" ) + endif + else + warnlog( "Insert graphics failed" ) end if PrintLog "Close active document" @@ -1370,103 +1344,6 @@ endcase '---------------------------------------------------------------- -testcase tHtmlDocEditFields - PrintLog "- Edit/Fields" - - gApplication = "HTML" - PrintLog "Open new document" - Call hNewDocument - - PrintLog "Select Insert / Fields Other" - InsertFieldsOther - Kontext - Active.Setpage TabDokumentFeldbefehle - Kontext "TabDokumentFeldbefehle" - Sleep 1 - PrintLog "Insert Field 'Sender -> Company'" - Select case iSprache - case 01 : Feldtyp.Select 5 'Sender - Auswahl.Select 1 'Company - case 03 : Feldtyp.Select 8 - Auswahl.Select 1 - case 07 : Feldtyp.Select 5 - Auswahl.Select 1 - case 31 : Feldtyp.Select 1 - Auswahl.Select 1 - case 33 : Feldtyp.Select 2 - Auswahl.Select 1 - case 34 : Feldtyp.Select 6 - Auswahl.Select 1 - case 36 : Feldtyp.Select 3 - Auswahl.Select 1 - case 39 : Feldtyp.Select 3 - Auswahl.Select 1 - case 45 : Feldtyp.Select 1 - Auswahl.Select 1 - case 46 : Feldtyp.Select 2 - Auswahl.Select 1 - case 48 : Feldtyp.Select 3 - Auswahl.Select 1 - case 49 : Feldtyp.Select 1 - Auswahl.Select 1 - case 51 : Feldtyp.Select 5 - Auswahl.Select 1 - case 52 : Feldtyp.Select 5 - Auswahl.Select 1 - case 55 : Feldtyp.Select 7 - Auswahl.Select 1 - case 81 : Feldtyp.Select 4 - Auswahl.Select 1 - case 82 : Feldtyp.Select 2 - Auswahl.Select 1 - case 84 : Feldtyp.Select 3 - Auswahl.Select 1 - case 86 : Feldtyp.Select 1 - Auswahl.Select 1 - case 88 : Feldtyp.Select 2 - Auswahl.Select 1 - - case else : Warnlog "Missing language support!" - TabDokumentFeldbefehle.Cancel - PrintLog "Close active document" - Call hCloseDocument - goto endsub - end select - - Einfuegen.Click - Wait (400) - PrintLog "Close Fields dialog" - Schliessen.Click - - PrintLog "Put cursor in front of field" - Call wTypeKeys("<Home>") - - PrintLog "Edit / Fields" - EditFields - WaitSlot (2000) - - Kontext "FeldbefehlBearbeitenDokument" - Call DialogTest ( FeldbefehlBearbeitenDokument ) - - PrintLog "In 'Edit Fields' dialog select 'Edit'" - if Bearbeiten.IsVisible and Bearbeiten.IsEnabled then - Bearbeiten.Click - Kontext "TabBenutzerdaten" - TabBenutzerdaten.Cancel - Kontext "FeldbefehlBearbeitenDokument" - else - Warnlog "Button 'Edit' in Dialog disabled!" - end if - - PrintLog "Close dialog" - FeldbefehlBearbeitenDokument.Cancel - PrintLog "Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'---------------------------------------------------------------- - testcase tMasterDocEditNavigator printlog "- View/Navigator" Dim ToolboxOk as boolean diff --git a/testautomation/writer/required/includes/w_003_.inc b/testautomation/writer/required/includes/w_003_.inc index 858cdd2ba6c5..1e9f5a7b65ce 100644..100755 --- a/testautomation/writer/required/includes/w_003_.inc +++ b/testautomation/writer/required/includes/w_003_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testscripts connected to the View-Menu. '* diff --git a/testautomation/writer/required/includes/w_004_.inc b/testautomation/writer/required/includes/w_004_.inc index 3a4234bfb18a..b157722ee145 100644..100755 --- a/testautomation/writer/required/includes/w_004_.inc +++ b/testautomation/writer/required/includes/w_004_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testcases with connection to the Insert-menu. '* @@ -36,49 +36,24 @@ sub w_004_ printLog Chr(13) + "--------- Insert Menu ( w_004_ ) ----------" gApplication = "WRITER" - Call tInsertManualBreak - Call tInsertFields - - Call tInsertFieldsOther - Call tInsertSpecialCharacter - - Call tInsertSection - Call tInsertHyperlink - - Call tInsertFootnote - Call tInsertCaption - Call tInsertBookmark - Call tInsertCrossReference - Call tInsertComment - Call tInsertScript - Call tInsertIndexesEntry - Call tInsertIndexesIndex - Call tInsertIndexesBibliographyEntry - - Call tInsertEnvelope - - Call tInsertFrame - Call tInsertTable - Call tInsertHorizontalLine - Call tInsertGraphicsFromFile - Call tInsertAllGraphicsFromFile - - Call tInsertObjectOLEObject - Call tInsertObjectPlugIn - Call tInsertObjectSound - Call tInsertObjectVideo - Call tInsertObjectFormula - Call tInsertObjectChart - Call tInsertFile - - 'Writer Web - gApplication = "HTML" - Call tHtmlDocInsertFields - Call tHtmlDocInsertFieldsOther - Call tHtmlDocInsertSection - Call tHtmlDocInsertFrame - Call tHtmlDocInsertGraphicsFromFile - gApplication = "WRITER" + call tInsertManualBreak + call tInsertFields + call tInsertFieldsOther + call tInsertSpecialCharacter + call tInsertSection + call tInsertHyperlink + call tInsertFootnote + call tInsertCaption + call tInsertBookmark + call tInsertComment + call tInsertCrossReference + call tInsertScript + call tInsertIndexesEntry + call tInsertIndexesIndex + call tInsertIndexesBibliographyEntry + call tInsertEnvelope + call tInsertFrame + call tInsertTable end sub @@ -345,46 +320,53 @@ testcase tInsertHyperlink printlog "- Internet" printlog " Insert / Hyperlink" InsertHyperlink - printlog " In 'Hyperlink' dialog step through all pages" - Call wEinfuegenHyperlink(1) - Call DialogTest ( TabHyperlinkInternet ) - Kontext "Hyperlink" - printlog "- Mail & News" - Call wEinfuegenHyperlink(2) - wait 500 - Call DialogTest ( TabHyperlinkMailUndNews ) + kontext "HyperlinkDialog" + if ( HyperlinkDialog.exists( 2 ) ) then - Kontext "Hyperlink" - printlog "- Document" - Call wEinfuegenHyperlink(3) - wait 500 - Call DialogTest ( TabHyperlinkDokument ) - - DateiOeffnen.Click + printlog " In 'Hyperlink' dialog step through all pages" + Call wEinfuegenHyperlink(1) + Call DialogTest ( TabHyperlinkInternet ) + + Kontext "Hyperlink" + printlog "- Mail & News" + Call wEinfuegenHyperlink(2) + wait 500 + Call DialogTest ( TabHyperlinkMailUndNews ) + + Kontext "Hyperlink" + printlog "- Document" + Call wEinfuegenHyperlink(3) + wait 500 + Call DialogTest ( TabHyperlinkDokument ) + + DateiOeffnen.Click - Kontext "OeffnenDlg" - if ( OeffnenDlg.exists( 1 ) ) then + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 1 ) ) then + OeffnenDlg.Cancel + else + warnlog( "Dialog <OeffnenDlg> is not available" ) + endif + + Kontext "Hyperlink" + printlog "- New Document" + Call wEinfuegenHyperlink(4) + wait 500 + Call DialogTest ( TabHyperlinkNeuesDokument ) + + Pfad.Click + Sleep 1 + Kontext "OeffnenDlg" OeffnenDlg.Cancel + + printlog " Close 'Hyperlink' dialog" + kontext "HyperlinkDialog" + HyperlinkDialog.Close else - warnlog( "Dialog <OeffnenDlg> is not available" ) + warnlog( "Unable to open <HyperlinkDialog>" ) endif - Kontext "Hyperlink" - printlog "- New Document" - Call wEinfuegenHyperlink(4) - wait 500 - Call DialogTest ( TabHyperlinkNeuesDokument ) - - Pfad.Click - Sleep 1 - Kontext "OeffnenDlg" - OeffnenDlg.Cancel - - Kontext "TabHyperlinkNeuesDokument" - TabHyperlinkNeuesDokument.Cancel - printlog " Close 'Hyperlink' dialog" - printlog " Close active document" Call hCloseDocument endcase @@ -1028,777 +1010,3 @@ testcase tInsertTable Call hCloseDocument endcase -'----------------------------------------------------------- - -testcase tInsertHorizontalLine - PrintLog "- Insert / Horizontal Line" - - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Horizontal Line" - InsertHorizontalLine - Kontext "HorizontaleLinieEinfuegen" - Call DialogTest (HorizontaleLinieEinfuegen) - printlog " Close dialog 'Insert Horizontal Ruler'" - HorizontaleLinieEinfuegen.Cancel - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertGraphicsFromFile - PrintLog "- Insert / Graphics / From File" - Dim j as integer - - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Graphics from file" - InsertGraphicsFromFile - - Kontext "GrafikEinfuegenDlg" - printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg" - Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) - Oeffnen.Click - - Kontext "Active" - if Active.Exists( 1 ) then - Warnlog Active.Gettext - Active.Ok - Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel - Call hCloseDocument - goto endsub - else - printlog " select again 'Insert / Grahics from file'" - InsertGraphicsFromFile - WaitSlot (2000) - printlog " Step through all tabpages" - Kontext - active.SetPage TabType - wait 500 - Kontext "TabType" - Call DialogTest ( TabType ) - - Kontext - active.SetPage TabZusaetze - wait 500 - Kontext "TabZusaetze" - Call DialogTest ( TabZusaetze ) - - Kontext - active.SetPage TabUmlauf - wait 500 - Kontext "TabUmlauf" - Call DialogTest ( TabUmlauf ) - - Kontext - active.SetPage TabHyperlinkRahmen - wait 500 - Kontext "TabHyperlinkRahmen" - Call DialogTest ( TabHyperlinkRahmen ) - - Kontext - active.SetPage TabGrafik - wait 500 - Kontext "TabGrafik" - Call DialogTest ( TabGrafik ) - - Kontext - active.SetPage TabUmrandung - wait 500 - Kontext "TabUmrandung" - Call DialogTest ( TabUmrandung ) - - Kontext - active.SetPage TabMakro - ' if no JRE is installed a messagebox appears - j = 0 - Do - j = j + 1 - Kontext "Active" - if Active.Exists() then - if Active.GetRT = 304 then - if j = 1 then Warnlog Active.Gettext - Active.Ok - else - exit do - end if - else - exit do - end if - Loop - wait 500 - Kontext "TabMakro" - Call DialogTest ( TabMakro ) - - if gApplication <> "HTML" then - Kontext - active.SetPage TabZuschneiden - wait 500 - Kontext "TabZuschneiden" - Call DialogTest ( TabZuschneiden ) - - Kontext - active.SetPage TabHintergrund - wait 500 - Kontext "TabHintergrund" - Call DialogTest ( TabHintergrund ) - printlog " Close dialog" - TabHintergrund.Cancel - else - printlog " Close dialog" - TabMakro.Cancel - end if - end if - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertAllGraphicsFromFile - Dim i as integer - Dim quellpfad as string - Dim DieDatei as string - Dim Ziel( 5000 ) as String - printlog "Insert / Graphics / From File (all Formats)" - - printlog " Open new document" - Call hNewDocument - - printlog " Insert all graphic formats from directory: global\input\graf_inp\" - quellpfad = ConvertPath(gtesttoolpath + "global\input\graf_inp\") - - GetFileList(quellpfad, "*.*" , Ziel()) - for i=1 to ListCount(Ziel()) - if (gPlatform = "osx") AND (right(ziel(i),3) = "eps") then - qaerrorlog "#i100253# skipping eps" - i=i+1 - endif - printlog "- Graphic: " + Right(Ziel(i),3) + "-Format" - Call hGrafikEinfuegen ( Ziel(i) ) - Sleep 5 - Call wTypeKeys("<Delete>") - Call gMouseDoubleClick (10,10) - Sleep 5 - next i - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertObjectOLEObject - PrintLog "- Insert / Object / OLE-Objekt" - - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Object / OLE-Object" - InsertObjectOLEObject - - Kontext "OLEObjektEinfuegen" - printlog " Check both radiobuttons 'Create now' and 'Create from file'" - NeuErstellen.Check - Call DialogTest (OLEObjektEinfuegen, 1) - AusDateiErstellen.Check - Call DialogTest (OLEObjektEinfuegen, 2) - OLEObjektEinfuegen.Cancel - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertObjectPlugIn - PrintLog "- Insert / Object / Plug-In" - - printlog " Open new document" - Call hNewDocument - - printlog " Close 'Plug in' dialog" - InsertObjectPlugIn - - Kontext "PlugInEinfuegen" - if PlugInEinfuegen.Exists then - Call DialogTest (PlugInEinfuegen) - PlugInEinfuegen.Cancel - else - Warnlog "Dialog 'Plugin' is not up!" - end if - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertObjectSound - Printlog "- Insert / Object / Sound" - printlog " Open new document" - Call hNewDocument - - try - if gUseSysDlg = False then - InsertObjectSound - printlog " Insert / Object / Sound" - Kontext "OeffnenDlg" - if OeffnenDlg.Exists then - OeffnenDlg.Cancel - else - Warnlog "Dialog to insert Sound isn't up!" - end if - end if - catch - 'Warnlog "- Menu disabled or no Sound-PlugIn installed !?" - endcatch - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertObjectVideo - Printlog "- Insert / Object / Video" - - printlog " Open new document" - Call hNewDocument - - try - if gUseSysDlg = False then - InsertObjectVideo - printlog " Insert / Object / Video" - Kontext "OeffnenDlg" - if OeffnenDlg.Exists then - OeffnenDlg.Cancel - else - Warnlog "Dialog to insert Video isn't up!" - end if - end if - catch - 'Warnlog "- Menu disabled or no Video-PlugIn installed !?" - endcatch - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertObjectFormula - PrintLog "- Insert / Object / Formula" - - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Object / Formular" - InsertObjectFormula - WaitSlot (2000) - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - Warnlog Active.Gettext - Active.Ok - end if - end if - Sleep 1 - - printlog " Click in 'Math' document" - Call gMouseClick(1,1) - sleep 1 - printlog " 'Delete math-object in document" - Call wTypeKeys("<Delete>") - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertObjectChart - PrintLog "- Insert / Object / Chart" - - printlog " Open new document" - Call hNewDocument - ' Chart-Wizard will be invoked if data ranges exist - ' Therefor a table will be inserted - printlog " Insert / Table" - InsertTableWriter - Kontext "TabelleEinfuegenWriter" - TabelleEinfuegenWriter.Ok - - printlog " Insert / Object / Chart" - InsertObjectChart - - Kontext "ChartWizard" - if ChartWizard.Exists then - printlog "- Chart-Wizard is up=>OK" - Call DialogTest ( ChartWizard ) - printlog " Cancel Chart-Wizard" - ChartWizard.Cancel - else - warnlog "Chart-Wizard is not up though a table has been inserted" - end if - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tInsertFile - PrintLog "- Insert / File" - - printlog " Open new document" - Call hNewDocument - InsertFileWriter - WaitSlot( 2000 ) - - printlog " Insert / File" - Kontext "OeffnenDlg" - - printlog " Check 'File dialog'" - if OeffnenDlg.Exists( 2 ) then - Call DialogTest ( OeffnenDlg ) - try - Standard.Click - catch - Exceptlog - endcatch - - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.Ok - else - Kontext "OeffnenDlg" - OeffnenDlg.Cancel - end if - end if - - printlog " Close active document" - Call hCloseDocument -endcase - -'----------------------------------------------------------- - -testcase tHtmlDocInsertFields - PrintLog "- Insert / Fields" - - gApplication = "HTML" - printlog " Open new document" - Call hNewDocument - - try - printlog "Insert / Fields / Date" - InsertFieldsDate - catch - Warnlog "Unable to execute: Insert / Fields / Date " - endcatch - printlog " Insert / Fields / Date" - Call wTypeKeys (" <Return>") - try - printlog "Insert / Fields / Time" - InsertFieldsTime - catch - Warnlog "Unable to execute: Insert / Fields / Time" - endcatch - printlog " Insert / Fields / Time" - Call wTypeKeys (" <Return>") - try - printlog "Insert / Fields / Page Number" - InsertFieldsPageNumbers - catch - Warnlog "Unable to execute: Insert / Fields / Page numbers" - endcatch - printlog " Insert / Fields / Page numbers" - Call wTypeKeys (" <Return>") - try - printlog "Insert / Fields / Page Count" - InsertFieldsPageCount - catch - Warnlog "Unable to execute: Insert / Fields / Page Count" - endcatch - printlog " Insert / Fields / Page count" - Call wTypeKeys (" <Return>") - try - printlog "Insert / Fields / Title" - InsertFieldsTitle - catch - Warnlog "Unable to execute: Insert / Fields / Title" - endcatch - printlog " Insert / Fields / Title" - Call wTypeKeys (" <Return>") - try - printlog "Insert / Fields / Author" - InsertFieldsAuthor - catch - Warnlog "Unable to execute: Insert / Fields / Author" - endcatch - printlog " Insert / Fields / Author" - if gApplication <> "HTML" then - try - printlog "Insert / Fields / Subject" - InsertFieldsSubject - catch - Warnlog "Unable to execute: Insert / Fields / Subject" - endcatch - printlog " If document not HTML then 'Insert / Fields / Subject" - Call wTypeKeys (" <Return>") - printlog " Press key 'enter'" - end if - - printlog " Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- - -testcase tHtmlDocInsertFieldsOther - Dim i as integer - Dim j as integer - printlog "- Insert / Fields / Other" - - gApplication = "HTML" - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Fields / Other" - InsertFieldsOther - - Kontext - printlog " In dialog step through all tabpages" - Active.SetPage TabDokumentFeldbefehle - Kontext "TabDokumentFeldbefehle" - Call Dialogtest ( TabDokumentFeldbefehle ) - - Kontext - Active.SetPage TabDokumentinfoFeldbefehle - Kontext "TabDokumentinfoFeldbefehle" - Call Dialogtest ( TabDokumentinfoFeldbefehle ) - - Kontext - Active.SetPage TabVariablen - Kontext "TabVariablen" - Call Dialogtest ( TabVariablen ) - - if gApplication <> "HTML" then - Kontext - Active.SetPage TabReferenzen - Kontext "TabReferenzen" - Call Dialogtest ( TabReferenzen ) - - Kontext - Active.SetPage TabFunktionen - Kontext "TabFunktionen" - Call Dialogtest ( TabFunktionen ) - for i=1 to Feldtyp.GetItemCount - Feldtyp.Select i - if MakroButton.IsEnabled then - MakroButton.Click - ' if no JRE is installed a messagebox appears - Do - j = j + 1 - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - if j = 1 then Warnlog Active.Gettext - Active.Ok - else - exit do - end if - else - exit do - end if - Loop - - Kontext "ScriptSelector" - if ( ScriptSelector.exists( 3 ) ) then - ScriptSelector.Close - else - warnlog( "Dialog <ScriptSelector> is not available" ) - endif - Kontext "TabFunktionen" - i=100 - end if - next i - - Kontext - Active.SetPage TabDatenbank - Kontext "TabDatenbank" - Call Dialogtest ( TabDatenbank ) - - printlog " Close dialog" - TabDatenbank.Close - else - printlog " Close dialog" - TabVariablen.Close - end if - printlog " Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- - -testcase tHtmlDocInsertSection - PrintLog "- Insert / Section" - - gApplication = "HTML" - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Section" - InsertSection - Kontext - - printlog " In dialog step through all tabpages" - printlog "- Tabpage Section" - Active.Setpage TabBereiche - Kontext "TabBereiche" - Call DialogTest (TabBereiche) - Verknuepfung.Check - - Auswaehlen.Click - Kontext "OeffnenDlg" - if ( OeffnenDlg.exists( 1 ) ) then - OeffnenDlg.Cancel - else - warnlog( "Dialog <OeffnenDlg> is not available" ) - endif - - Wait 500 - Kontext - printlog "- Tabpage Columns" - Active.Setpage TabSpalten - Kontext "TabSpalten" - Call DialogTest (TabSpalten) - - Kontext - printlog "- Tabpage Background" - Active.Setpage TabHintergrund - Kontext "TabHintergrund" - Call DialogTest (TabHintergrund) - - if gApplication <> "HTML" then - printlog "Tabpage Indents" - Kontext - Active.Setpage TabSectionIndent - Kontext "TabSectionIndent" - Call DialogTest (TabSectionIndent) - - printlog "- Tabpage Footnotes/Endnotes" - Kontext - Active.Setpage TabFussEndnoten - Kontext "TabFussEndnoten" - Call DialogTest (TabFussEndnoten) - TabFussEndnoten.Cancel - else - TabHintergrund.Cancel - end if - printlog " Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- - -testcase tHtmlDocInsertFrame - PrintLog "- Insert / Frame" - - gApplication = "HTML" - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Frame" - InsertFrame - WaitSlot (2000) - - printlog " Step through all tabpages" - Kontext - active.SetPage TabType - Kontext "TabType" - Call DialogTest (TabType) - Sleep 1 - - Kontext - active.SetPage TabZusaetze - Kontext "TabZusaetze" - Call DialogTest (TabZusaetze) - Sleep 1 - - Kontext - active.SetPage TabUmlauf - Kontext "TabUmlauf" - Call DialogTest (TabUmlauf) - Sleep 1 - - Kontext - active.SetPage TabUmrandung - Kontext "TabUmrandung" - Call DialogTest (TabUmrandung) - Sleep 1 - - Kontext - active.SetPage TabHintergrund - Kontext "TabHintergrund" - Call DialogTest (TabHintergrund, 1) - Sleep 1 - try - Als.Select (2) - Call DialogTest (TabHintergrund, 2) - Sleep 1 - catch - Warnlog "Maybe missing combobox! (#i29517)" - endcatch - - if gApplication <> "HTML" then - Kontext - active.SetPage TabHyperlinkRahmen - Kontext "TabHyperlinkRahmen" - Call DialogTest (TabHyperlinkRahmen) - Durchsuchen.Click - - if gUSeSysDlg = False then - Kontext "OeffnenDlg" - OeffnenDlg.Cancel - end if - - Kontext - active.SetPage TabSpalten - Kontext "TabSpalten" - Call DialogTest (TabSpalten) - printlog " Close dialog" - TabSpalten.Cancel - else - printlog " Close dialog" - TabHintergrund.Cancel - end if - - printlog " Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- - -testcase tHtmlDocInsertGraphicsFromFile - PrintLog "- Insert / Graphics / From File" - Dim j as integer - - gApplication = "HTML" - printlog " Open new document" - Call hNewDocument - - printlog " Insert / Graphics from file" - InsertGraphicsFromFile - - Kontext "GrafikEinfuegenDlg" - printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg" - Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) - Oeffnen.Click - - Kontext "Active" - if Active.Exists( 1 ) then - Warnlog Active.Gettext - Active.Ok - Kontext "GrafikEinfuegenDlg" - GrafikEinfuegenDlg.Cancel - Call hCloseDocument - goto endsub - else - printlog " select again 'Insert / Grahics from file'" - InsertGraphicsFromFile - WaitSlot (2000) - printlog " Step through all tabpages" - Kontext - active.SetPage TabType - wait 500 - Kontext "TabType" - Call DialogTest ( TabType ) - - Kontext - active.SetPage TabZusaetze - wait 500 - Kontext "TabZusaetze" - Call DialogTest ( TabZusaetze ) - - Kontext - active.SetPage TabUmlauf - wait 500 - Kontext "TabUmlauf" - Call DialogTest ( TabUmlauf ) - - Kontext - active.SetPage TabHyperlinkRahmen - wait 500 - Kontext "TabHyperlinkRahmen" - Call DialogTest ( TabHyperlinkRahmen ) - - Kontext - active.SetPage TabGrafik - wait 500 - Kontext "TabGrafik" - Call DialogTest ( TabGrafik ) - - Kontext - active.SetPage TabUmrandung - wait 500 - Kontext "TabUmrandung" - Call DialogTest ( TabUmrandung ) - - Kontext - active.SetPage TabMakro - ' if no JRE is installed a messagebox appears - j = 0 - Do - j = j + 1 - Kontext "Active" - if Active.Exists then - if Active.GetRT = 304 then - if j = 1 then Warnlog Active.Gettext - Active.Ok - else - exit do - end if - else - exit do - end if - Loop - wait 500 - Kontext "TabMakro" - Call DialogTest ( TabMakro ) - - if gApplication <> "HTML" then - Kontext - active.SetPage TabZuschneiden - wait 500 - Kontext "TabZuschneiden" - Call DialogTest ( TabZuschneiden ) - - Kontext - active.SetPage TabHintergrund - wait 500 - Kontext "TabHintergrund" - Call DialogTest ( TabHintergrund ) - printlog " Close dialog" - TabHintergrund.Cancel - else - printlog " Close dialog" - TabMakro.Cancel - end if - end if - - printlog " Close active document" - Call hCloseDocument - gApplication = "WRITER" -endcase - -'----------------------------------------------------------- diff --git a/testautomation/writer/required/includes/w_004b_.inc b/testautomation/writer/required/includes/w_004b_.inc new file mode 100644 index 000000000000..3769ee9ee1ae --- /dev/null +++ b/testautomation/writer/required/includes/w_004b_.inc @@ -0,0 +1,965 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : Helge.Delfs@Sun.Com +'* +'* short description : Testcases with connection to the Insert-menu part II. +'* +'\*********************************************************************** + +sub w_004b_ + + printLog Chr(13) + "--------- Insert Menu ( w_004_ ) ----------" + + gApplication = "WRITER" + call tInsertHorizontalLine + call tInsertGraphicsFromFile + call tInsertAllGraphicsFromFile + call tInsertObjectOLEObject + call tInsertObjectPlugIn + call tInsertObjectSound + call tInsertObjectVideo + call tInsertObjectFormula + call tInsertObjectChart + call tInsertFile + + gApplication = "HTML" + call tHtmlDocInsertFields + call tHtmlDocInsertFieldsOther + call tHtmlDocInsertSection + call tHtmlDocInsertFrame + call tHtmlDocInsertGraphicsFromFile + gApplication = "WRITER" + +end sub + +testcase tInsertHorizontalLine + PrintLog "- Insert / Horizontal Line" + + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Horizontal Line" + InsertHorizontalLine + Kontext "HorizontaleLinieEinfuegen" + Call DialogTest (HorizontaleLinieEinfuegen) + printlog " Close dialog 'Insert Horizontal Ruler'" + HorizontaleLinieEinfuegen.Cancel + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertGraphicsFromFile + PrintLog "- Insert / Graphics / From File" + Dim j as integer + + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Graphics from file" + InsertGraphicsFromFile + + Kontext "GrafikEinfuegenDlg" + printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg" + Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) + Oeffnen.Click + + Kontext "Active" + if Active.Exists( 1 ) then + Warnlog Active.Gettext + Active.Ok + Kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Cancel + Call hCloseDocument + goto endsub + else + printlog " select again 'Insert / Grahics from file'" + InsertGraphicsFromFile + WaitSlot (2000) + printlog " Step through all tabpages" + Kontext + active.SetPage TabType + wait 500 + Kontext "TabType" + Call DialogTest ( TabType ) + + Kontext + active.SetPage TabZusaetze + wait 500 + Kontext "TabZusaetze" + Call DialogTest ( TabZusaetze ) + + Kontext + active.SetPage TabUmlauf + wait 500 + Kontext "TabUmlauf" + Call DialogTest ( TabUmlauf ) + + Kontext + active.SetPage TabHyperlinkRahmen + wait 500 + Kontext "TabHyperlinkRahmen" + Call DialogTest ( TabHyperlinkRahmen ) + + Kontext + active.SetPage TabGrafik + wait 500 + Kontext "TabGrafik" + Call DialogTest ( TabGrafik ) + + Kontext + active.SetPage TabUmrandung + wait 500 + Kontext "TabUmrandung" + Call DialogTest ( TabUmrandung ) + + Kontext + active.SetPage TabMakro + ' if no JRE is installed a messagebox appears + j = 0 + Do + j = j + 1 + Kontext "Active" + if Active.Exists() then + if Active.GetRT = 304 then + if j = 1 then Warnlog Active.Gettext + Active.Ok + else + exit do + end if + else + exit do + end if + Loop + wait 500 + Kontext "TabMakro" + Call DialogTest ( TabMakro ) + + if gApplication <> "HTML" then + Kontext + active.SetPage TabZuschneiden + wait 500 + Kontext "TabZuschneiden" + Call DialogTest ( TabZuschneiden ) + + Kontext + active.SetPage TabHintergrund + wait 500 + Kontext "TabHintergrund" + Call DialogTest ( TabHintergrund ) + printlog " Close dialog" + TabHintergrund.Cancel + else + printlog " Close dialog" + TabMakro.Cancel + end if + end if + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertAllGraphicsFromFile + + printlog( "Load files of all known graphics formats" ) + + dim iCurrentFile as integer + dim GraphicFile as String + dim Filtername as String + + printlog( "Insert a sample of commonly used file formats into a writer document (not linked)" ) + + gApplication = "WRITER" + Call hNewDocument + + for iCurrentFile = 1 to 25 + + ' MODIFY and ENABLE this SAMPLE snippet to exclude one fileformat from testing + ' if ( iCurrentFile = 7 ) AND (gtPlatform="x86") then + ' qaErrorLog("#<issue-id># crash on <platform> on loading <image-file>") + ' goto skipformat + ' endif + ' Note: Can be locale dependent! + if (iCurrentFile = 4) AND (gPlatform="osx") then + qaerrorlog("#i100253# crash on MacOS X on loading ball.eps") + goto skipformat + endif + + Kontext "GrafikEinfuegenDlg" + if ( not GrafikEinfuegenDlg.exists() ) then + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + endif + + if ( GrafikEinfuegenDlg.Exists( 2 ) ) then + ' the list of files expected to be found in the samples directory + select case iCurrentFile + case 1 : GraphicFile = "desp.bmp" + case 2 : GraphicFile = "columbia.dxf" + case 3 : GraphicFile = "extrud.emf" + case 4 : GraphicFile = "ball.eps" + case 5 : GraphicFile = "airshw.met" + case 6 : GraphicFile = "eface.gif" + case 7 : GraphicFile = "purzel.gif" ' Animated Gif + case 8 : GraphicFile = "borabora.jpg" + case 9 : GraphicFile = "grafix1.pbm" + case 10 : GraphicFile = "circle.pcx" + case 11 : GraphicFile = "papagei1.pcd" + case 12 : GraphicFile = "newtonme.pct" + case 13 : GraphicFile = "grafix2.pgm" + case 14 : GraphicFile = "obst.png" + case 15 : GraphicFile = "london.ppm" + case 16 : GraphicFile = "tiger.psd" + case 17 : GraphicFile = "grafix3.ras" + case 18 : GraphicFile = "mickym.sgf" + case 19 : GraphicFile = "faxpfeil.sgv" + case 20 : GraphicFile = "picture.svm" + case 21 : GraphicFile = "pilz.tga" + case 22 : GraphicFile = "stabler.tif" + case 23 : GraphicFile = "krokodil.wmf" + case 24 : GraphicFile = "grafix4.xbm" + case 25 : GraphicFile = "papagei2.xpm" + end select + + GraphicFile = ConvertPath (gTesttoolPath & "global\input\graf_inp\" & GraphicFile) + printlog( "Current file " + iCurrentFile + ": " & GraphicFile ) + printlog( " * Set filter to <All formats>" ) + DateiName.SetText( GraphicFile ) + DateiTyp.Select( 1 ) + WaitSlot() + + printlog( " * Uncheck Preview- and Link-checkbox, load the file" ) + Vorschau.unCheck + Verknuepfen.unCheck() + Oeffnen.click() + WaitSlot( 2000 ) + + Kontext "Active" + if ( Active.Exists() ) then + Warnlog( "Unexpected messagebox: " & Active.GetText() ) + Warnlog( "Affected file: " & GraphicFile ) + Active.OK + else + try + EditCopy + WaitSlot( 2000 ) + EditDeleteContents + WaitSlot( 2000 ) + catch + Warnlog( "Graphic file not selected/Copy or Delete is disabled: " & GraphicFile ) + gMouseClick (90, 90) + endcatch + endif + else + warnlog( "Insert Graphics Dialog is not open, aborting" ) + goto endsub + endif + + skipformat: + next iCurrentFile + + printlog( "" ) + printlog( "Test the PCD-Filters directly (3 samples)" ) + + for iCurrentFile = 1 to 3 + + printlog( "" ) + + Kontext "GrafikEinfuegenDlg" + if ( not GrafikEinfuegenDlg.exists() ) then + InsertGraphicsFromFile + Kontext "GrafikEinfuegenDlg" + endif + + if ( GrafikEinfuegenDlg.exists( 2 ) ) then + + select case iCurrentFile + case 1 : Filtername = "PCD - Kodak Photo CD (768x512) (*.pcd)" + case 2 : Filtername = "PCD - Kodak Photo CD (384x256) (*.pcd)" + case 3 : Filtername = "PCD - Kodak Photo CD (192x128) (*.pcd)" + end select + + GraphicFile = ConvertPath( gTesttoolPath & "global\input\graf_inp\papagei1.pcd" ) + + printlog( "Current filter: " & Filtername ) + printlog( "Current file..: " & GraphicFile ) + DateiName.SetText ( GraphicFile ) + DateiTyp.Select( Filtername ) + + printlog( " * Uncheck Preview- and Link-checkbox, load the file" ) + Vorschau.Uncheck() + Verknuepfen.unCheck() + Oeffnen.click() + WaitSlot( 2000 ) + + Kontext "Active" + if ( Active.Exists() )then + Warnlog( "Unexpected messagebox: " & Active.GetText() ) + Warnlog( "Affected file..: " & GraphicFile ) + Warnlog( "Affected filter: " & Filtername ) + Active.OK() + else + try + EditCopy + WaitSlot( 2000 ) + EditDeleteContents + WaitSlot( 2000 ) + catch + Warnlog( "Problems with filtertype : " & Filtername ) + gMouseClick (90, 90) + endcatch + endif + else + warnlog( "Insert Graphics Dialog is not open. Aborting" ) + goto endsub + endif + + next iCurrentFile + + Kontext "GrafikEinfuegenDlg" + if GrafikEinfuegenDlg.Exists then + GrafikEinfuegenDlg.Cancel + endif + + Call hCloseDocument + +endcase + +'----------------------------------------------------------- + +testcase tInsertObjectOLEObject + PrintLog "- Insert / Object / OLE-Objekt" + + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Object / OLE-Object" + InsertObjectOLEObject + + Kontext "OLEObjektEinfuegen" + printlog " Check both radiobuttons 'Create now' and 'Create from file'" + NeuErstellen.Check + Call DialogTest (OLEObjektEinfuegen, 1) + AusDateiErstellen.Check + Call DialogTest (OLEObjektEinfuegen, 2) + OLEObjektEinfuegen.Cancel + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertObjectPlugIn + PrintLog "- Insert / Object / Plug-In" + + printlog " Open new document" + Call hNewDocument + + printlog " Close 'Plug in' dialog" + InsertObjectPlugIn + + Kontext "PlugInEinfuegen" + if PlugInEinfuegen.Exists then + Call DialogTest (PlugInEinfuegen) + PlugInEinfuegen.Cancel + else + Warnlog "Dialog 'Plugin' is not up!" + end if + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertObjectSound + Printlog "- Insert / Object / Sound" + printlog " Open new document" + Call hNewDocument + + try + if gUseSysDlg = False then + InsertObjectSound + printlog " Insert / Object / Sound" + Kontext "OeffnenDlg" + if OeffnenDlg.Exists then + OeffnenDlg.Cancel + else + Warnlog "Dialog to insert Sound isn't up!" + end if + end if + catch + 'Warnlog "- Menu disabled or no Sound-PlugIn installed !?" + endcatch + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertObjectVideo + Printlog "- Insert / Object / Video" + + printlog " Open new document" + Call hNewDocument + + try + if gUseSysDlg = False then + InsertObjectVideo + printlog " Insert / Object / Video" + Kontext "OeffnenDlg" + if OeffnenDlg.Exists then + OeffnenDlg.Cancel + else + Warnlog "Dialog to insert Video isn't up!" + end if + end if + catch + 'Warnlog "- Menu disabled or no Video-PlugIn installed !?" + endcatch + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertObjectFormula + PrintLog "- Insert / Object / Formula" + + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Object / Formular" + InsertObjectFormula + WaitSlot (2000) + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + Warnlog Active.Gettext + Active.Ok + end if + end if + Sleep 1 + + printlog " Click in 'Math' document" + Call gMouseClick(1,1) + sleep 1 + printlog " 'Delete math-object in document" + Call wTypeKeys("<Delete>") + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertObjectChart + PrintLog "- Insert / Object / Chart" + + printlog " Open new document" + Call hNewDocument + ' Chart-Wizard will be invoked if data ranges exist + ' Therefor a table will be inserted + printlog " Insert / Table" + InsertTableWriter + Kontext "TabelleEinfuegenWriter" + TabelleEinfuegenWriter.Ok + + printlog " Insert / Object / Chart" + InsertObjectChart + + Kontext "ChartWizard" + if ChartWizard.Exists then + printlog "- Chart-Wizard is up=>OK" + Call DialogTest ( ChartWizard ) + printlog " Cancel Chart-Wizard" + ChartWizard.Cancel + else + warnlog "Chart-Wizard is not up though a table has been inserted" + end if + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tInsertFile + PrintLog "- Insert / File" + + printlog " Open new document" + Call hNewDocument + InsertFileWriter + WaitSlot( 2000 ) + + printlog " Insert / File" + Kontext "OeffnenDlg" + + printlog " Check 'File dialog'" + if OeffnenDlg.Exists( 2 ) then + Call DialogTest ( OeffnenDlg ) + try + Standard.Click + catch + Exceptlog + endcatch + + Kontext "Active" + if Active.Exists then + Warnlog Active.Gettext + Active.Ok + else + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + end if + end if + + printlog " Close active document" + Call hCloseDocument +endcase + +'----------------------------------------------------------- + +testcase tHtmlDocInsertFields + PrintLog "- Insert / Fields" + + gApplication = "HTML" + printlog " Open new document" + Call hNewDocument + + try + printlog "Insert / Fields / Date" + InsertFieldsDate + catch + Warnlog "Unable to execute: Insert / Fields / Date " + endcatch + printlog " Insert / Fields / Date" + Call wTypeKeys (" <Return>") + try + printlog "Insert / Fields / Time" + InsertFieldsTime + catch + Warnlog "Unable to execute: Insert / Fields / Time" + endcatch + printlog " Insert / Fields / Time" + Call wTypeKeys (" <Return>") + try + printlog "Insert / Fields / Page Number" + InsertFieldsPageNumbers + catch + Warnlog "Unable to execute: Insert / Fields / Page numbers" + endcatch + printlog " Insert / Fields / Page numbers" + Call wTypeKeys (" <Return>") + try + printlog "Insert / Fields / Page Count" + InsertFieldsPageCount + catch + Warnlog "Unable to execute: Insert / Fields / Page Count" + endcatch + printlog " Insert / Fields / Page count" + Call wTypeKeys (" <Return>") + try + printlog "Insert / Fields / Title" + InsertFieldsTitle + catch + Warnlog "Unable to execute: Insert / Fields / Title" + endcatch + printlog " Insert / Fields / Title" + Call wTypeKeys (" <Return>") + try + printlog "Insert / Fields / Author" + InsertFieldsAuthor + catch + Warnlog "Unable to execute: Insert / Fields / Author" + endcatch + printlog " Insert / Fields / Author" + if gApplication <> "HTML" then + try + printlog "Insert / Fields / Subject" + InsertFieldsSubject + catch + Warnlog "Unable to execute: Insert / Fields / Subject" + endcatch + printlog " If document not HTML then 'Insert / Fields / Subject" + Call wTypeKeys (" <Return>") + printlog " Press key 'enter'" + end if + + printlog " Close active document" + Call hCloseDocument + gApplication = "WRITER" +endcase + +'----------------------------------------------------------- + +testcase tHtmlDocInsertFieldsOther + Dim i as integer + Dim j as integer + printlog "- Insert / Fields / Other" + + gApplication = "HTML" + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Fields / Other" + InsertFieldsOther + + Kontext + printlog " In dialog step through all tabpages" + Active.SetPage TabDokumentFeldbefehle + Kontext "TabDokumentFeldbefehle" + Call Dialogtest ( TabDokumentFeldbefehle ) + + Kontext + Active.SetPage TabDokumentinfoFeldbefehle + Kontext "TabDokumentinfoFeldbefehle" + Call Dialogtest ( TabDokumentinfoFeldbefehle ) + + Kontext + Active.SetPage TabVariablen + Kontext "TabVariablen" + Call Dialogtest ( TabVariablen ) + + if gApplication <> "HTML" then + Kontext + Active.SetPage TabReferenzen + Kontext "TabReferenzen" + Call Dialogtest ( TabReferenzen ) + + Kontext + Active.SetPage TabFunktionen + Kontext "TabFunktionen" + Call Dialogtest ( TabFunktionen ) + for i=1 to Feldtyp.GetItemCount + Feldtyp.Select i + if MakroButton.IsEnabled then + MakroButton.Click + ' if no JRE is installed a messagebox appears + Do + j = j + 1 + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + if j = 1 then Warnlog Active.Gettext + Active.Ok + else + exit do + end if + else + exit do + end if + Loop + + Kontext "ScriptSelector" + if ( ScriptSelector.exists( 3 ) ) then + ScriptSelector.Close + else + warnlog( "Dialog <ScriptSelector> is not available" ) + endif + Kontext "TabFunktionen" + i=100 + end if + next i + + Kontext + Active.SetPage TabDatenbank + Kontext "TabDatenbank" + Call Dialogtest ( TabDatenbank ) + + printlog " Close dialog" + TabDatenbank.Close + else + printlog " Close dialog" + TabVariablen.Close + end if + printlog " Close active document" + Call hCloseDocument + gApplication = "WRITER" +endcase + +'----------------------------------------------------------- + +testcase tHtmlDocInsertSection + PrintLog "- Insert / Section" + + gApplication = "HTML" + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Section" + InsertSection + Kontext + + printlog " In dialog step through all tabpages" + printlog "- Tabpage Section" + Active.Setpage TabBereiche + Kontext "TabBereiche" + Call DialogTest (TabBereiche) + Verknuepfung.Check + + Auswaehlen.Click + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 1 ) ) then + OeffnenDlg.Cancel + else + warnlog( "Dialog <OeffnenDlg> is not available" ) + endif + + Wait 500 + Kontext + printlog "- Tabpage Columns" + Active.Setpage TabSpalten + Kontext "TabSpalten" + Call DialogTest (TabSpalten) + + Kontext + printlog "- Tabpage Background" + Active.Setpage TabHintergrund + Kontext "TabHintergrund" + Call DialogTest (TabHintergrund) + + if gApplication <> "HTML" then + printlog "Tabpage Indents" + Kontext + Active.Setpage TabSectionIndent + Kontext "TabSectionIndent" + Call DialogTest (TabSectionIndent) + + printlog "- Tabpage Footnotes/Endnotes" + Kontext + Active.Setpage TabFussEndnoten + Kontext "TabFussEndnoten" + Call DialogTest (TabFussEndnoten) + TabFussEndnoten.Cancel + else + TabHintergrund.Cancel + end if + printlog " Close active document" + Call hCloseDocument + gApplication = "WRITER" +endcase + +'----------------------------------------------------------- + +testcase tHtmlDocInsertFrame + PrintLog "- Insert / Frame" + + gApplication = "HTML" + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Frame" + InsertFrame + WaitSlot (2000) + + printlog " Step through all tabpages" + Kontext + active.SetPage TabType + Kontext "TabType" + Call DialogTest (TabType) + Sleep 1 + + Kontext + active.SetPage TabZusaetze + Kontext "TabZusaetze" + Call DialogTest (TabZusaetze) + Sleep 1 + + Kontext + active.SetPage TabUmlauf + Kontext "TabUmlauf" + Call DialogTest (TabUmlauf) + Sleep 1 + + Kontext + active.SetPage TabUmrandung + Kontext "TabUmrandung" + Call DialogTest (TabUmrandung) + Sleep 1 + + Kontext + active.SetPage TabHintergrund + Kontext "TabHintergrund" + Call DialogTest (TabHintergrund, 1) + Sleep 1 + try + Als.Select (2) + Call DialogTest (TabHintergrund, 2) + Sleep 1 + catch + Warnlog "Maybe missing combobox! (#i29517)" + endcatch + + if gApplication <> "HTML" then + Kontext + active.SetPage TabHyperlinkRahmen + Kontext "TabHyperlinkRahmen" + Call DialogTest (TabHyperlinkRahmen) + Durchsuchen.Click + + if gUSeSysDlg = False then + Kontext "OeffnenDlg" + OeffnenDlg.Cancel + end if + + Kontext + active.SetPage TabSpalten + Kontext "TabSpalten" + Call DialogTest (TabSpalten) + printlog " Close dialog" + TabSpalten.Cancel + else + printlog " Close dialog" + TabHintergrund.Cancel + end if + + printlog " Close active document" + Call hCloseDocument + gApplication = "WRITER" +endcase + +'----------------------------------------------------------- + +testcase tHtmlDocInsertGraphicsFromFile + PrintLog "- Insert / Graphics / From File" + Dim j as integer + + gApplication = "HTML" + printlog " Open new document" + Call hNewDocument + + printlog " Insert / Graphics from file" + InsertGraphicsFromFile + + Kontext "GrafikEinfuegenDlg" + printlog " Select as graphic to insert: '...\writer\required\input\graphics\jolink.jpg" + Dateiname.Settext ConvertPath ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) + Oeffnen.Click + + Kontext "Active" + if Active.Exists( 1 ) then + Warnlog Active.Gettext + Active.Ok + Kontext "GrafikEinfuegenDlg" + GrafikEinfuegenDlg.Cancel + Call hCloseDocument + goto endsub + else + printlog " select again 'Insert / Grahics from file'" + InsertGraphicsFromFile + WaitSlot (2000) + printlog " Step through all tabpages" + Kontext + active.SetPage TabType + wait 500 + Kontext "TabType" + Call DialogTest ( TabType ) + + Kontext + active.SetPage TabZusaetze + wait 500 + Kontext "TabZusaetze" + Call DialogTest ( TabZusaetze ) + + Kontext + active.SetPage TabUmlauf + wait 500 + Kontext "TabUmlauf" + Call DialogTest ( TabUmlauf ) + + Kontext + active.SetPage TabHyperlinkRahmen + wait 500 + Kontext "TabHyperlinkRahmen" + Call DialogTest ( TabHyperlinkRahmen ) + + Kontext + active.SetPage TabGrafik + wait 500 + Kontext "TabGrafik" + Call DialogTest ( TabGrafik ) + + Kontext + active.SetPage TabUmrandung + wait 500 + Kontext "TabUmrandung" + Call DialogTest ( TabUmrandung ) + + Kontext + active.SetPage TabMakro + ' if no JRE is installed a messagebox appears + j = 0 + Do + j = j + 1 + Kontext "Active" + if Active.Exists then + if Active.GetRT = 304 then + if j = 1 then Warnlog Active.Gettext + Active.Ok + else + exit do + end if + else + exit do + end if + Loop + wait 500 + Kontext "TabMakro" + Call DialogTest ( TabMakro ) + + if gApplication <> "HTML" then + Kontext + active.SetPage TabZuschneiden + wait 500 + Kontext "TabZuschneiden" + Call DialogTest ( TabZuschneiden ) + + Kontext + active.SetPage TabHintergrund + wait 500 + Kontext "TabHintergrund" + Call DialogTest ( TabHintergrund ) + printlog " Close dialog" + TabHintergrund.Cancel + else + printlog " Close dialog" + TabMakro.Cancel + end if + end if + + printlog " Close active document" + Call hCloseDocument + gApplication = "WRITER" +endcase + diff --git a/testautomation/writer/required/includes/w_005_.inc b/testautomation/writer/required/includes/w_005_.inc index 93fe9ac0237b..a1f4d1d4f8f3 100755 --- a/testautomation/writer/required/includes/w_005_.inc +++ b/testautomation/writer/required/includes/w_005_.inc @@ -24,7 +24,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testcases for the Format-Menu '* @@ -757,7 +757,7 @@ testcase tFormatColumn printlog " Close dialog" SpaltenBreite.OK Wait 500 - Call wDocSetContext + hSetDocumentContext() printlog " Enter some text in document" Call wTypeKeys ("Dies ist ein langer Text, HALLO HALLO") Wait 500 @@ -776,7 +776,7 @@ testcase tFormatColumn printlog " Format / Cloumn / Delete" TableDeleteColumns WaitSlot (500) - Call wDocSetContext + hSetDocumentContext() printlog " Press 'up' twice to point cursor in the table" Call wTypeKeys ("<Up>",2) wait 500 diff --git a/testautomation/writer/required/includes/w_005b_.inc b/testautomation/writer/required/includes/w_005b_.inc index ad7c69346cf8..707af57a1b6a 100644..100755 --- a/testautomation/writer/required/includes/w_005b_.inc +++ b/testautomation/writer/required/includes/w_005b_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testcases for the Format-Menu. '* @@ -176,7 +176,7 @@ testcase tFormatArrange printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'" Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) - + sleep(2) try printlog " Format / Arrange / Bring to front" FormatArrangeBringToFrontCalc @@ -219,12 +219,12 @@ testcase tFormatAlignment Call hNewDocument printlog " Insert a graphic from file '..\writer\required\input\graphics\jolink.jpg'" Call hGrafikEinfuegen ( gTesttoolPath + "writer\required\input\graphics\jolink.jpg" ) - + sleep(2) if ( gApplication = "HTML" ) then printlog " Format / Anchor / to Page" hUseAsyncSlot( "FormatAnchorToPage" ) end if - + try printlog " Format / Alignment / Left" FormatAlignmentLeft @@ -469,14 +469,14 @@ testcase tFormatWrapObject if ( hUseAsyncSlot( "FormatWrapContour" ) = -1 ) then printlog( "Format / Wrap / Contour disabled. Good." ) else - warnlog( "#i90964# Format / Wrap / Contour should not be enabled for frames" ) + warnlog( "Format / Wrap / Contour should not be enabled for frames" ) end if printlog " Format / Wrap / Edit Contour" if ( hUseAsyncSlot( "FormatWrapEditContour" ) = -1 ) then printlog( "Format / Wrap / Edit Contour disabled. Good." ) else - Warnlog( "#i90964# Wrap / Edit Contour should not be enabled for frames" ) + Warnlog( "Wrap / Edit Contour should not be enabled for frames" ) Kontext "KonturEditor" if ( KonturEditor.exists( 2 ) ) then diff --git a/testautomation/writer/required/includes/w_006_.inc b/testautomation/writer/required/includes/w_006_.inc index 626171707480..ba671b26d1ff 100644..100755 --- a/testautomation/writer/required/includes/w_006_.inc +++ b/testautomation/writer/required/includes/w_006_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Call all functions in table menu '* diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc index 9b9a19ca8676..94fa0d70f9f9 100755 --- a/testautomation/writer/required/includes/w_007_.inc +++ b/testautomation/writer/required/includes/w_007_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testcases for the Tools-Menu '* @@ -80,7 +80,7 @@ testcase tToolsSpellcheck printlog " Open document where the formatting is set to the language we wish to test." TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt") - if ( not hFileExists ( TheFile ) ) then + if ( not FileExists ( TheFile ) ) then Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer." goto endsub end if @@ -125,7 +125,7 @@ testcase tToolsSpellcheck if Active.exists then if Active.GetRT = 304 then Active.Ok Warnlog "Dialog 'Spellcheck' not up!" - Call hCloseDocument + hFileCloseAll() goto endsub end if catch @@ -204,9 +204,8 @@ testcase tToolsSpellcheck Spellcheck.Close wait 500 PrintLog "Close active documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop + hFileCloseAll() + endcase ' ------------------------------------------- @@ -243,7 +242,7 @@ testcase tToolsThesaurus printlog " Open document where the formatting is set to the language we wish to test." TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt") - if ( not hFileExists ( TheFile ) ) then + if ( not FileExists ( TheFile ) ) then Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer." goto endsub end if @@ -292,9 +291,8 @@ testcase tToolsThesaurus printlog " Close 'Thesaurus' dialog" Thesaurus.Cancel PrintLog "Close active documents" - Do Until GetDocumentCount = 0 - Call hCloseDocument - Loop + hFileCloseAll() + endcase ' ------------------------------------------- @@ -332,7 +330,7 @@ testcase tToolsHyphenation LingFile = str$(iSprache) + "-hyph.dat" end select - if ( not hFileExists( DieDatei ) ) then + if ( not FileExists( DieDatei ) ) then Warnlog "No defined Errortext for language: " + isprache + "! Exit!" goto endsub end if @@ -1116,6 +1114,7 @@ endcase ' ------------------------------------------- testcase tHtmlDocToolsHangulHanjaConversion + Dim bAsianLanguage as Boolean Dim sTestFile as String @@ -1225,7 +1224,7 @@ testcase tMasterDocToolsHyphenation end select sTestFile = convertpath( sTestFile ) - if ( not hFileExists( sTestFile ) )then + if ( not FileExists( sTestFile ) )then Warnlog "No defined Errortext for language: " + isprache + "! Exit!" goto endsub end if diff --git a/testautomation/writer/required/includes/w_008_.inc b/testautomation/writer/required/includes/w_008_.inc index f3b20e978a1d..1cd171219a65 100644..100755 --- a/testautomation/writer/required/includes/w_008_.inc +++ b/testautomation/writer/required/includes/w_008_.inc @@ -24,7 +24,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Diverse Testcases for the office. '* diff --git a/testautomation/writer/required/includes/w_009_.inc b/testautomation/writer/required/includes/w_009_.inc index 90c4cb5aad19..fcc0b0e64cf8 100644..100755 --- a/testautomation/writer/required/includes/w_009_.inc +++ b/testautomation/writer/required/includes/w_009_.inc @@ -24,7 +24,7 @@ ' '/************************************************************************ '* ** -'* owner : helge.delfs@sun.com ** +'* owner : helge.delfs@oracle.com ** '* ** '* short description : Testcases for the Help-Menu '* @@ -86,9 +86,8 @@ testcase tHelpAboutStarOffice DialogTest ( UeberStarWriter ) printlog " In About dialog enter key <Strg+Alt+Del>" UeberStarWriter.TypeKeys "<Mod1 S><Mod1 D><Mod1 T>" - Sleep 3 printlog " Close About dialog" - UeberStarWriter.OK + hCloseDialog( UeberStarWriter, "ok" ) printlog " Close active document" Call hCloseDocument endcase diff --git a/testautomation/writer/required/includes/w_010_.inc b/testautomation/writer/required/includes/w_010_.inc index 29c802022bed..5e2a596fbfd9 100644..100755 --- a/testautomation/writer/required/includes/w_010_.inc +++ b/testautomation/writer/required/includes/w_010_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testcases for the Objectbars. '* @@ -74,6 +74,9 @@ end sub '----------------------------------------------------------- testcase tFormatting + + GLOBAL_USE_NEW_SLEEP = TRUE + printlog "- Objectbar ( normal ) : Formatting" Call hNewDocument printlog " Open new document" @@ -147,6 +150,9 @@ testcase tFormatting Sleep 1 Call hCloseDocument printlog " Close active document" + + GLOBAL_USE_NEW_SLEEP = FALSE + endcase '----------------------------------------------------------- @@ -1078,6 +1084,10 @@ testcase tHtmlDocFormatting printlog " Open new document" Call hNewDocument + + Kontext "NavigatorWriter" + if NavigatorWriter.Exists then ViewNavigator + Call wTypeKeys ("Formatting <Shift Home>") Kontext "TextObjectbar" if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true ) @@ -1153,6 +1163,11 @@ testcase tMasterDocFormatting printlog " Open new document" Call hNewDocument + + Kontext "NavigatorGlobalDoc" + if NavigatorGlobalDoc.Exists then ViewNavigator + + Call wTypeKeys ("Formatting <Shift Home>") Kontext "TextObjectbar" if Not TextObjectbar.Exists then Call hToolbarSelect ( "FORMATTING", true ) diff --git a/testautomation/writer/required/includes/w_010_1.inc b/testautomation/writer/required/includes/w_010_1.inc index b0cf33b43892..5b746eaf4ad2 100644..100755 --- a/testautomation/writer/required/includes/w_010_1.inc +++ b/testautomation/writer/required/includes/w_010_1.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Testcases for the Objectbars. '* diff --git a/testautomation/writer/required/includes/w_011_.inc b/testautomation/writer/required/includes/w_011_.inc index 61a20821349f..bc2fc42cf6b7 100755 --- a/testautomation/writer/required/includes/w_011_.inc +++ b/testautomation/writer/required/includes/w_011_.inc @@ -24,7 +24,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description: Testcases for the Toolbar. '* diff --git a/testautomation/writer/required/includes/w_020_.inc b/testautomation/writer/required/includes/w_020_.inc index f927d24952f7..d5f4709d9c21 100644..100755 --- a/testautomation/writer/required/includes/w_020_.inc +++ b/testautomation/writer/required/includes/w_020_.inc @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description: Testcases for Toolbars. '* @@ -59,8 +59,10 @@ end sub '----------------------------------------------------------- testcase t_TB_Insert - qaErrorLog "#158646# - Inserting Indexes causes crash." - goto endsub + + ' JSK: This issue is solved since OOO300m9, enabling test again + 'qaErrorLog "#158646# - Inserting Indexes causes crash." + 'goto endsub printlog "- Toolbox ( normal ) : All within Insert" @@ -122,7 +124,8 @@ testcase t_TB_Insert else Call hToolbarSelect("Insert", true) endif - + + sleep( 2 ) ' Too fast for some machines. Using dirty fix. if Tabelle.IsEnabled then Tabelle.Click Kontext "TabelleEinfuegenWriter" @@ -235,7 +238,7 @@ testcase t_TB_InsertFields printlog "- Toolbox ( normal ) : Fields" if gPlatgroup = "unx" then - QAErrorlog "Doesn't run on unix" + printlog( "Test not suitable for Unix(like) OS" ) goto endsub end if printlog " Open new document" @@ -658,8 +661,10 @@ endcase '----------------------------------------------------------- testcase tHtmlDoc_TB_Insert - qaErrorLog "#158646# - Inserting Indexes causes crash." - goto endsub + + ' JSK: This issue is solved since OOO300m9, enabling test again + 'qaErrorLog "#158646# - Inserting Indexes causes crash." + 'goto endsub printlog "- Toolbox ( normal ) : All within Insert" gApplication = "HTML" @@ -780,7 +785,7 @@ testcase tHtmlDoc_TB_InsertFields gApplication = "HTML" if gPlatgroup = "unx" then - QAErrorlog "Doesn't run on unix" + printlog( "Test not suitable for Unix(like) OS" ) goto endsub end if diff --git a/testautomation/writer/required/w_updt.bas b/testautomation/writer/required/w_updt.bas index 498826f83e8d..e9fc5aab6458 100755 --- a/testautomation/writer/required/w_updt.bas +++ b/testautomation/writer/required/w_updt.bas @@ -25,7 +25,7 @@ ' '/************************************************************************ '* -'* owner : helge.delfs@sun.com +'* owner : helge.delfs@oracle.com '* '* short description : Ressource-Test Writer Document '* @@ -42,6 +42,7 @@ sub main use "writer\required\includes\w_002_.inc" use "writer\required\includes\w_003_.inc" use "writer\required\includes\w_004_.inc" + use "writer\required\includes\w_004b_.inc" use "writer\required\includes\w_005_.inc" use "writer\required\includes\w_005b_.inc" use "writer\required\includes\w_006_.inc" @@ -64,6 +65,7 @@ sub main Call w_002_ ' Menu Edit Call w_003_ ' Menu View Call w_004_ ' Menu Insert + Call w_004b_ ' Menu Insert Call w_005_ ' Menu Format Call w_005b_ ' Menu Format (2) Call w_006_ ' Menu Table |