summaryrefslogtreecommitdiff
path: root/testautomation/global/tools/includes/required/t_doc1.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/global/tools/includes/required/t_doc1.inc')
-rwxr-xr-xtestautomation/global/tools/includes/required/t_doc1.inc19
1 files changed, 11 insertions, 8 deletions
diff --git a/testautomation/global/tools/includes/required/t_doc1.inc b/testautomation/global/tools/includes/required/t_doc1.inc
index ff07554bca35..0ee504c5432e 100755
--- a/testautomation/global/tools/includes/required/t_doc1.inc
+++ b/testautomation/global/tools/includes/required/t_doc1.inc
@@ -243,20 +243,17 @@ end function
'
function hCloseDocument()
- '/// Trigger FileClose slot'
hUseAsyncSlot( "FileClose")
- '/// Accept to lose changes'
Kontext "Active"
if ( Active.Exists( 2 ) ) then
try
Active.No
catch
- Active.Click( 202 )
+ Active.click( 202 )
endcatch
end if
- '/// Wait for FileClose to complete'
WaitSlot( 2000 )
end function
@@ -357,6 +354,8 @@ end sub
'
sub hTypeKeys ( OutputText , optional _iLoop as Integer )
+ const CFN = "global::tools::includes::required::t_doc1.inc::hTypeKeys(): "
+
dim iRepeat as integer
dim iLoop as integer
dim oDocument as object
@@ -371,10 +370,14 @@ sub hTypeKeys ( OutputText , optional _iLoop as Integer )
hSetDocumentContext() ' set kontext to current document type
oDocument = hSetDocumentObject() ' Get the document object we want to write to
- for iRepeat = 1 to iLoop
- oDocument.TypeKeys( OutputText )
- wait( 200 )
- next iRepeat
+ try
+ for iRepeat = 1 to iLoop
+ oDocument.TypeKeys( OutputText )
+ wait( 200 )
+ next iRepeat
+ catch
+ warnlog( CFN & "Failed to send keystroke to given context" )
+ endcatch
end sub