Lines Matching refs:actions

6    * Builder for creating a sequence of actions
9 * The actions are dispatched once
11 * promise which resolves once the actions are complete.
14 * used to build the sequence of actions that will be sent. These
15 * return the `Actions` object itself, so the actions sequence can
24 * let actions = new test_driver.Actions()
32 * await actions.send();
71 * @returns {Array} Array of WebDriver-compatible actions sequences
74 let actions = [];
80 actions.push(serialized);
83 return actions;
90 * rejected if any actions fail.
93 let actions;
95 actions = this.serialize();
99 return test_driver.action_sequence(actions, this.context);
103 * Set the context for the actions
248 * Insert a new actions tick
382 this.actions = new Map();
387 let actions = [];
388 let data = {"type": "none", "actions": actions};
390 if (this.actions.has(i)) {
391 actions.push(this.actions.get(i));
393 actions.push({"type": "pause", duration: defaultTickDuration});
399 addPause: function(actions, duration) {
400 let tick = actions.tickIdx;
401 if (this.actions.has(tick)) {
404 this.actions.set(tick, {type: "pause", duration: duration});
409 this.actions = new Map();
414 if (!this.actions.size) {
417 let actions = [];
418 let data = {"type": "key", "actions": actions};
420 if (this.actions.has(i)) {
421 actions.push(this.actions.get(i));
423 actions.push({"type": "pause"});
429 keyDown: function(actions, key) {
430 let tick = actions.tickIdx;
431 if (this.actions.has(tick)) {
432 tick = actions.addTick().tickIdx;
434 this.actions.set(tick, {type: "keyDown", value: key});
437 keyUp: function(actions, key) {
438 let tick = actions.tickIdx;
439 if (this.actions.has(tick)) {
440 tick = actions.addTick().tickIdx;
442 this.actions.set(tick, {type: "keyUp", value: key});
445 addPause: function(actions, duration) {
446 let tick = actions.tickIdx;
447 if (this.actions.has(tick)) {
448 tick = actions.addTick().tickIdx;
450 this.actions.set(tick, {type: "pause", duration: duration});
460 this.actions = new Map();
497 if (!this.actions.size) {
500 let actions = [];
501 let data = {"type": "pointer", "actions": actions, "parameters": {"pointerType": this.type}};
503 if (this.actions.has(i)) {
504 actions.push(this.actions.get(i));
506 actions.push({"type": "pause"});
512 pointerDown: function(actions, button, width, height, pressure, tangentialPressure,
514 let tick = actions.tickIdx;
515 if (this.actions.has(tick)) {
516 tick = actions.addTick().tickIdx;
521 this.actions.set(tick, actionProperties);
524 pointerUp: function(actions, button) {
525 let tick = actions.tickIdx;
526 if (this.actions.has(tick)) {
527 tick = actions.addTick().tickIdx;
529 this.actions.set(tick, {type: "pointerUp", button});
532 pointerMove: function(actions, x, y, duration, origin, width, height, pressure,
534 let tick = actions.tickIdx;
535 if (this.actions.has(tick)) {
536 tick = actions.addTick().tickIdx;
545 this.actions.set(tick, actionProperties);
548 addPause: function(actions, duration) {
549 let tick = actions.tickIdx;
550 if (this.actions.has(tick)) {
551 tick = actions.addTick().tickIdx;
553 this.actions.set(tick, {type: "pause", duration: duration});
558 this.actions = new Map();
563 if (!this.actions.size) {
566 let actions = [];
567 let data = {"type": "wheel", "actions": actions};
569 if (this.actions.has(i)) {
570 actions.push(this.actions.get(i));
572 actions.push({"type": "pause"});
578 scroll: function(actions, x, y, deltaX, deltaY, duration, origin) {
579 let tick = actions.tickIdx;
580 if (this.actions.has(tick)) {
581 tick = actions.addTick().tickIdx;
583 this.actions.set(tick, {type: "scroll", x, y, deltaX, deltaY, origin});
585 this.actions.get(tick).duration = duration;
589 addPause: function(actions, duration) {
590 let tick = actions.tickIdx;
591 if (this.actions.has(tick)) {
592 tick = actions.addTick().tickIdx;
594 this.actions.set(tick, {type: "pause", duration: duration});