MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / tick

Method tick

java/src/org/openqa/selenium/interactions/Actions.java:458–485  ·  view source on GitHub ↗
(Interaction... actions)

Source from the content-addressed store, hash-verified

456 }
457
458 public Actions tick(Interaction... actions) {
459 // All actions must be for a unique source.
460 Set<InputSource> seenSources = new HashSet<>();
461 for (Interaction action : actions) {
462 boolean freshlyAdded = seenSources.add(action.getSource());
463 if (!freshlyAdded) {
464 throw new IllegalStateException(
465 String.format(
466 "You may only add one action per input source per tick: %s",
467 Arrays.toString(actions)));
468 }
469 }
470
471 // Add all actions to sequences
472 for (Interaction action : actions) {
473 Sequence sequence = getSequence(action.getSource());
474 sequence.addAction(action);
475 }
476
477 // And now pad the remaining sequences with a pause.
478 Set<InputSource> unseen = new HashSet<>(sequences.keySet());
479 unseen.removeAll(seenSources);
480 for (InputSource source : unseen) {
481 getSequence(source).addAction(new Pause(source, Duration.ZERO));
482 }
483
484 return this;
485 }
486
487 public Actions setActiveKeyboard(String name) {
488 InputSource inputSource =

Callers 15

keyDownMethod · 0.95
keyUpMethod · 0.95
sendKeysInTicksMethod · 0.95
clickAndHoldMethod · 0.95
releaseMethod · 0.95
scrollToElementMethod · 0.95
scrollByAmountMethod · 0.95
scrollFromOriginMethod · 0.95
clickInTicksMethod · 0.95
moveInTicksMethod · 0.95
moveByOffsetMethod · 0.95
moveToLocationMethod · 0.95

Calls 7

getSequenceMethod · 0.95
addActionMethod · 0.95
addMethod · 0.65
toStringMethod · 0.65
getSourceMethod · 0.45
formatMethod · 0.45
keySetMethod · 0.45

Tested by

no test coverage detected