selenium-webdriver 4.0.0-alpha.7 → 4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGES.md +56 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +2 -0
  4. package/README.md +2 -0
  5. package/chrome.js +69 -79
  6. package/chromium.js +231 -164
  7. package/{lib/atoms/make-atoms-module.js → devtools/CDPConnection.js} +15 -9
  8. package/edge.js +104 -146
  9. package/example/chrome_android.js +45 -0
  10. package/example/chrome_mobile_emulation.js +46 -0
  11. package/example/firefox_channels.js +84 -0
  12. package/example/google_search.js +50 -0
  13. package/example/google_search_test.js +70 -0
  14. package/example/headless.js +63 -0
  15. package/example/logging.js +64 -0
  16. package/firefox.js +199 -200
  17. package/http/index.js +128 -116
  18. package/http/util.js +56 -64
  19. package/ie.js +180 -104
  20. package/index.js +246 -199
  21. package/io/exec.js +35 -40
  22. package/io/index.js +146 -157
  23. package/io/zip.js +75 -66
  24. package/lib/atoms/find-elements.js +123 -0
  25. package/lib/atoms/get-attribute.js +75 -59
  26. package/lib/atoms/is-displayed.js +72 -72
  27. package/lib/atoms/mutation-listener.js +55 -0
  28. package/lib/by.js +192 -65
  29. package/lib/capabilities.js +76 -86
  30. package/lib/command.js +19 -35
  31. package/lib/error.js +134 -168
  32. package/lib/http.js +308 -232
  33. package/lib/input.js +192 -453
  34. package/lib/logging.js +126 -137
  35. package/lib/promise.js +53 -71
  36. package/lib/proxy.js +31 -41
  37. package/lib/session.js +12 -15
  38. package/lib/symbols.js +3 -4
  39. package/lib/until.js +162 -160
  40. package/lib/webdriver.js +1014 -549
  41. package/net/index.js +30 -36
  42. package/net/portprober.js +30 -143
  43. package/opera.js +406 -0
  44. package/package.json +15 -7
  45. package/proxy.js +2 -2
  46. package/remote/index.js +189 -187
  47. package/safari.js +40 -49
  48. package/testing/index.js +504 -0
  49. package/lib/README +0 -5
  50. package/lib/actions.js +0 -609
