diff options
Diffstat (limited to 'testautomation/graphics/optional/includes/global/g_clipboard.inc')
-rw-r--r-- | testautomation/graphics/optional/includes/global/g_clipboard.inc | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/testautomation/graphics/optional/includes/global/g_clipboard.inc b/testautomation/graphics/optional/includes/global/g_clipboard.inc index 4c1900876565..e2ee473df88f 100644 --- a/testautomation/graphics/optional/includes/global/g_clipboard.inc +++ b/testautomation/graphics/optional/includes/global/g_clipboard.inc @@ -42,81 +42,98 @@ testcase tiEditUndo - Dim sDatei as string Dim Ueber_Text_1 as string + dim sTestfile as string + dim sLocaltestfile as string - if (gApplication = "IMPRESS") then + if ( gApplication = "IMPRESS" ) then ExtensionString = "odp" else ExtensionString = "odg" end if - sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString - - hFileOpen ConvertPath (sDatei) - sleep 5 - printlog "Checking for readonly state. If so, make it editable." - sMakeReadOnlyDocumentEditable - + sTestfile = gTesttoolPath + "graphics\required\input\leer."+ExtensionString + printlog "Loading test file.." + hFileOpenLocally( sTestfile ) + sleep 3 + printlog "Selecting grey rectangle.." hTypeKeys "<TAB><TAB>" sleep 3 + printlog "Opening Position and size dialog." ContextPositionAndSize Kontext if Messagebox.exists (5) then - Messagebox.SetPage TabPositionAndSize + Messagebox.SetPage TabPositionAndSize else - print "what" + printlog "Not the expected Dialog came up. Please check." endif Kontext "TabPositionAndSize" - Ueber_Text_1=PositionX.GetText '/// defining variable for original position of object ///' + printlog "defining variable for original position of object" + Ueber_Text_1=PositionX.GetText + printlog "Canceling dialog." TabPositionAndSize.Cancel sleep 2 Kontext "Toolbar" Auswahl.Click sleep 1 - ContextArrangeBringBackward '/// Bring Object backward ///' + printlog "Sending Rectangle backwards." + ContextArrangeBringBackward sleep 1 + printlog "Deselect." gMouseClick 60,60 sleep 1 Kontext "Toolbar" Auswahl.Click sleep 1 + printlog "trying to select blue rectangle in front" hTypeKeys "<TAB><TAB>" Kontext "Toolbar" Auswahl.Click sleep 1 - ContextPositionAndSize '/// Open Position and Size dialog, checking position ///' + printlog "Open Position and Size dialog, checking position" + ContextPositionAndSize Kontext Messagebox.SetPage TabPositionAndSize Kontext "TabPositionAndSize" - if PositionX=0 Then Warnlog " Command was not completely executed, and it could not be undone." + if PositionX=0 Then Warnlog "Command was not completely executed, and it could not be undone." TabPositionAndSize.Cancel sleep 2 gMouseClick 60,60 sleep 1 - - EditUndo '/// Edit Undo for BringBackward ///' + printlog "Edit Undo for BringBackward" + EditUndo Sleep 2 gMouseClick 60,60 sleep 1 Kontext "Toolbar" Auswahl.Click + printlog "Trying to select grey rectangle again." hTypeKeys "<TAB><TAB>" sleep 1 Kontext "Toolbar" Auswahl.Click - ContextPositionAndSize '/// Again checking position using Position and Size dialog ///' + printlog "Again checking position using Position and Size dialog" + ContextPositionAndSize kontext Messagebox.SetPage TabPositionAndSize kontext "TabPositionAndSize" + printlog "Checking if x Position is like ata the start again." if PositionX.GetText = Ueber_Text_1 then printlog "OK, last order could be redone" else warnlog "Last order could not be redone" end if TabPositionAndSize.Cancel - - Call hCloseDocument '/// Close document ///' + printlog "Close document" + sLocaltestfile = hFileGetLocalPath( gTesttoolPath + "leer."+ExtensionString ) + printlog sLocaltestfile + if (FileExists (sLocaltestfile)) then + app.kill (sLocaltestfile) + printlog "Deleting used file." + else + warnlog "File is missing." + endif + Call hCloseDocument endcase |