1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: id_004.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:43:00 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* Owner : wolfram.garten@sun.com
36 '* short description :
38 '***********************************************************************************
40 ' #1 tiInsertDuplicateSlide
42 ' #1 tiInsertSpecialCharacter
43 ' #1 tiInsertHyperlink
45 ' #1 tiInsertObjectSound
46 ' #1 tiInsertObjectVideo
48 ' #1 tiInsertObjectOLEObjects
49 ' #1 tiInsertSpreadsheet
51 ' #1 tiInsertFloatingFrame
55 ' #1 tiInsertSnappointLine
57 '\**********************************************************************************
58 testcase tiInsertSlide
60 printlog "Dateiname.settext Convertpath (gTesttoolPath + global\input\graf_inp\stabler.tif) "
61 printlog "open application"
63 printlog "Insert->Slide"
66 hTypekeys "<Pagedown>"
67 WaitSlot (2000) 'sleep 2
68 printlog "close application"
71 endcase 'tiInsertSlide
72 '--------------------------------------------------------
73 testcase tiInsertDuplicateSlide
75 printlog "open application"
77 printlog "create rectangle"
78 Call hRechteckErstellen ( 30, 40, 40, 50 )
79 printlog "Insert->Duplicate Slide"
82 printlog "close application"
85 endcase 'tiInsertDuplicateSlide
86 '--------------------------------------------------------
87 testcase tiInsertField
89 printlog "open application"
92 printlog "Insert->Fields->Time (fixed)"
95 printlog "OK Time Fix"
96 printlog "delete it with EditSelectAll + <Delete> "
101 printlog "Insert->Fields->Date (fixed) "
104 printlog "OK Date Fix"
105 printlog "delete it with EditSelectAll + <Delete> "
110 printlog "Insert->Fields->Time (variable) "
111 InsertFieldsTimeVariable
113 printlog "OK Time Variabel"
114 printlog "delete it with EditSelectAll + <Delete> "
119 printlog "Insert->Fields->Date (variable) "
120 InsertFieldsDateVariable
122 printlog "OK Date Variabel"
123 printlog "delete it with EditSelectAll + <Delete> "
128 printlog "Insert->Fields->Author "
129 InsertFieldsAuthorDraw
132 printlog "delete it with EditSelectAll + <Delete> "
137 printlog "Insert->Fields->Page Numbers"
138 InsertFieldsPageNumberDraw
140 printlog "OK Page number"
141 printlog "delete it with EditSelectAll + <Delete> "
146 printlog "Insert->Fields->Filename "
148 WaitSlot (1000) 'sleep 1
149 printlog "OK File name"
150 printlog "delete it with EditSelectAll + <Delete> "
154 printlog "close application "
157 endcase 'tiInsertField
158 '--------------------------------------------------------
159 testcase tiInsertSpecialCharacter
161 printlog "open application "
164 printlog "insert text "
165 hTextrahmenErstellen ("This is a testtext",30,40,60,50)
167 printlog "Insert->SpecialCharacter "
168 InsertSpecialCharacterDraw
170 Kontext "Sonderzeichen"
171 Call DialogTest (Sonderzeichen)
172 printlog "cancel dialog 'Special Characters' "
175 printlog "close application "
178 endcase 'tiInsertSpecialCharacter
179 '--------------------------------------------------------
180 testcase tiInsertHyperlink
182 printlog "open application "
184 printlog "Insert->Hyperlink "
188 if Hyperlink.exists (5) then
189 Auswahl.MouseDown 50, 5
190 Auswahl.MouseUp 50, 5
191 Auswahl.typekeys "<PAGEDOWN><PAGEUP>"
192 Auswahl.typekeys "<TAB>"
194 Kontext "TabHyperlinkInternet"
196 printlog "Workaround to get rid of a Focusing-problem..."
197 NameText.Typekeys "alal <RETURN>"
198 NameText.Typekeys "<MOD1 A><DELETE>"
199 TabHyperlinkInternet.Typekeys "<TAB>", 6
200 TabHyperlinkInternet.Typekeys "<LEFT>", 3
201 printlog "End of workaround..."
204 ZielUrl.Settext "http://mahler"
209 warnlog "Failed to open hyperlink ??!!"
211 printlog "close application "
214 endcase 'tiInsertHyperlink
215 '--------------------------------------------------------
216 testcase tiInsertGraphic
218 printlog "open application "
220 printlog "Insert->Graphics "
221 InsertGraphicsFromFile
224 Kontext "GrafikEinfuegenDlg"
225 printlog "if checkbox 'link' is available, check it; if not available: ERROR "
229 Warnlog "Linking grafik doesn't work :-("
231 printlog "if checkbox 'Preview' is available, check it; if not available: ERROR "
232 if Preview.exists then
235 Warnlog "Preview of graphic doesn't work :-("
237 DialogTest (GrafikEinfuegenDlg)
238 printlog " use file: global\input\graf_inp\stabler.tif) "
239 Dateiname.settext Convertpath (gTesttoolPath + "global\input\graf_inp\stabler.tif")
240 printlog "click 'open' "
243 Warnlog "Insert graphic doesn't work :-("
246 printlog "close application "
249 endcase 'tiInsertGraphic
250 '--------------------------------------------------------
251 testcase tiInsertObjectSound
253 goto endsub ' disabled for final, because always wrong (TZ 01/2002)
255 printlog "open application "
258 printlog " Insert->Object->Sound "
262 'Call Dialogtest (OeffnenDlg) ' just be sure to check one pth and one open dialog : TZ 28.11.201
263 printlog "cancel file open dialog "
266 printlog "'Insert -> Object -> Sound' not available. TestDevelopmentInProgress (TDIP) ;-)"
268 printlog "close application "
271 endcase 'tiInsertObjectSound
272 '--------------------------------------------------------
273 testcase tiInsertObjectVideo
277 printlog " open application "
280 printlog "Insert->Object->Video "
283 'Call Dialogtest (OeffnenDlg)
285 printlog "cancel file open dialog "
288 printlog "'Insert -> Object -> Video' not available. (TDIP) ;-)"
290 printlog "close application "
293 endcase 'tiInsertObjectVideo
294 '--------------------------------------------------------
295 testcase tiInsertChart
297 printlog "open application "
299 printlog "Insert->Chart "
303 if Messagebox.Exists then
304 Warnlog Messagebox.GetText
310 printlog "close application "
313 endcase 'tiInsertChart
314 '--------------------------------------------------------
315 testcase tiInsertObjectOLEObjects
317 printlog "open application "
319 printlog "Insert->Object->OLEObjekts "
320 InsertObjectOLEObject
321 Kontext "OLEObjektEinfuegen"
322 'Call Dialogtest ( OLEObjektEinfuegen )
323 'NeuErstellen.Check ' is default value
324 Call DialogTest (OLEObjektEinfuegen, 1)
325 printlog "check 'Create from file' "
326 AusDateiErstellen.Check
327 Call DialogTest (OLEObjektEinfuegen, 2)
328 printlog "click 'Search...' "
331 printlog "cancel file open dialog "
333 Kontext "OLEObjektEinfuegen"
334 printlog "cancel dialog 'insert OLE Object' "
335 OLEObjektEinfuegen.Cancel
337 printlog "close application "
340 endcase 'tiInsertObjectOLEObjects
341 '--------------------------------------------------------
342 testcase tiInsertSpreadsheet
344 if gtSYSName = "Linux" then
345 printlog "Linux = wont test tiInsertSpreadsheet"
349 printlog "open application "
352 printlog "Insert->Spreadsheet "
353 InsertSpreadsheetDraw
356 if Messagebox.Exists (5) then
357 Warnlog Messagebox.GetText
361 printlog "click somewhere out of the object, to deselect it "
364 printlog "select and delete object with keys: <Tab><Delete> "
365 hTypekeys "<Tab><Delete>"
367 printlog "close application "
370 endcase 'tiInsertSpreadsheet
371 '--------------------------------------------------------
372 testcase tiInsertFormula
374 printlog "open application "
376 printlog "Insert->Object->Formula "
377 InsertObjectFormulaDraw
380 if Messagebox.Exists then
381 Warnlog Messagebox.GetText
385 printlog "click somewhere out of the object, to deselect it "
388 printlog "select and delete object with keys: <Tab><Delete> "
389 hTypekeys "<Tab><Delete>"
390 printlog "close application "
393 endcase 'tiInsertFormula
394 '--------------------------------------------------------
395 testcase tiInsertFloatingFrame
397 printlog "open application "
399 printlog "Insert->Floating Frame "
402 Kontext "TabEigenschaften"
403 Dialogtest (TabEigenschaften)
404 printlog "click '...' "
408 printlog "cancel file open dialog "
410 Kontext "TabEigenschaften"
411 printlog "cancel dialog 'Floating Frame Properties' "
412 TabEigenschaften.Cancel
413 printlog "close application "
416 endcase 'tiInsertFloatingFrame
417 '--------------------------------------------------------
418 testcase tiInsertFile
420 printlog "open application "
423 printlog "Insert->File "
427 'Call Dialogtest ( OeffnenDLG )
428 printlog "cancel file open dialog "
430 printlog "close application "
433 endcase 'tiInsertFile
434 '--------------------------------------------------------
435 testcase tiInsertPlugin
437 printlog "open application "
439 printlog "Insert->Object->PlugIn "
441 Kontext "PluginEinfuegen"
442 if PluginEinfuegen.exists (5) then
443 call Dialogtest (PluginEinfuegen)
444 printlog "click 'browse' "
448 if Messagebox.Exists (5) Then
449 Warnlog Messagebox.GetText
452 printlog "No Messagebox :-)"
455 if OeffnenDlG.exists (5) then
457 printlog "cancel file open dialog "
460 Kontext "PluginEinfuegen"
461 printlog "cancel dialog 'Insert Plug-in' "
462 if PluginEinfuegen.exists (5) then PluginEinfuegen.Cancel
464 warnlog "Insert Plugin does not work :-("
466 printlog "close application "
469 endcase 'tiInsertPlugin
470 '--------------------------------------------------------
471 testcase tiInsertScan
474 printlog "DISABLED because not able to make automatic :-( "
475 printlog "open application "
477 printlog "Insert->Scan->Request "
478 InsertScanRequest ' as long as there is no scanner available, nothing happens
480 printlog " Insert->Scan->SelectSource "
481 InsertScanSelectSource
483 printlog "Not testable, not translatable, just callable, because of systemdialog :-("
484 printlog "close application "
487 endcase 'tiInsertScan
488 '--------------------------------------------------------
489 testcase tiInsertSnappointLine
491 printlog "open application "
493 printlog "DRAW : Insert->Snap Point/Line "
494 printlog "+ IMPRESS: available via Kontext menu: Insert->Snap Point/Line "
496 Kontext "NeuesFangobjekt"
497 DialogTest ( NeuesFangobjekt )
498 printlog "Cancel dialog 'New Snap Object' "
499 NeuesFangobjekt.Cancel
501 printlog "close application "
504 endcase 'tiInsertSnappointLine
505 '--------------------------------------------------------
506 testcase tdInsertLayer
508 printlog "open application "
511 printlog "View->Layer "
513 printlog "Insert->Layer "
515 Kontext "EbeneEinfuegenDlg"
516 DialogTest ( EbeneEinfuegenDlg )
517 printlog "cancel dialog 'Insert Layer' "
518 EbeneEinfuegenDlg.Cancel
519 printlog "close application "
522 endcase 'tdInsertLayer