summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional/includes/security_incorrect_password.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/framework/optional/includes/security_incorrect_password.inc')
-rw-r--r--testautomation/framework/optional/includes/security_incorrect_password.inc116
1 files changed, 60 insertions, 56 deletions
diff --git a/testautomation/framework/optional/includes/security_incorrect_password.inc b/testautomation/framework/optional/includes/security_incorrect_password.inc
index c3f90cb4fbd0..eedbc8c67896 100644
--- a/testautomation/framework/optional/includes/security_incorrect_password.inc
+++ b/testautomation/framework/optional/includes/security_incorrect_password.inc
@@ -55,9 +55,7 @@ testcase tIncorrectPassword( filetypeID as string )
hDeleteFile( workpath & WORKFILE & suffix )
printlog( "Make sure we have exactly one single document open" )
- do while( getDocumentCount > 0 )
- hDestroyDocument()
- loop
+ hFileCloseAll()
hCreateDocument()
printlog( "Change the document" )
@@ -67,70 +65,76 @@ testcase tIncorrectPassword( filetypeID as string )
FileSave
Kontext "SpeichernDlg"
- printlog( "Check the password checkbox" )
- Passwort.check()
-
- printlog( "Name the file as " & workpath & WORKFILE )
- Dateiname.settext( workpath & WORKFILE )
-
- if ( filetypeID <> "current" ) then
- for iCurrentFilter = 1 to DateiTyp.getItemCount()
-
- DateiTyp.select( iCurrentFilter )
- cCurrentFilter = DateiTyp.getSelText()
- if ( instr( cCurrentFilter , suffix ) > 0 ) then
- printlog( "Using custom filter: " & cCurrentFilter )
- exit for
- endif
- next iCurrentFilter
- else
- printlog( "Using default filter: " & DateiTyp.getSelText() )
- endif
-
- printlog( "Click on the Save-Button" )
- Speichern.click()
+ if ( SpeichernDlg.exists( 1 ) ) then
+ printlog( "Automatic filename extension" )
+ AutomatischeDateinamenserweiterung.check()
+
+ printlog( "Check the password checkbox" )
+ Passwort.check()
+
+ printlog( "Name the file as " & workpath & WORKFILE )
+ Dateiname.settext( workpath & WORKFILE )
+
+ if ( filetypeID <> "current" ) then
+ for iCurrentFilter = 1 to DateiTyp.getItemCount()
+
+ DateiTyp.select( iCurrentFilter )
+ cCurrentFilter = DateiTyp.getSelText()
+ if ( instr( cCurrentFilter , suffix ) > 0 ) then
+ printlog( "Using custom filter: " & cCurrentFilter )
+ exit for
+ endif
+ next iCurrentFilter
+ else
+ printlog( "Using default filter: " & DateiTyp.getSelText() )
+ endif
+
+ printlog( "Click on the Save-Button" )
+ Speichern.click()
- brc = hSecurityEnterPasswordOnSave( PASSWORD_VALID )
+ brc = hSecurityEnterPasswordOnSave( PASSWORD_VALID )
- if ( brc ) then
+ if ( brc ) then
+
+ kontext "AlienWarning"
+ if ( AlienWarning.exists( 3 ) ) then
+ AlienWarning.ok()
+ if ( filetypeID <> "current" ) then
+ printlog( "Accepted to save in alien format" )
+ else
+ warnlog( "Alien warning not expected for default file format" )
+ endif
+ endif
- kontext "AlienWarning"
- if ( AlienWarning.exists( 3 ) ) then
- AlienWarning.ok()
- if ( filetypeID <> "current" ) then
- printlog( "Accepted to save in alien format" )
- else
- warnlog( "Alien warning not expected for default file format" )
+ printlog( "Close the document" )
+ brc = hDestroyDocument()
+ if ( not brc ) then
+ warnlog( "Something went wrong while closing the document. please check" )
endif
+
+ else
+ warnlog( "Something went wrong setting the password for the docuemnt" )
endif
- printlog( "Close the document" )
- brc = hDestroyDocument()
+ printlog( "Load the file again" )
+ hFileOpen( workpath & WORKFILE & suffix )
+ brc = hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false )
if ( not brc ) then
- warnlog( "Something went wrong while closing the document. please check" )
+ warnlog( "Something went wrong while using the password dialog" )
endif
-
- else
- warnlog( "Something went wrong setting the password for the docuemnt" )
- endif
-
- printlog( "Load the file again" )
- hFileOpen( workpath & WORKFILE & suffix )
- brc = hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false )
- if ( not brc ) then
- warnlog( "Something went wrong while using the password dialog" )
- endif
-
- hDestroyDocument()
- printlog( "Verify that we have no open documents" )
- if ( getDocumentCount <> 0 ) then
- warnlog( "No documents should be open at this point" )
- endif
+ hDestroyDocument()
- printlog( "Delete the workfile" )
- hDeleteFile( workpath & WORKFILE & suffix )
+ printlog( "Verify that we have no open documents" )
+ if ( getDocumentCount <> 0 ) then
+ warnlog( "No documents should be open at this point" )
+ endif
+ printlog( "Delete the workfile" )
+ hDeleteFile( workpath & WORKFILE & suffix )
+ else
+ warnlog( "Unable to open file save dialog" )
+ endif
endcase