Skip to main content
summaryrefslogtreecommitdiffstats
blob: c0d6b5c7ff8e73d219904560da43fee32ed0d815 (plain) (blame)
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
<!-- 
  Copyright (c) 2014 BREDEX GmbH.
  All rights reserved. This program and the accompanying materials
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
  http://www.eclipse.org/legal/epl-v10.html
-->

<section xml:id="actionsThatSendKeyboardInteractionGeneral" version="5.0" xmlns="http://docbook.org/ns/docbook"
                                                                      xmlns:xi="http://www.w3.org/2001/XInclude"
                                                                      xmlns:xl="http://www.w3.org/1999/xlink" >
  <title>Enter Text (General Components)</title>
  
  <para><emphasis>Input Text on Text Component</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to enter text into a component.
        </para>
      </listitem>
      <listitem>
        <para>
          The text you want to enter is given as a parameter.
        </para>
      </listitem>
      <listitem>
        <para>
          This is realized by:
          
          <itemizedlist>
            <listitem>
              <para>
                Clicking once on the component if it is not already ready to support keyboard input.
              </para>
            </listitem>
            <listitem>
              <para>
                Entering the text at the current cursor position.
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
      <listitem>
        <para>
          To delete any text already in the component, use the action"<emphasis>replace text</emphasis>".
        </para>
      </listitem>
      <listitem>
        <para>
          To enter text before/after previous text, see "<emphasis>Insert Text Before/After Pattern</emphasis>" in the "<emphasis>Text Field</emphasis>" component.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="text" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para role="tip">
    This action is unsupported for combo-boxes in the HTML toolkit
  </para>
  
  <para><emphasis>Input Text where focus is (on Application component)</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to enter text into the component which currently has focus.
        </para>
      </listitem>
      <listitem>
        <para>
          The text you want to enter is given as a parameter.
        </para>
      </listitem>
      <listitem>
        <para>
          The difference between this action and the "<emphasis>External Input Text</emphasis>" is that the arrival of the keystrokes at the component are checked here.
        </para>
      </listitem>
      <listitem>
        <para>
          Use this action for supported components, and the "<emphasis>External Input Text</emphasis>" action for components in external dialogs, such as file choosers.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="text" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para role="tip">
    In HTML AUT's , this action can only be used with alphanumeric characters. Also, if the focus is not currently on the browser, then this action will not be successful.
  </para>
  
  <para><emphasis>Replace Text</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to replace any text already in the text field.
        </para>
      </listitem>
      <listitem>
        <para>
          The text you want to enter is given as a parameter.
        </para>
      </listitem>
      <listitem>
        <para>
          This is realized by:
          
          <itemizedlist>
            <listitem>
              <para>
                Selecting any text already in the component.
              </para>
            </listitem>
            <listitem>
              <para>
                Entering the text you specified. This effectively overwrites the previous text in the component.
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
      <listitem>
        <para>
          This means that any previous text in the component is deleted.
        </para>
      </listitem>
      <listitem>
        <para>
          To enter text before/after previous text, see "<emphasis>Insert Text Before/After Pattern</emphasis>" in the "<emphasis>Text Field</emphasis>" component.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="text" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para role="tip">
    This action is unsupported for combo-boxes in the HTML toolkit
  </para>
  
  <para role="tip">
    If you use this action on a table, then the text will be entered into the currently selected cell.
  </para>
  
  <para><emphasis>Press Any Key</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          This action allows you to send a key command to the application.
        </para>
      </listitem>
      <listitem>
        <para>
          This is useful for actions such as »DELETE«, »ENTER«, etc.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="modifier_keys" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="base_key" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para role="tip">
    Under Swing, this action only supports the American character set. Under SWT, you can use any character set under Windows, but there are some problems with non-American characters under Linux.
  </para>
  <para role="warning">
    In HTML, on Firefox, the keys »F5« and »ESCAPE« cannot be used.
  </para>
  <para role="tip">
    Users working on Linux systems should increase the key repeat delay on their test system or remove it completely. Some Linux systems can otherwise tend to repeat key presses which can lead to undesired actions being produced during test execution.
  </para>
  
  <para><emphasis>External Input Text</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to input text into dialogs that are not supported (e.g. file choosers).
        </para>
      </listitem>
      <listitem>
        <para>
          Keystrokes can be sent to these dialogs, but no check is possible to see if they have arrived.
        </para>
      </listitem>
      <listitem>
        <para>
          For this action to work, the dialog must be in focus, and the cursor must be in the text field to be filled in.
        </para>
      </listitem>
      <listitem>
        <para>
          Combine this action with the "External Key Combination" action to send key combinations to native dialogs to be able to work with file choosers during your test.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="text" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para>
    <emphasis role="strong">Native dialogs in SWT and RCP AUT's</emphasis>
  </para>
  
  <para>
    In SWT and RCP AUT's , this action can only enter ASCII characters (large and small letters, and numbers).
  </para>
  
  <para>
    To enter characters such as spaces, periods and slashes, use the action <emphasis>External Key Combination</emphasis>.
  </para>
  
  <para>
    We recommend using the action Copy to Clipboard to help fill out native dialogs in SWT and RCP AUT's . The string you <emphasis>copy to the clipboard</emphasis> can then simply be entered into the textfield in the dialog using »CTRL+V« as an <emphasis>External Key Combination</emphasis> action.
  </para>
  
  <para><emphasis>External Press Any Key</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to send a key combination to a dialog that is not supported (e.g. file choosers).
        </para>
      </listitem>
      <listitem>
        <para>
          Keystrokes can be sent to these dialogs, but it is not possible to check if it has arrived.
        </para>
      </listitem>
      <listitem>
        <para>
          For this action to work, the dialog must be in focus.
        </para>
      </listitem>
      <listitem>
        <para>
          Combine this action with the "<emphasis>External Input Text</emphasis>" action to be able to work with file choosers during your test.
        </para>
      </listitem>
      <listitem>
        <para>
          Some of the keystrokes you may need include <emphasis>ENTER, SPACE, PERIOD</emphasis> and /.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="modifier_keys" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="base_key" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para><emphasis>Set Toggle Key</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to turn the following keys on or off:
          
          <itemizedlist>
            <listitem>
              <para>
                Caps-lock
              </para>
            </listitem>
            <listitem>
              <para>
                Num-lock
              </para>
            </listitem>
            <listitem>
              <para>
                Scroll-lock
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
      <listitem>
        <para>
          You specify which key to (de)activate and whether the function should be turned on or off.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="key" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="activate_key" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para role="warning">
    Due to current Java limitations, this action is not supported when testing under Linux. This means that any Test Step containing this action will fail when testing under Linux.
  </para>
  
  <para><emphasis>Insert Text after Index</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to insert a text into the text area.
        </para>
      </listitem>
      <listitem>
        <para>
          You enter the text to be inserted, and the position at which it should be inserted.
        </para>
      </listitem>
      <listitem>
        <para>
          The position is given using the index.
        </para>
      </listitem>
      <listitem>
        <para>
          This is achieved by:
          
          <itemizedlist>
            <listitem>
              <para>
                Positioning the cursor at the index you specify.
              </para>
            </listitem>
            <listitem>
              <para>
                Entering the text.
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="text" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="index" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para><emphasis>Insert Text before/after Pattern</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to insert a text into the text area.
        </para>
      </listitem>
      <listitem>
        <para>
          You enter the text to be inserted and whether it should be inserted before or after the pattern you enter.
        </para>
      </listitem>
      <listitem>
        <para>
          This is achieved by:
          
          <itemizedlist>
            <listitem>
              <para>
                Positioning the cursor at the position you specify.
              </para>
            </listitem>
            <listitem>
              <para>
                Entering the text.
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
      <listitem>
        <para>
          If a pattern is not found, the text is not inserted.
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="text" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="pattern" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="operator" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="insert_after_pattern" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
</section>

Back to the top