package/lib/actions.js DELETED
@@ -1,609 +0,0 @@
1
- // Licensed to the Software Freedom Conservancy (SFC) under one
2
- // or more contributor license agreements. See the NOTICE file
3
- // distributed with this work for additional information
4
- // regarding copyright ownership. The SFC licenses this file
5
- // to you under the Apache License, Version 2.0 (the
6
- // "License"); you may not use this file except in compliance
7
- // with the License. You may obtain a copy of the License at
8
- //
9
- // http://www.apache.org/licenses/LICENSE-2.0
10
- //
11
- // Unless required by applicable law or agreed to in writing,
12
- // software distributed under the License is distributed on an
13
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- // KIND, either express or implied. See the License for the
15
- // specific language governing permissions and limitations
16
- // under the License.
17
-
18
- 'use strict';
19
-
20
- const command = require('./command');
21
- const error = require('./error');
22
- const input = require('./input');
23
-
24
-
25
- /**
26
- * @param {!IArrayLike} args .
27
- * @return {!Array} .
28
- */
29
- function flatten(args) {
30
- let result = [];
31
- for (let i = 0; i < args.length; i++) {
32
- let element = args[i];
33
- if (Array.isArray(element)) {
34
- result.push.apply(result, flatten(element));
35
- } else {
36
- result.push(element);
37
- }
38
- }
39
- return result;
40
- }
41
-
42
-
43
- const MODIFIER_KEYS = new Set([
44
- input.Key.ALT,
45
- input.Key.CONTROL,
46
- input.Key.SHIFT,
47
- input.Key.COMMAND
48
- ]);
49
-
50
-
51
- /**
52
- * Checks that a key is a modifier key.
53
- * @param {!input.Key} key The key to check.
54
- * @throws {error.InvalidArgumentError} If the key is not a modifier key.
55
- * @private
56
- */
57
- function checkModifierKey(key) {
58
- if (!MODIFIER_KEYS.has(key)) {
59
- throw new error.InvalidArgumentError('Not a modifier key');
60
- }
61
- }
62
-
63
-
64
- /**
65
- * Class for defining sequences of complex user interactions. Each sequence
66
- * will not be executed until {@link #perform} is called.
67
- *
68
- * This class should not be instantiated directly. Instead, obtain an instance
69
- * using {@link ./webdriver.WebDriver#actions() WebDriver.actions()}.
70
- *
71
- * Sample usage:
72
- *
73
- * new LegacyActions(driver).
74
- * keyDown(Key.SHIFT).
75
- * click(element1).
76
- * click(element2).
77
- * dragAndDrop(element3, element4).
78
- * keyUp(Key.SHIFT).
79
- * perform();
80
- *
81
- * @deprecated This class is strongly deprecated and will be removed once
82
- * [Google's Chrome][Chrome] and [Microsoft's Edge][Edge] browsers
83
- * support the new action sequence API.
84
- *
85
- * [Chrome]: https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status.md
86
- * [Edge]: https://docs.microsoft.com/en-us/microsoft-edge/webdriver
87
- */
88
- class LegacyActionSequence {
89
- /**
90
- * @param {!./webdriver.WebDriver} driver The driver that should be used to
91
- * perform this action sequence.
92
- */
93
- constructor(driver) {
94
- /** @private {!./webdriver.WebDriver} */
95
- this.driver_ = driver;
96
-
97
- /** @private {!Array<{description: string, command: !command.Command}>} */
98
- this.actions_ = [];
99
- }
100
-
101
- /**
102
- * Schedules an action to be executed each time {@link #perform} is called on
103
- * this instance.
104
- *
105
- * @param {string} description A description of the command.
106
- * @param {!command.Command} command The command.
107
- * @private
108
- */
109
- schedule_(description, command) {
110
- this.actions_.push({
111
- description: description,
112
- command: command
113
- });
114
- }
115
-
116
- /**
117
- * Executes this action sequence.
118
- *
119
- * @return {!Promise} A promise that will be resolved once this sequence has
120
- * completed.
121
- */
122
- async perform() {
123
- // Make a protected copy of the scheduled actions. This will protect against
124
- // users defining additional commands before this sequence is actually
125
- // executed.
126
- let actions = this.actions_.concat();
127
- for (let action of actions) {
128
- await this.driver_.execute(action.command);
129
- }
130
- }
131
-
132
- /**
133
- * Moves the mouse. The location to move to may be specified in terms of the
134
- * mouse's current location, an offset relative to the top-left corner of an
135
- * element, or an element (in which case the middle of the element is used).
136
- *
137
- * @param {(!./webdriver.WebElement|{x: number, y: number})} location The
138
- * location to drag to, as either another WebElement or an offset in
139
- * pixels.
140
- * @param {{x: number, y: number}=} opt_offset If the target {@code location}
141
- * is defined as a {@link ./webdriver.WebElement}, this parameter defines
142
- * an offset within that element. The offset should be specified in pixels
143
- * relative to the top-left corner of the element's bounding box. If
144
- * omitted, the element's center will be used as the target offset.
145
- * @return {!LegacyActionSequence} A self reference.
146
- */
147
- mouseMove(location, opt_offset) {
148
- let cmd = new command.Command(command.Name.LEGACY_ACTION_MOUSE_MOVE);
149
-
150
- if (typeof location.x === 'number') {
151
- setOffset(/** @type {{x: number, y: number}} */(location));
152
- } else {
153
- cmd.setParameter('element', location.getId());
154
- if (opt_offset) {
155
- setOffset(opt_offset);
156
- }
157
- }
158
-
159
- this.schedule_('mouseMove', cmd);
160
- return this;
161
-
162
- /** @param {{x: number, y: number}} offset The offset to use. */
163
- function setOffset(offset) {
164
- cmd.setParameter('xoffset', offset.x || 0);
165
- cmd.setParameter('yoffset', offset.y || 0);
166
- }
167
- }
168
-
169
- /**
170
- * Schedules a mouse action.
171
- * @param {string} description A simple descriptive label for the scheduled
172
- * action.
173
- * @param {!command.Name} commandName The name of the command.
174
- * @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
175
- * the element to interact with or the button to click with.
176
- * Defaults to {@link input.Button.LEFT} if neither an element nor
177
- * button is specified.
178
- * @param {input.Button=} opt_button The button to use. Defaults to
179
- * {@link input.Button.LEFT}. Ignored if the previous argument is
180
- * provided as a button.
181
- * @return {!LegacyActionSequence} A self reference.
182
- * @private
183
- */
184
- scheduleMouseAction_(
185
- description, commandName, opt_elementOrButton, opt_button) {
186
- let button;
187
- if (typeof opt_elementOrButton === 'number') {
188
- button = opt_elementOrButton;
189
- } else {
190
- if (opt_elementOrButton) {
191
- this.mouseMove(
192
- /** @type {!./webdriver.WebElement} */ (opt_elementOrButton));
193
- }
194
- button = opt_button !== void(0) ? opt_button : input.Button.LEFT;
195
- }
196
-
197
- let cmd = new command.Command(commandName).
198
- setParameter('button', button);
199
- this.schedule_(description, cmd);
200
- return this;
201
- }
202
-
203
- /**
204
- * Presses a mouse button. The mouse button will not be released until
205
- * {@link #mouseUp} is called, regardless of whether that call is made in this
206
- * sequence or another. The behavior for out-of-order events (e.g. mouseDown,
207
- * click) is undefined.
208
- *
209
- * If an element is provided, the mouse will first be moved to the center
210
- * of that element. This is equivalent to:
211
- *
212
- * sequence.mouseMove(element).mouseDown()
213
- *
214
- * Warning: this method currently only supports the left mouse button. See
215
- * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
216
- *
217
- * @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
218
- * the element to interact with or the button to click with.
219
- * Defaults to {@link input.Button.LEFT} if neither an element nor
220
- * button is specified.
221
- * @param {input.Button=} opt_button The button to use. Defaults to
222
- * {@link input.Button.LEFT}. Ignored if a button is provided as the
223
- * first argument.
224
- * @return {!LegacyActionSequence} A self reference.
225
- */
226
- mouseDown(opt_elementOrButton, opt_button) {
227
- return this.scheduleMouseAction_('mouseDown',
228
- command.Name.LEGACY_ACTION_MOUSE_DOWN, opt_elementOrButton, opt_button);
229
- }
230
-
231
- /**
232
- * Releases a mouse button. Behavior is undefined for calling this function
233
- * without a previous call to {@link #mouseDown}.
234
- *
235
- * If an element is provided, the mouse will first be moved to the center
236
- * of that element. This is equivalent to:
237
- *
238
- * sequence.mouseMove(element).mouseUp()
239
- *
240
- * Warning: this method currently only supports the left mouse button. See
241
- * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
242
- *
243
- * @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
244
- * the element to interact with or the button to click with.
245
- * Defaults to {@link input.Button.LEFT} if neither an element nor
246
- * button is specified.
247
- * @param {input.Button=} opt_button The button to use. Defaults to
248
- * {@link input.Button.LEFT}. Ignored if a button is provided as the
249
- * first argument.
250
- * @return {!LegacyActionSequence} A self reference.
251
- */
252
- mouseUp(opt_elementOrButton, opt_button) {
253
- return this.scheduleMouseAction_('mouseUp',
254
- command.Name.LEGACY_ACTION_MOUSE_UP, opt_elementOrButton, opt_button);
255
- }
256
-
257
- /**
258
- * Convenience function for performing a "drag and drop" maneuver. The target
259
- * element may be moved to the location of another element, or by an offset (in
260
- * pixels).
261
- *
262
- * @param {!./webdriver.WebElement} element The element to drag.
263
- * @param {(!./webdriver.WebElement|{x: number, y: number})} location The
264
- * location to drag to, either as another WebElement or an offset in
265
- * pixels.
266
- * @return {!LegacyActionSequence} A self reference.
267
- */
268
- dragAndDrop(element, location) {
269
- return this.mouseDown(element).mouseMove(location).mouseUp();
270
- }
271
-
272
- /**
273
- * Clicks a mouse button.
274
- *
275
- * If an element is provided, the mouse will first be moved to the center
276
- * of that element. This is equivalent to:
277
- *
278
- * sequence.mouseMove(element).click()
279
- *
280
- * @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
281
- * the element to interact with or the button to click with.
282
- * Defaults to {@link input.Button.LEFT} if neither an element nor
283
- * button is specified.
284
- * @param {input.Button=} opt_button The button to use. Defaults to
285
- * {@link input.Button.LEFT}. Ignored if a button is provided as the
286
- * first argument.
287
- * @return {!LegacyActionSequence} A self reference.
288
- */
289
- click(opt_elementOrButton, opt_button) {
290
- return this.scheduleMouseAction_('click',
291
- command.Name.LEGACY_ACTION_CLICK, opt_elementOrButton, opt_button);
292
- }
293
-
294
- /**
295
- * Double-clicks a mouse button.
296
- *
297
- * If an element is provided, the mouse will first be moved to the center of
298
- * that element. This is equivalent to:
299
- *
300
- * sequence.mouseMove(element).doubleClick()
301
- *
302
- * Warning: this method currently only supports the left mouse button. See
303
- * [issue 4047](http://code.google.com/p/selenium/issues/detail?id=4047).
304
- *
305
- * @param {(./webdriver.WebElement|input.Button)=} opt_elementOrButton Either
306
- * the element to interact with or the button to click with.
307
- * Defaults to {@link input.Button.LEFT} if neither an element nor
308
- * button is specified.
309
- * @param {input.Button=} opt_button The button to use. Defaults to
310
- * {@link input.Button.LEFT}. Ignored if a button is provided as the
311
- * first argument.
312
- * @return {!LegacyActionSequence} A self reference.
313
- */
314
- doubleClick(opt_elementOrButton, opt_button) {
315
- return this.scheduleMouseAction_('doubleClick',
316
- command.Name.LEGACY_ACTION_DOUBLE_CLICK, opt_elementOrButton,
317
- opt_button);
318
- }
319
-
320
- /**
321
- * Schedules a keyboard action.
322
- *
323
- * @param {string} description A simple descriptive label for the scheduled
324
- * action.
325
- * @param {!Array<(string|!input.Key)>} keys The keys to send.
326
- * @return {!LegacyActionSequence} A self reference.
327
- * @private
328
- */
329
- scheduleKeyboardAction_(description, keys) {
330
- let cmd = new command.Command(command.Name.LEGACY_ACTION_SEND_KEYS)
331
- .setParameter('value', keys);
332
- this.schedule_(description, cmd);
333
- return this;
334
- }
335
-
336
- /**
337
- * Performs a modifier key press. The modifier key is <em>not released</em>
338
- * until {@link #keyUp} or {@link #sendKeys} is called. The key press will be
339
- * targeted at the currently focused element.
340
- *
341
- * @param {!input.Key} key The modifier key to push. Must be one of
342
- * {ALT, CONTROL, SHIFT, COMMAND, META}.
343
- * @return {!LegacyActionSequence} A self reference.
344
- * @throws {error.InvalidArgumentError} If the key is not a valid modifier
345
- * key.
346
- */
347
- keyDown(key) {
348
- checkModifierKey(key);
349
- return this.scheduleKeyboardAction_('keyDown', [key]);
350
- }
351
-
352
- /**
353
- * Performs a modifier key release. The release is targeted at the currently
354
- * focused element.
355
- * @param {!input.Key} key The modifier key to release. Must be one of
356
- * {ALT, CONTROL, SHIFT, COMMAND, META}.
357
- * @return {!LegacyActionSequence} A self reference.
358
- * @throws {error.InvalidArgumentError} If the key is not a valid modifier
359
- * key.
360
- */
361
- keyUp(key) {
362
- checkModifierKey(key);
363
- return this.scheduleKeyboardAction_('keyUp', [key]);
364
- }
365
-
366
- /**
367
- * Simulates typing multiple keys. Each modifier key encountered in the
368
- * sequence will not be released until it is encountered again. All key events
369
- * will be targeted at the currently focused element.
370
- *
371
- * @param {...(string|!input.Key|!Array<(string|!input.Key)>)} var_args
372
- * The keys to type.
373
- * @return {!LegacyActionSequence} A self reference.
374
- * @throws {Error} If the key is not a valid modifier key.
375
- */
376
- sendKeys(var_args) {
377
- let keys = flatten(arguments);
378
- return this.scheduleKeyboardAction_('sendKeys', keys);
379
- }
380
- }
381
-
382
-
383
- /**
384
- * Class for defining sequences of user touch interactions. Each sequence
385
- * will not be executed until {@link #perform} is called.
386
- *
387
- * This class should not be instantiated directly. Instead, obtain an instance
388
- * using {@link ./webdriver.WebDriver#touchActions() WebDriver.touchActions()}.
389
- *
390
- * Sample usage:
391
- *
392
- * new LegacyActions(driver).
393
- * tapAndHold({x: 0, y: 0}).
394
- * move({x: 3, y: 4}).
395
- * release({x: 10, y: 10}).
396
- * perform();
397
- *
398
- * @deprecated This class is strongly deprecated and will be removed once
399
- * [Google's Chrome][Chrome] and [Microsoft's Edge][Edge] browsers
400
- * support the new action sequence API.
401
- *
402
- * [Chrome]: https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status.md
403
- * [Edge]: https://docs.microsoft.com/en-us/microsoft-edge/webdriver
404
- */
405
- class LegacyTouchSequence {
406
- /**
407
- * @param {!./webdriver.WebDriver} driver The driver that should be used to
408
- * perform this action sequence.
409
- */
410
- constructor(driver) {
411
- /** @private {!./webdriver.WebDriver} */
412
- this.driver_ = driver;
413
-
414
- /** @private {!Array<{description: string, command: !command.Command}>} */
415
- this.actions_ = [];
416
- }
417
-
418
- /**
419
- * Schedules an action to be executed each time {@link #perform} is called on
420
- * this instance.
421
- * @param {string} description A description of the command.
422
- * @param {!command.Command} command The command.
423
- * @private
424
- */
425
- schedule_(description, command) {
426
- this.actions_.push({
427
- description: description,
428
- command: command
429
- });
430
- }
431
-
432
- /**
433
- * Executes this action sequence.
434
- * @return {!Promise} A promise that will be resolved once this sequence has
435
- * completed.
436
- */
437
- async perform() {
438
- // Make a protected copy of the scheduled actions. This will protect against
439
- // users defining additional commands before this sequence is actually
440
- // executed.
441
- let actions = this.actions_.concat();
442
- for (let action of actions) {
443
- await this.driver_.execute(action.command);
444
- }
445
- }
446
-
447
- /**
448
- * Taps an element.
449
- *
450
- * @param {!./webdriver.WebElement} elem The element to tap.
451
- * @return {!LegacyTouchSequence} A self reference.
452
- */
453
- tap(elem) {
454
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SINGLE_TAP).
455
- setParameter('element', elem.getId());
456
-
457
- this.schedule_('tap', cmd);
458
- return this;
459
- }
460
-
461
- /**
462
- * Double taps an element.
463
- *
464
- * @param {!./webdriver.WebElement} elem The element to double tap.
465
- * @return {!LegacyTouchSequence} A self reference.
466
- */
467
- doubleTap(elem) {
468
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_DOUBLE_TAP).
469
- setParameter('element', elem.getId());
470
-
471
- this.schedule_('doubleTap', cmd);
472
- return this;
473
- }
474
-
475
- /**
476
- * Long press on an element.
477
- *
478
- * @param {!./webdriver.WebElement} elem The element to long press.
479
- * @return {!LegacyTouchSequence} A self reference.
480
- */
481
- longPress(elem) {
482
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_LONG_PRESS).
483
- setParameter('element', elem.getId());
484
-
485
- this.schedule_('longPress', cmd);
486
- return this;
487
- }
488
-
489
- /**
490
- * Touch down at the given location.
491
- *
492
- * @param {{x: number, y: number}} location The location to touch down at.
493
- * @return {!LegacyTouchSequence} A self reference.
494
- */
495
- tapAndHold(location) {
496
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_DOWN).
497
- setParameter('x', location.x).
498
- setParameter('y', location.y);
499
-
500
- this.schedule_('tapAndHold', cmd);
501
- return this;
502
- }
503
-
504
- /**
505
- * Move a held {@linkplain #tapAndHold touch} to the specified location.
506
- *
507
- * @param {{x: number, y: number}} location The location to move to.
508
- * @return {!LegacyTouchSequence} A self reference.
509
- */
510
- move(location) {
511
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_MOVE).
512
- setParameter('x', location.x).
513
- setParameter('y', location.y);
514
-
515
- this.schedule_('move', cmd);
516
- return this;
517
- }
518
-
519
- /**
520
- * Release a held {@linkplain #tapAndHold touch} at the specified location.
521
- *
522
- * @param {{x: number, y: number}} location The location to release at.
523
- * @return {!LegacyTouchSequence} A self reference.
524
- */
525
- release(location) {
526
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_UP).
527
- setParameter('x', location.x).
528
- setParameter('y', location.y);
529
-
530
- this.schedule_('release', cmd);
531
- return this;
532
- }
533
-
534
- /**
535
- * Scrolls the touch screen by the given offset.
536
- *
537
- * @param {{x: number, y: number}} offset The offset to scroll to.
538
- * @return {!LegacyTouchSequence} A self reference.
539
- */
540
- scroll(offset) {
541
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL).
542
- setParameter('xoffset', offset.x).
543
- setParameter('yoffset', offset.y);
544
-
545
- this.schedule_('scroll', cmd);
546
- return this;
547
- }
548
-
549
- /**
550
- * Scrolls the touch screen, starting on `elem` and moving by the specified
551
- * offset.
552
- *
553
- * @param {!./webdriver.WebElement} elem The element where scroll starts.
554
- * @param {{x: number, y: number}} offset The offset to scroll to.
555
- * @return {!LegacyTouchSequence} A self reference.
556
- */
557
- scrollFromElement(elem, offset) {
558
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_SCROLL).
559
- setParameter('element', elem.getId()).
560
- setParameter('xoffset', offset.x).
561
- setParameter('yoffset', offset.y);
562
-
563
- this.schedule_('scrollFromElement', cmd);
564
- return this;
565
- }
566
-
567
- /**
568
- * Flick, starting anywhere on the screen, at speed xspeed and yspeed.
569
- *
570
- * @param {{xspeed: number, yspeed: number}} speed The speed to flick in each
571
- direction, in pixels per second.
572
- * @return {!LegacyTouchSequence} A self reference.
573
- */
574
- flick(speed) {
575
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK).
576
- setParameter('xspeed', speed.xspeed).
577
- setParameter('yspeed', speed.yspeed);
578
-
579
- this.schedule_('flick', cmd);
580
- return this;
581
- }
582
-
583
- /**
584
- * Flick starting at elem and moving by x and y at specified speed.
585
- *
586
- * @param {!./webdriver.WebElement} elem The element where flick starts.
587
- * @param {{x: number, y: number}} offset The offset to flick to.
588
- * @param {number} speed The speed to flick at in pixels per second.
589
- * @return {!LegacyTouchSequence} A self reference.
590
- */
591
- flickElement(elem, offset, speed) {
592
- let cmd = new command.Command(command.Name.LEGACY_ACTION_TOUCH_FLICK).
593
- setParameter('element', elem.getId()).
594
- setParameter('xoffset', offset.x).
595
- setParameter('yoffset', offset.y).
596
- setParameter('speed', speed);
597
-
598
- this.schedule_('flickElement', cmd);
599
- return this;
600
- }
601
- }
602
-
603
-
604
- // PUBLIC API
605
-
606
- module.exports = {
607
- LegacyActionSequence,
608
- LegacyTouchSequence,
609
- };