summaryrefslogtreecommitdiff
path: root/testautomation/graphics/optional/includes/global/g_ole.inc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-07-28 11:26:33 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-07-28 11:26:33 +0000
commitff7d04cc94211426caad7fb61b56b5a6820e2166 (patch)
tree6178580ab9daea4aa347fee2888e87db92263853 /testautomation/graphics/optional/includes/global/g_ole.inc
parent59cf811a68b8788d8d78dd525fbe622588a21372 (diff)
CWS-TOOLING: integrate CWS automationdev300m53cat0
2009-07-27 13:27:22 +0200 wg r274360 : i103764 2009-07-27 13:24:16 +0200 wg r274359 : i103764 2009-07-27 13:15:37 +0200 wg r274358 : i103764 2009-07-27 13:11:56 +0200 wg r274357 : i103764 2009-07-27 13:08:44 +0200 wg r274356 : i103764 2009-07-27 12:47:24 +0200 wg r274355 : i103764 2009-07-27 11:57:21 +0200 wg r274354 : i103764 2009-07-27 11:50:44 +0200 wg r274353 : i103764 2009-07-27 11:06:37 +0200 wg r274349 : i103764 2009-07-27 10:46:33 +0200 wg r274347 : i103764 2009-07-27 10:42:23 +0200 wg r274346 : i103764 2009-07-27 09:52:19 +0200 wg r274345 : i103764 2009-07-24 15:12:43 +0200 wg r274309 : i103764 2009-07-24 13:16:21 +0200 wg r274302 : i103764 2009-07-24 12:57:40 +0200 wg r274300 : i103764 2009-07-24 12:35:50 +0200 wg r274299 : i103764 2009-07-24 11:46:47 +0200 wg r274296 : i103764 2009-07-24 11:40:14 +0200 wg r274295 : i103764 2009-07-24 10:39:50 +0200 wg r274294 : i103764 2009-07-24 10:30:58 +0200 wg r274293 : i103764 2009-07-24 10:23:04 +0200 wg r274292 : i103764 2009-07-24 10:00:47 +0200 wg r274291 : i103764 2009-07-24 09:51:05 +0200 wg r274290 : i103764 2009-07-24 09:32:14 +0200 wg r274288 : i103764 2009-07-24 09:21:56 +0200 wg r274287 : i103764 2009-07-23 15:22:24 +0200 oc r274274 : #i103693# Move BubbleChartData.ods to correct path 2009-07-23 14:03:14 +0200 msc r274271 : #100000 2009-07-23 13:45:36 +0200 oc r274269 : #i103439# Changed Menu function with hMenu function
Diffstat (limited to 'testautomation/graphics/optional/includes/global/g_ole.inc')
-rwxr-xr-xtestautomation/graphics/optional/includes/global/g_ole.inc161
1 files changed, 99 insertions, 62 deletions
diff --git a/testautomation/graphics/optional/includes/global/g_ole.inc b/testautomation/graphics/optional/includes/global/g_ole.inc
index 71780c68c83b..407fd0d368ca 100755
--- a/testautomation/graphics/optional/includes/global/g_ole.inc
+++ b/testautomation/graphics/optional/includes/global/g_ole.inc
@@ -44,24 +44,28 @@
testcase tOLE_Copy
qaerrorlog "not running due to reconstruction"
goto endsub
-
+ printlog "Test to see if three different OLEs can be copied and identified correctly."
+
dim writerfilename1 as string
writerfilename1 = ConvertPath (gTesttoolPath + "graphics\required\input\oletest.odg")
-
+
+ printlog "Open draw-file" & writerfilename1
FileOpen
Kontext "OeffnenDlg"
sleep 1
Dateiname.SetText (writerfilename1)
Oeffnen.Click
Sleep 3
-
+
+ printlog "When messagebox about Update all links shows up - press yes."
kontext "Messagebox"
if Messagebox.exists then
- Messagebox.Yes
+ Messagebox.Yes
endif
-
+
sleep 3
gApplication = "DRAW"
+ printlog "Select first object. Use EditCopy to copy it to the clipboard"
sleep 1
kontext "DocumentDraw"
DocumentDraw.mousedown (10,10)
@@ -69,49 +73,57 @@ testcase tOLE_Copy
sleep 1
DocumentDraw.Typekeys "<TAB>"
EditCopy
-
+
+ printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
Call hCloseDocument
gApplication = "IMPRESS"
Call hNewDocument
EditPaste
-
+
+ printlog "Select object and check via the Context-menu what it has been opened as."
sleep 1
Kontext "DocumentImpress"
hTypekeys "<MOD1> A"
hTypekeys "<RETURN>"
hOpenContextMenu
-
+
+ printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if
+ printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3
MenuSelect (1) 'Default
-
+
Kontext "RechenleisteCalc"
if RechenleisteCalc.Exists then
Printlog "This is a spreadsheet-Document. Good"
endif
-
+
Kontext "DocumentImpress"
+ printlog "Click outside the OLE to deactivate it. Then close the Document "
DocumentImpress.mousedown (10,10)
DocumentImpress.mouseup (10,10)
sleep 3
Call hCloseDocument
-
+
+ printlog "Open Draw-file "
FileOpen
Kontext "OeffnenDlg"
sleep 1
Dateiname.SetText (writerfilename1)
Oeffnen.Click
Sleep 3
-
+
+ printlog " When messagebox about Update all links shows up - press yes."
kontext "Messagebox"
if Messagebox.exists then
Messagebox.Yes
endif
sleep 3
-
+
+ printlog "Select second object. Use EditCopy to copy it to the clipboard."
gApplication = "DRAW"
sleep 1
kontext "DocumentDraw"
@@ -120,43 +132,49 @@ testcase tOLE_Copy
sleep 1
DocumentDraw.Typekeys "<TAB><TAB>"
EditCopy
-
+
+ printlog "Close document. Open new Impress-Document. Paste the OLE-Object."
sleep 1
DocumentDraw.mousedown (10,10)
DocumentDraw.mouseup (10,10)
sleep 1
Call hCloseDocument
-
+
gApplication = "IMPRESS"
Call hNewDocument
EditPaste
-
+
+ printlog "Select the object, and check via the Context-menu what it has been opened as."
sleep 1
Kontext "DocumentImpress"
hTypekeys "<MOD1> A"
hTypekeys "<RETURN>"
hOpenContextMenu
+ printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if
-
+
+ printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3
MenuSelect (1) 'Default
-
+
Kontext "RechenleisteCalc"
if RechenleisteCalc.Exists then
Printlog "This is a spreadsheet-Document. Good"
endif
-
+
kontext "DocumentImpress"
sleep 1
DocumentImpress.mousedown (10,10)
DocumentImpress.mouseup (10,10)
sleep 1
-
+
+ printlog "Close document"
Call hCloseDocument
-
+
+ printlog "Open draw-file"
FileOpen
Kontext "OeffnenDlg"
sleep 1
@@ -164,11 +182,13 @@ testcase tOLE_Copy
Oeffnen.Click
Sleep 3
kontext "Messagebox"
+ printlog "When messagebox about Update all links shows up - press yes."
if Messagebox.exists then
Messagebox.Yes
endif
sleep 3
-
+
+ printlog "Select third object. Use EditCopy to copy it to the clipboard."
gApplication = "DRAW"
sleep 1
kontext "DocumentDraw"
@@ -177,7 +197,8 @@ testcase tOLE_Copy
sleep 1
DocumentDraw.Typekeys "<TAB><TAB><TAB>"
EditCopy
-
+
+ printlog "Close the Document. Open new Impress-Document. Paste the OLE-Object."
sleep 1
DocumentDraw.mousedown (10,10)
DocumentDraw.mouseup (10,10)
@@ -187,37 +208,40 @@ testcase tOLE_Copy
gApplication = "IMPRESS"
Call hNewDocument
EditPaste
-
+
+ printlog "Select the object, and check via the Context-menu what it has been opened as."
Kontext "DocumentImpress"
hTypekeys "<MOD1> A"
hTypekeys "<RETURN>"
hOpenContextMenu
-
+
+ printlog "Count the number of entries. If 5 (including a menuseparator), then its a spreadsheet"
if MenuGetItemCount <> 5 then
Warnlog "This doesn't seem to be recognized as a Metafile. It has " + MenuGetItemCount + " entries."
end if
-
+
+ printlog "Close Context menu. Then check if a Edit-line for the Cells is visible."
sleep 3
MenuSelect (1) 'Default
-
+
Kontext "RechenleisteCalc"
if RechenleisteCalc.Exists then
Printlog "This is a spreadsheet-Document. Good"
endif
-
+
+ printlog "Close Context menu. Then close the Document"
Call hCloseDocument
+
endcase 'tOLE_Copy
-
'-----------------------------------------------------------------------------------------------------------'
-
testcase tOLE_SaveLoad
printlog "Test to see if an OLE can be inserted, saved and loaded correctly."
dim filename as string
dim filetype as string
dim filetype2 as string
-
- if (gApplication = "IMPRESS") then
+
+ if (gApplication = "IMPRESS") then
ExtensionString = "odp"
else
ExtensionString = "odg"
@@ -229,13 +253,13 @@ testcase tOLE_SaveLoad
printlog "Insert->Object->OLE Object..."
InsertObjectOLEObject
Kontext "OLEObjektInsert"
-
+
printlog "Choose create new. Select Writer."
Objekttyp.Select 5
-
+
printlog "Click OK to close dialog and insert OLE."
OLEObjektInsert.OK
-
+
printlog "Deselect object."
sleep 1
kontext "DocumentImpress"
@@ -260,7 +284,7 @@ testcase tOLE_SaveLoad
Dateiname.Settext (filename)
printlog "Saving as: " & filename
Speichern.Click
-
+
printlog "If the file already exists - press yes to overwrite it."
Sleep 3
kontext "Messagebox"
@@ -268,7 +292,7 @@ testcase tOLE_SaveLoad
Messagebox.Yes
endif
Sleep 3
-
+
printlog "Getting type of OLE from save as dialog."
hOpenContextMenu
hMenuSelectNr(-1)
@@ -286,7 +310,7 @@ testcase tOLE_SaveLoad
Call hFileOpen (filename)
sleep 1
hTypekeys "<MOD1 A>"
- hOpenContextMenu
+ hOpenContextMenu
hMenuSelectNr(-1)
Kontext "SpeichernDlg"
filetype2 = Dateityp.GetSelText
@@ -303,25 +327,31 @@ testcase tOLE_SaveLoad
'FHA TODO
'testcase tOLE_DragDrop
+ printlog " Create OLE, drag n drop within the document. "
+ printlog " If Impress, drag and drop from document to another slide. "
'endcase 'tOLE_DragDrop
endcase ' tOLE_Save
-
'-------------------------------------------------------------------------------
testcase tiOpenOLECrash
dim sFileodp as string
dim oFile as string
dim i as integer
-
+ printlog "Testing for bug nr: i70019"
+
+ printlog "Open Application"
Call hNewDocument
sleep 1
+ printlog "1. Open file: generic_de.ppt"
FileOpen
sleep 1
Kontext "OeffnenDlg"
+ printlog " Use file: graphics\\optional\\input\\generic_de.ppt "
oFile = ConvertPath (gTesttoolPath + "graphics\required\input\generic_de.ppt")
Printlog "file: '" + oFile + "'"
Dateiname.SetText (oFile)
+ printlog "2. Save this document as an *.odp -file."
Oeffnen.Click
kontext "DocumentImpress"
i = 0
@@ -336,7 +366,7 @@ testcase tiOpenOLECrash
if DocumentImpress.StatusIsProgress AND i > 19 then
warnlog " Took over 20 seconds to load the document Document. Stalled?"
endif
-
+
FileSaveAs
Kontext "SpeichernDlg"
sFileodp = (ConvertPath(gOfficePath + "user\work\generic_de"))
@@ -347,16 +377,18 @@ testcase tiOpenOLECrash
if Messagebox.Exists(2) then
Messagebox.Yes
Kontext "AlienWarning"
- if AlienWarning.Exists(2) then
- Warnlog "Should not be any alienwarning when saving in our own format!"
- AlienWarning.OK
- end if
- printlog "Saved as: " + sFileodp
+ if AlienWarning.Exists(2) then
+ Warnlog "Should not be any alienwarning when saving in our own format!"
+ AlienWarning.OK
+ end if
+ printlog "Saved as: " + sFileodp
end if
Sleep 3
kontext "DocumentImpress"
+ printlog "3. Close Impress."
Call hCloseDocument
-
+
+ printlog "4.Reopen the *.odp file again"
FileOpen
Kontext "OeffnenDlg"
Dateiname.SetText (sFileodp + ".odp")
@@ -367,7 +399,7 @@ testcase tiOpenOLECrash
Active.ok
Warnlog "failed to open file? :-("
end if
-
+
i = 0
do while (i < 20)
try
@@ -378,40 +410,45 @@ testcase tiOpenOLECrash
endcatch
loop
if DocumentImpress.StatusIsProgress AND i > 19 then
- warnlog " Took over 20 seconds to load the document Document. Stalled?"
+ warnlog "Took over 20 seconds to load the document Document. Stalled?"
endif
-
+
+ printlog "5. Right-click on the second slide and click on New slide. "
Kontext "Slides"
SlidesControl.TypeKeys "<PAGEDOWN>" 'Goto second slide. (and get the focus right)
SlidesControl.TypeKeys "<SHIFT F10>" 'OpenContextMenu (True) 'Open Context-menu
hMenuSelectNr (1) 'New Slide
+ printlog "6. Change the title-(the text was F�r den TCM-Test, but this should irrelevant... ;) )."
hTypeKeys "<TAB>" 'To select the title.
- hTypeKeys "F�r den TCM-Test" 'To enter text
+ hTypeKeys "Fuer den TCM-Test" 'To enter text
+ printlog " 7. Clicked two times on the Click twice to insert object "
hTypeKeys "<ESCAPE>"
gMouseClick 1,1
hTypeKeys "<TAB><TAB>" '(to select the second object)
hTypeKeys "<RETURN>"
sleep (2)
-
+
+ printlog "8. Choose OpenOffice.org 2.0 Formular"
Kontext "OLEObjektInsert"
- Objekttyp.Select (4)
+ Objekttyp.Select (3)
sleep (2)
- PrintLog " Objeckt: " + Objekttyp.GetSelText + " will be inserted."
+ PrintLog " Object: " + Objekttyp.GetSelText + " will be inserted."
+ printlog "Leave dialog 'Insert OLE Object' with OK"
OLEObjektInsert.OK
sleep (2)
-
+
kontext "CommandsMath"
Commands.TypeKeys "A over B + FACT 6 = x"
-
+
+ 'printlog " Leave edit mode by typing key [Escape] "
'Comment: If I do this, the bug wont occur...
'hTypeKeys "<ESCAPE>"
-
+
+ printlog "10. Click on the Save button."
kontext "Standardbar"
Speichern.Click
-
+
+ printlog "11. Click on the X to close the window while the OLE-object still in Edit-mode."
Call hCloseDocument
-endcase
-
-'-----------------oooo-----------------oooo-----------------oooo-----------------
-
+endcase 'tiOpenOLECrash