summaryrefslogtreecommitdiff
path: root/testautomation/framework
diff options
context:
space:
mode:
authorJoerg Skottke [jsk] <jsk@openoffice.org>2010-07-26 13:45:12 +0200
committerJoerg Skottke [jsk] <jsk@openoffice.org>2010-07-26 13:45:12 +0200
commitf862f9ffd6d09a434cc4d4228c16687457ea88a4 (patch)
treea4a543814f1448d7377821128ffe942c2c12d3be /testautomation/framework
parenta849a5c81048bd72e981249394f4d51d1f366715 (diff)
jl154: #i113165# - Removed no longer needed helper functions as we do not test menus anymore
Diffstat (limited to 'testautomation/framework')
-rwxr-xr-xtestautomation/framework/required/includes/wizard_agenda.inc13
-rwxr-xr-xtestautomation/framework/required/includes/wizard_documentconverter.inc2
-rwxr-xr-xtestautomation/framework/required/includes/wizard_euroconverter.inc2
-rwxr-xr-xtestautomation/framework/required/includes/wizard_fax.inc11
-rwxr-xr-xtestautomation/framework/required/includes/wizard_firsttime.inc14
-rwxr-xr-xtestautomation/framework/required/includes/wizard_letter.inc20
-rwxr-xr-xtestautomation/framework/required/includes/wizard_presentation.inc5
-rwxr-xr-xtestautomation/framework/tools/includes/wizards.inc253
-rwxr-xr-xtestautomation/framework/tools/input/menuentries.txt50
9 files changed, 25 insertions, 345 deletions
diff --git a/testautomation/framework/required/includes/wizard_agenda.inc b/testautomation/framework/required/includes/wizard_agenda.inc
index d320234fd40b..be2c441309f4 100755
--- a/testautomation/framework/required/includes/wizard_agenda.inc
+++ b/testautomation/framework/required/includes/wizard_agenda.inc
@@ -81,17 +81,16 @@ testcase tUpdtWizardAgenda
hWaitForObject( TemplateName, 3000 )
TemplateName.setText( cTemplateName )
hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotAgenda"
+ hClickButton( CreateButton )
- iErr = hHandleSaveError()
- if ( iErr = 1 ) then
+ if ( hHandleSaveError() = 1 ) then
kontext "AutopilotAgenda"
- hFinishWizard( 1 )
+ hClickButton( CreateButton )
endif
- brc = hDestroyDocument()
- if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+ if ( not hDestroyDocument() ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
hFileCloseAll()
hDeleteFile( cTemplatePath )
diff --git a/testautomation/framework/required/includes/wizard_documentconverter.inc b/testautomation/framework/required/includes/wizard_documentconverter.inc
index c49987df5ef0..3fb1165d3180 100755
--- a/testautomation/framework/required/includes/wizard_documentconverter.inc
+++ b/testautomation/framework/required/includes/wizard_documentconverter.inc
@@ -78,7 +78,7 @@ testcase tUpdtWizardDocumentConverter
printlog( "Page " & 1 + iDocumentType & " is visible" )
else
warnlog( "Cannot access page 2, aborting test" )
- hFinishWizard()
+ hCloseDialog( DocumentConverter, "Cancel" )
goto endsub
endif
diff --git a/testautomation/framework/required/includes/wizard_euroconverter.inc b/testautomation/framework/required/includes/wizard_euroconverter.inc
index 0ea775e2c490..2327b8bd7c54 100755
--- a/testautomation/framework/required/includes/wizard_euroconverter.inc
+++ b/testautomation/framework/required/includes/wizard_euroconverter.inc
@@ -119,7 +119,7 @@ testcase tUpdtWizardEuroconverter
kontext "AutopilotEuroKonverter"
call DialogTest( AutopilotEuroKonverter , 2 )
- hFinishWizard( 1 )
+ hClickButton( Konvertieren )
hDestroyDocument()
hDeleteFile( cTargetDir & TARGET_FILE )
diff --git a/testautomation/framework/required/includes/wizard_fax.inc b/testautomation/framework/required/includes/wizard_fax.inc
index b970d8754c5d..f3af35492441 100755
--- a/testautomation/framework/required/includes/wizard_fax.inc
+++ b/testautomation/framework/required/includes/wizard_fax.inc
@@ -35,9 +35,6 @@ testcase tUpdtWizardFax
printlog( "Resource test for the fax wizard" )
- dim iErr as integer
- dim brc as boolean
-
dim cTemplateName as string
dim cTemplatePath as string
@@ -74,14 +71,14 @@ testcase tUpdtWizardFax
TemplateName.setText( cTemplateName )
hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotFax"
+ hClickButton( FinishButton )
kontext "StandardBar"
hWaitForObject( Speichern, 5000 )
- brc = hDestroyDocument()
- if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+ if ( not hDestroyDocument() ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
printlog( "Delete the user-template: " & cTemplatePath )
hDeleteFile( cTemplatePath )
diff --git a/testautomation/framework/required/includes/wizard_firsttime.inc b/testautomation/framework/required/includes/wizard_firsttime.inc
index e057ba09d2e8..09cace9127a3 100755
--- a/testautomation/framework/required/includes/wizard_firsttime.inc
+++ b/testautomation/framework/required/includes/wizard_firsttime.inc
@@ -64,10 +64,6 @@ testcase tUpdtWizardFirsttime
NextBtn.click()
endif
-
-
-
-
printlog( "Check the license page" )
kontext "TabFirstStartLicense"
if ( TabFirstStartLicense.exists( 2 ) ) then
@@ -198,7 +194,7 @@ testcase tUpdtWizardFirsttime
LoadQuickstarter.unCheck()
printlog( "Closing Tools/Options" )
Kontext "OptionenDlg"
- OptionenDlg.cancel()
+ hCloseDialog( OptionenDlg, "cancel" )
printlog( "Restarting program" )
call ExitRestartTheOffice()
else
@@ -218,16 +214,12 @@ testcase tUpdtWizardFirsttime
endif
Kontext "OptionenDlg"
- if ( OptionenDlg.exists() ) then
- OptionenDlg.cancel()
- endif
+ hCloseDialog( OptionenDlg, "cancel, optional" )
' due to issue i105248 the Quickstart disabler needs to get called again, because the First Start Wizard resets the veto
call hDisableQuickstarterAPI()
- do while( getDocumentCount() > 0 )
- call hCloseDocument()
- loop
+ hFileCloseAll()
endcase
diff --git a/testautomation/framework/required/includes/wizard_letter.inc b/testautomation/framework/required/includes/wizard_letter.inc
index 267efcefd18a..a07ac5869c79 100755
--- a/testautomation/framework/required/includes/wizard_letter.inc
+++ b/testautomation/framework/required/includes/wizard_letter.inc
@@ -35,10 +35,6 @@ testcase tUpdtWizardLetter
printlog( "Resource test for the letter-wizard" )
- dim iErr as integer
- dim brc as boolean
- dim irc as integer
-
' Build the filename we want to save the template as.
dim cTemplateName as string
cTemplateName = "FWK-Testtool-Template-letterWizard.ott"
@@ -158,8 +154,9 @@ testcase tUpdtWizardLetter
printlog( " * name the template for further usage" )
TemplateName.setText( cTemplateName )
hSetTemplateSavePath( cTemplatePath )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotLetter"
+ hClickButton( FinishButton )
if ( gOOo ) then
kontext "UseOfThisTemplate"
@@ -171,22 +168,19 @@ testcase tUpdtWizardLetter
endif
endif
- iErr = hHandleSaveError()
- if ( iErr = 1 ) then
+ if ( hHandleSaveError() = 1 ) then
kontext "AutopilotLetter"
- hFinishWizard( 1 )
+ hClickButton( FinishButton )
endif
- brc = hDestroyDocument()
- if ( not brc ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
+ if ( not hDestroyDocument() ) then qaerrorlog( "#i59233# The wizard does not display the new template" )
else
warnlog( "Autopilot Letter not open/exceeded timeout" )
endif
hDeleteFile( cTemplatePath )
- irc = hDeleteUserTemplates()
- if ( irc <> 0 ) then
+ if ( hDeleteUserTemplates() <> 0 ) then
printlog( "Unexpectedly deleted user template(s), please check")
endif
diff --git a/testautomation/framework/required/includes/wizard_presentation.inc b/testautomation/framework/required/includes/wizard_presentation.inc
index 59544e0fb48e..ee8c3f815887 100755
--- a/testautomation/framework/required/includes/wizard_presentation.inc
+++ b/testautomation/framework/required/includes/wizard_presentation.inc
@@ -57,8 +57,9 @@ testcase tUpdtWizardPresentation
printlog( "Page 3" )
kontext "AutopilotPraesentation3"
call DialogTest( AutopilotPraesentation3 )
-
- hFinishWizard( 1 )
+
+ kontext "AutopilotPraesentation3"
+ hCloseDialog( AutopilotPraesentation3, "ok" )
else
warnlog( "Presentation wizard not open/exceeded timeout" )
endif
diff --git a/testautomation/framework/tools/includes/wizards.inc b/testautomation/framework/tools/includes/wizards.inc
index 39f72f3df901..379677e0c1cf 100755
--- a/testautomation/framework/tools/includes/wizards.inc
+++ b/testautomation/framework/tools/includes/wizards.inc
@@ -31,259 +31,6 @@
'*
'\******************************************************************************
-function hOpenWizard( cWizard as string ) as boolean
-
- const CFN = "hOpenWizard(): "
- const NUMBER_OF_RETRIES = 3
-
- dim iTry as integer
- dim brc as boolean : brc = false
-
- if ( GVERBOSE ) then printlog( CFN & "Opening wizard" )
-
- ' Call the wizard by slot
- for iTry = 1 to NUMBER_OF_RETRIES
- try
- select case ( ucase( cWizard ) )
- case "PRESENTATION" : FileAutopilotPresentation
- case "FIRTSTIME" : FirstTimeWizard
- case "MAILMERGE" : ToolsMailMergeWizard
- case "EUROCONV" : FileWizardEuroConverter
- case "DOCCONV" : FileWizardDocumentConverter
- case "WEBPAGE" : FileWizardsWebPage
- case "LETTER" : FileAutopilotLetter
- case "AGENDA" : FileAutopilotAgenda
- case "ADRESS" : FileAutopilotAddressDataSource
- case "FAX" : FileAutopilotFax
- case else :
- warnlog( CFN & "Invalid wizard requested: " & cWizard )
- hOpenWizard() = brc
- exit function
- end select
-
- brc = true
- exit for
- catch
- wait( 200 )
- endcatch
- next iTry
-
- ' Print warning if slot was blocked.
- if ( not brc ) then
- warnlog( CFN & "Failed to open requested wizard: " & cWizard )
- endif
-
-end function
-
-'*******************************************************************************
-
-function hFinishWizard( iMode as integer ) as boolean
-
- const CFN = "hFinishWizard::"
-
- '///<h3>Finish or cancel a wizard</h3>
- '///<i>Starting point: Any known wizard must be open</i><br>
- '///<i>If several wizards are open at the same time the outcome is undefined</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Closing method (integer). Valid options are:</li>
- '///<ul>
- '///+<li>1: Click Finish-Button</li>
- '///+<li>2: Click Cancel-Button</li>
- '///+<li>3: Use Accelerator for Finish-Button</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Errorcode (boolean)</li>
- '///<ul>
- '///+<li>TRUE: If everything is ok</li>
- '///+<li>FALSE: On any error (including incorrect function parameters)</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- '///+<li>Handle possible errors when invoking this function</li>
- if ( ( iMode < 1 ) or ( iMode > 3 ) ) then
- printlog( CFN & "Invalid iMode = " & iMode )
- hFinishWizard() = false
- exit function
- endif
-
- dim cAccel as string
- dim iWait as integer
- dim brc as boolean : brc = false
-
-
- '///+<li>Try to close the wizard</li>
- for iWait = 1 to 5
-
- Kontext "AutopilotLetter"
- if ( AutopilotLetter.exists() ) then
- select case iMode
- case 1 : hWaitForObject( FinishButton, 3000 ) : FinishButton.click()
- case 2 : AutopilotLetter.cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotLetter.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutopilotFax"
- if ( AutopilotFax.exists() ) then
- select case iMode
- case 1 : hWaitForObject( FinishButton, 3000 ) : FinishButton.click()
- case 2 : AutopilotFax.cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotFax.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutopilotAgenda"
- if ( AutopilotAgenda.exists() ) then
- select case iMode
- case 1 : hWaitForObject( createButton, 3000 ) : createButton.click()
- case 2 : hWaitForObject( cancelButton, 3000 ) : cancelButton.click()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotAgenda.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "MailMergeWizard"
- if ( MailMergeWizard.exists() ) then
- select case iMode
- case 1 : MailMergeWizard.OK()
- case 2 : MailMergeWizard.Cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- MailMergeWizard.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutopilotPraesentation3"
- if ( AutopilotPraesentation3.exists() ) then
- select case iMode
- case 1 : AutopilotPraesentation3.OK()
- case 2 : AutopilotPraesentation3.Cancel()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutopilotPraesentation3.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- Kontext "AutoPilotEuroKonverter"
- if ( AutoPilotEuroKonverter.exists() ) then
- select case iMode
- case 1 : hWaitForObject( Konvertieren, 3000 ) : Konvertieren.click()
- case 2 : hWaitForObject( abbrechen , 3000 ) : abbrechen.click()
- case 3 : cAccel = hGetAccel( "Finish_Wizard" )
- AutoPilotEuroKonverter.typeKeys( cAccel )
- end select
- brc = true
- exit for
- endif
-
- next iWait
-
- '///+<li>Verify that no wizard is open anymore</li>
- if ( brc ) then
- printlog( CFN & "Closed wizard" )
- hFinishWizard() = true
- else
- qaerrorlog( CFN & "No (known) wizard is present to be closed" )
- hFinishWizard() = false
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
-function hGetWizardParams( cType as string, cParam as string ) as integer
-
- const CFN = "hGetWizardParams::"
-
- '///<h3>Retrieve the location of a wizard in the menu</h3>
- '///<i>Uses: framework/tools/input/menuentries.txt</i><br>
- '///<i>Refer to inline documentation for further information</i><br>
- '///<u>Input</u>:
- '///<ol>
- '///+<li>Name of Wizard (string). Valid options are:</li>
- '///<ul>
- '///+<li>&quot;LETTER&quot;</li>
- '///+<li>&quot;FAX&quot;</li>
- '///+<li>&quot;AGENDA&quot;</li>
- '///+<li>&quot;PRESENTATION&quot;</li>
- '///+<li>&quot;WEBPAGE&quot;</li>
- '///+<li>&quot;DOCCONV&quot;</li>
- '///+<li>&quot;EUROCONV&quot;</li>
- '///+<li>&quot;ADDRESS&quot;</li>
- '///+<li>&quot;MAILMERGE&quot;</li>
- '///</ul>
- '///+<li>Menu Position (string). Valid options are:</li>
- '///<ul>
- '///+<li>&quot;ID&quot; - This is a unique id for the wizard</li>
- '///+<li>&quot;MAIN&quot; - Main menu position (e.g. &quot;File&quot;</li>
- '///+<li>&quot;SUB&quot; - Position below main menu</li>
- '///</ul>
- '///</ol>
- '///<u>Returns</u>:
- '///<ol>
- '///+<li>Position of a menu entry (integer)</li>
- '///<ul>
- '///+<li>0: Invalid function parameter</li>
- '///+<li>1-n: Position of the item in the menu</li>
- '///</ul>
- '///</ol>
- '///<u>Description</u>:
- '///<ul>
-
- dim iParam as integer
-
- dim cInputArray( 200 ) as string
- dim iArraySize as integer
-
- dim cFile as string
- cFile = gTesttoolPath & "framework\tools\input\menuentries.txt"
- cFile = convertpath( cFile )
-
- '///+<li>Lowercase all function parameters</li>
- cType = ucase( cType )
- cParam = ucase( cParam )
-
- '///+<li>Read in the section containing the waizard parameters</li>
- '///+<li>Retrieve the requested value from the section</li>
- iArraySize = hGetDataFileSection( cFile , cInputArray() , ctype , "" , "" )
- if ( iArraySize = 3 ) then
-
- select case cParam
- case "ID"
- iParam = hGetValueForKeyAsInt( cInputArray() , "iWizardId" )
- case "MAIN"
- iParam = hGetValueForKeyAsInt( cInputArray() , "iMainMenuPosition" )
- case "SUB"
- iParam = hGetValueForKeyAsInt( cInputArray() , "iMenuPosition" )
- end select
-
- hGetWizardParams() = iParam
- else
- qaerrorlog( CFN & "hGetDataFileSection returned invalid data" )
- hGetWizardParams() = 0
- endif
- '///</ul>
-
-end function
-
-'*******************************************************************************
-
function hWaitForWizard() as integer
const CFN = "hWaitForWizard::"
diff --git a/testautomation/framework/tools/input/menuentries.txt b/testautomation/framework/tools/input/menuentries.txt
deleted file mode 100755
index e1517412bc26..000000000000
--- a/testautomation/framework/tools/input/menuentries.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# This file contains the position of the menuentries for all
-# wizards ∧assigns them a unique number
-# iWizardId = Unique number
-# iMenuPosition = Position below the main menu entry
-# iMainMenuPosition = Position ∈main menu, e.g. "File"
-
-[LETTER]
-iWizardID=1
-iMenuPosition=1
-iMainMenuPosition=1
-
-[FAX]
-iWizardID=2
-iMenuPosition=2
-iMainMenuPosition=1
-
-[AGENDA]
-iWizardID=3
-iMenuPosition=3
-iMainMenuPosition=1
-
-[PRESENTATION]
-iWizardID=4
-iMenuPosition=4
-iMainMenuPosition=1
-
-[WEBPAGE]
-iWizardID=5
-iMenuPosition=5
-iMainMenuPosition=1
-
-[DOCCONV]
-iWizardID=6
-iMenuPosition=6
-iMainMenuPosition=1
-
-[EUROCONV]
-iWizardID=7
-iMenuPosition=7
-iMainMenuPosition=1
-
-[ADDRESS]
-iWizardID=8
-iMenuPosition=8
-iMainMenuPosition=1
-
-[MAILMERGE]
-iWizardID=11
-iMenuPosition=11
-iMainMenuPosition=7