MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / tick

Method tick

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

Source from the content-addressed store, hash-verified

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