1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org. If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/************************************************************************
'*
'* owner : marc.neumann@sun.com
'*
'* short description : Property Browser
'*
'\***********************************************************************
sub ctrl_PropertyBrowser
call tPushButton
call tTextBox
call tListBox
call tComboBox
call tImageButton
call tImageControl
call tForms
end sub
'--------------------------------------------------------------------------------------
testcase tPushButton
call sCloseAllToolbars
'/// Open a new document
printlog "Open a new document"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
PushButton.Click
sleep(1)
'/// insert a Push Button
printlog "insert a Push Button"
call hDrawingWithSelection ( 50, 20, 60, 30 )
sleep(2)
Kontext "FormControls"
ControlProperties.Click
sleep(2)
'/// change Buttontype to URL
printlog "change Buttontype to URL"
Kontext "TabGeneralControl"
fsetControlProperty("PushButton","ButtonType", "4")
'/// check if the URLField property is enabled
printlog "check if the URLField property is enabled"
if NOT URL.isEnabled then
warnlog "The URL fields doesn't gets enabled"
end if
'/// add url to URLField
printlog "add url to URLField"
fsetControlProperty("PushButton","URL", "http://www.sun.com")
Kontext "TabGeneralControl"
TabGeneralControl.typekeys("<RETURN>",true)
'/// check if the Frame property is enabled
printlog "check if the Frame property is enabled"
if NOT Frame.isEnabled then
warnlog "The Frame fields doesn't gets enabled"
end if
sleep(1)
'/// add graphicfile to URLField
printlog "add graphicfile to URLField"
fsetControlProperty("PushButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
'/// check if the GraphicsAlignment property is enabled
printlog "check if the GraphicsAlignment property is enabled"
if NOT GraphicsAlignment.isEnabled then
warnlog "The GraphicsAlignment doesn't gets enabled"
end if
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
sleep(1)
hCloseDocument
endcase
'--------------------------------------------------------------------------------------
testcase tTextBox
call sCloseAllToolbars
'/// Open a new document,
printlog "Open a new document,"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
Edit.Click
sleep(1)
'/// insert a text box
printlog "insert a text box"
call hDrawingWithSelection ( 50, 20, 60, 30
sleep(2)
Kontext "FormControls"
ControlProperties.Click
sleep(2)
'/// change the propety multiline to yes
printlog "change the propety multiline to yes"
fsetControlProperty("TextBox","TextType","2")
'/// check if the scrollbars property is enabled
printlog "check if the scrollbars property is enabled"
if NOT Scrollbars.isEnabled then
warnlog "The scrollbars doesn't gets enabled"
end if
'/// check if the password char is enabled
printlog "check if the password char is enabled"
if Password.isEnabled then
warnlog "The pasword is enabled ( issue 29477 ) "
end if
'/// change the propety multiline to no
printlog "change the propety multiline to no"
fsetControlProperty("TextBox","TextType","1")
'/// check if the scrollbars property is disabled
printlog "check if the scrollbars property is disabled"
if Scrollbars.isEnabled then
warnlog "The scrollbars is enabled"
end if
'/// check if the password char is disabled
printlog "check if the password char is disabled"
if NOT Password.isEnabled then
warnlog "The pasword doesn't gets enabled"
end if
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
'/// close the document
printlog "close the document"
sleep(1)
hCloseDocument
endcase
'--------------------------------------------------------------------------------------
testcase tListBox
call sCloseAllToolbars
'/// Open a new document,
printlog "Open a new document,"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
ListBox.Click
sleep(1)
UseWizards.Click
sleep(1)
'/// insert a list box
printlog "insert a list box"
call hDrawingWithSelection ( 50, 20, 60, 30
sleep(2)
Kontext "FormControls"
ControlProperties.Click
sleep(2)
'/// change the property DropDown to yes
printlog "change the propety multiline to yes"
fsetControlProperty("ListBox","DropDown","2")
'/// check if the scrollbars property is enabled
printlog "check if the LineCount property is enabled"
if NOT LineCount.isEnabled then
warnlog "The LineCount doesn't gets enabled"
end if
'/// change the propety multiline to no
printlog "change the propety multiline to no"
fsetControlProperty("ListBox","DropDown","1")
'/// check if the scrollbars property is disabled
printlog "check if the LineCount property is disabled"
if LineCount.isEnabled then
warnlog "The LineCount is enabled"
end if
Kontext "FormControls"
UseWizards.Click
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
'/// close the document
printlog "close the document"
sleep(1)
hCloseDocument
endcase
'--------------------------------------------------------------------------------------
testcase tComboBox
call sCloseAllToolbars
'/// Open a new document,
printlog "Open a new document,"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
ComboBox.Click
sleep(1)
UseWizards.Click
sleep(1)
'/// insert a list box
printlog "insert a list box"
call hDrawingWithSelection ( 50, 20, 60, 30
sleep(2)
Kontext "FormControls"
ControlProperties.Click
sleep(2)
'/// change the property DropDown to yes
printlog "change the propety multiline to yes"
fsetControlProperty("ComboBox","DropDown","2")
'/// check if the scrollbars property is enabled
printlog "check if the LineCount property is enabled"
if NOT LineCount.isEnabled then
warnlog "The LineCount doesn't gets enabled"
end if
'/// change the propety multiline to no
printlog "change the propety multiline to no"
fsetControlProperty("ComboBox","DropDown","1")
'/// check if the scrollbars property is disabled
printlog "check if the LineCount property is disabled"
if LineCount.isEnabled then
warnlog "The LineCount is enabled"
end if
Kontext "FormControls"
UseWizards.Click
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
'/// close the document
printlog "close the document"
sleep(1)
hCloseDocument
endcase
'--------------------------------------------------------------------------------------
testcase tImageButton
call sCloseAllToolbars
'/// Open a new document,
printlog "Open a new document,"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("MoreControls",true)
Kontext "MoreControls"
Imagebutton.Click
sleep(1)
'/// insert an image control
printlog "insert an image control"
call hDrawingWithSelection ( 50, 20, 60, 30
sleep(2)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
ControlProperties.Click
sleep(2)
'/// change the property ButtonType to URL
fsetControlProperty("ImagesButton","ButtonType", "4")
'/// check if the URL property is enabled
if NOT URL.isEnabled then
warnlog "The URL fields doesn't gets enabled"
end if
'/// add url to URLField
printlog "add url to URLField"
'ISSUE: see i29478
'fsetControlProperty("ImagesButton","URL", "www.sun.com")
fsetControlProperty("ImagesButton","URL", "http://www.sun.com")
Kontext "TabGeneralControl"
TabGeneralControl.typekeys("<RETURN>",true)
'/// check if the Frame property is enabled
printlog "check if the Frame property is enabled"
if NOT Frame.isEnabled then
warnlog "The Frame fields doesn't gets enabled"
end if
sleep(1)
'/// add graphicfile to GraphicField
fsetControlProperty("ImagesButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
'/// check if the GraphicsAlignment property is enabled
printlog "check if the Scale property is enabled"
if NOT Scale.isEnabled then
warnlog "The Scale doesn't gets enabled"
end if
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
sleep(1)
hCloseDocument
endcase
'--------------------------------------------------------------------------------------
testcase tImageControl
call sCloseAllToolbars
'/// Open a new document,
printlog "Open a new document,"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("MoreControls",true)
Kontext "MoreControls"
ImageControl.Click
sleep(1)
'/// insert an image control
printlog "insert an image control"
call hDrawingWithSelection ( 50, 20, 60, 30
sleep(2)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
ControlProperties.Click
sleep(2)
'/// add graphicfile to GraphicField
printlog "add graphicfile to GraphicField"
fsetControlProperty("ImagesButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif"))
'/// check if the Scale property is enabled
printlog "check if the Scale property is enabled"
if NOT Scale.isEnabled then
warnlog "The Scale doesn't gets enabled"
end if
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
sleep(1)
hCloseDocument
endcase
'--------------------------------------------------------------------------------------
testcase tForms
call sCloseAllToolbars
'/// Open a new document,
printlog "Open a new document,"
call hNewDocument
Kontext "DocumentWriter"
DocumentWriter.TypeKeys "tt_doc" , true
sleep(1)
call hToolbarSelect("FormControls",true)
Kontext "FormControls"
PushButton.Click
sleep(1)
'/// insert a Push Button
printlog "insert a Push Button"
call hDrawingWithSelection ( 50, 20, 60, 30
sleep(2)
Kontext "FormControls"
FormProperties.Click
sleep(2)
Kontext "FormPropertiesDialog"
FormPropertiesTabControl.setPage TabGeneralForm
Kontext "TabGeneralForm"
'/// set encoding to Multipart
printlog "set encoding to Multipart"
Encoding.select 2
sleep(1)
'/// check if the SubmitMethod get enabled
printlog "check if the SubmitMethod get enabled"
if SubmitMethod.isEnabled then
warnlog "The SubmitMethod fields doesn't gets enabled"
end if
'/// set encoding to URL
printlog "set encoding to URL"
Encoding.select 1
sleep(1)
'/// check if the SubmitMethod get disabled
printlog "check if the SubmitMethod get disabled"
if NOT SubmitMethod.isEnabled then
warnlog "The SubmitMethod fields doesn't gets disabled"
end if
'/// set URL
printlog "set URL"
'ISSUE: see i29478
'URL.setText("www.sun.com")
URL.setText("http://www.sun.com")
TabGeneralForm.TypeKeys("<RETURN>")
'/// check if the frame property gets enabled
printlog "check if the frame property gets enabled"
if NOT Frame.isEnabled then
warnlog "The frame fields doesn't gets enabled"
end if
Kontext "FormPropertiesDialog"
FormPropertiesTabControl.setPage TabDataForm
Kontext "TabDataForm"
'/// select first datasource
printlog "select first datasource"
DataSource.select 1
sleep(2)
'/// select SQL Command as Type
printlog "select SQL Command as Type"
ContentType.select 3
sleep(2)
'/// check if the SQL Design button gets enabled
printlog "check if the SQL Design button gets enabled"
if OpenQueryDesign.isenabled then
'/// open the query design with the button
printlog "open the query design with the button"
OpenQueryDesign.click
sleep(5)
'/// check if the querydesign open
printlog "check if the querydesign open"
Kontext "QueryDesignTable"
if NOT QueryDesignTable.exists(3) then
warnlog "The Query Design doesn't open."
end if
Kontext "AddTables"
AddTables.Close
Kontext "QueryDesignTable"
QueryDesignTable.UseMenu
hMenuSelectNr(1)
hMenuSelectNr(4)
else
warnlog "the openQueryDesign button is not enabled"
end if
Kontext "TabDataForm"
printlog "select table as Type"
ContentType.select 1
sleep(1)
Content.setText("biblio")
sleep(1)
TabDataForm.TypeKeys "<RETURN>" , true
'/// close the FormProperty Browser
printlog "close the FormProperty Browser"
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
'/// open the form property browser
printlog "open the form property browser"
Kontext "FormControls"
FormProperties.Click
sleep(2)
Kontext "FormPropertiesDialog"
FormPropertiesTabControl.setPage TabDataForm
'/// click on the filter button
Kontext "TabDataForm"
FilterDLGButton.Click
'/// check if the filter dialog appear
Kontext "FilterDialog"
FilterDialog.OK
'/// click on the sort button
Kontext "TabDataForm"
SortDLGButton.click
'/// check if the sort dialog appear
Kontext "SortOrder"
SortOrder.OK
'/// close the controlproperty browser
Kontext "ControlPropertiesDialog"
ControlPropertiesDialog.close
sleep(1)
hCloseDocument
endcase
|