From 621c70d97299293fedf80984c747f039ee01c7da Mon Sep 17 00:00:00 2001 From: "Wolfram Garten [wg]" Date: Wed, 20 Oct 2010 13:02:08 +0200 Subject: i115106,[Automation]: [Automation] General Cat 1-3 test case fixing --- .../optional/includes/global/g_clipboard.inc | 52 +++++++++++++++------- 1 file changed, 36 insertions(+), 16 deletions(-) (limited to 'testautomation/graphics/optional/includes') diff --git a/testautomation/graphics/optional/includes/global/g_clipboard.inc b/testautomation/graphics/optional/includes/global/g_clipboard.inc index 9d4629f3d262..e2ee473df88f 100644 --- a/testautomation/graphics/optional/includes/global/g_clipboard.inc +++ b/testautomation/graphics/optional/includes/global/g_clipboard.inc @@ -42,8 +42,9 @@ testcase tiEditUndo - Dim sDatei as string Dim Ueber_Text_1 as string + dim sTestfile as string + dim sLocaltestfile as string if ( gApplication = "IMPRESS" ) then ExtensionString = "odp" @@ -51,69 +52,88 @@ testcase tiEditUndo ExtensionString = "odg" end if - sDatei = gTesttoolPath + "graphics\required\input\leer."+ExtensionString - - hFileOpenLocally( sDatei ) - + sTestfile = gTesttoolPath + "graphics\required\input\leer."+ExtensionString + printlog "Loading test file.." + hFileOpenLocally( sTestfile ) + sleep 3 + printlog "Selecting grey rectangle.." hTypeKeys "" 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 "" 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 "" 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 -- cgit