Class Input
java.lang.Object
org.openqa.selenium.devtools.v126.input.Input
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static enum
static enum
static enum
static enum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.devtools.Command<Void>
Cancels any active dragging in the page.static org.openqa.selenium.devtools.Command<Void>
dispatchDragEvent
(Input.DispatchDragEventType type, Number x, Number y, DragData data, Optional<Integer> modifiers) Dispatches a drag event into the page.static org.openqa.selenium.devtools.Command<Void>
dispatchKeyEvent
(Input.DispatchKeyEventType type, Optional<Integer> modifiers, Optional<TimeSinceEpoch> timestamp, Optional<String> text, Optional<String> unmodifiedText, Optional<String> keyIdentifier, Optional<String> code, Optional<String> key, Optional<Integer> windowsVirtualKeyCode, Optional<Integer> nativeVirtualKeyCode, Optional<Boolean> autoRepeat, Optional<Boolean> isKeypad, Optional<Boolean> isSystemKey, Optional<Integer> location, Optional<List<String>> commands) Dispatches a key event to the page.static org.openqa.selenium.devtools.Command<Void>
dispatchMouseEvent
(Input.DispatchMouseEventType type, Number x, Number y, Optional<Integer> modifiers, Optional<TimeSinceEpoch> timestamp, Optional<MouseButton> button, Optional<Integer> buttons, Optional<Integer> clickCount, Optional<Number> force, Optional<Number> tangentialPressure, Optional<Number> tiltX, Optional<Number> tiltY, Optional<Integer> twist, Optional<Number> deltaX, Optional<Number> deltaY, Optional<Input.DispatchMouseEventPointerType> pointerType) Dispatches a mouse event to the page.static org.openqa.selenium.devtools.Command<Void>
dispatchTouchEvent
(Input.DispatchTouchEventType type, List<TouchPoint> touchPoints, Optional<Integer> modifiers, Optional<TimeSinceEpoch> timestamp) Dispatches a touch event to the page.static org.openqa.selenium.devtools.Event<DragData>
static org.openqa.selenium.devtools.Command<Void>
emulateTouchFromMouseEvent
(Input.EmulateTouchFromMouseEventType type, Integer x, Integer y, MouseButton button, Optional<TimeSinceEpoch> timestamp, Optional<Number> deltaX, Optional<Number> deltaY, Optional<Integer> modifiers, Optional<Integer> clickCount) Emulates touch event from the mouse event parameters.static org.openqa.selenium.devtools.Command<Void>
imeSetComposition
(String text, Integer selectionStart, Integer selectionEnd, Optional<Integer> replacementStart, Optional<Integer> replacementEnd) This method sets the current candidate text for IME.static org.openqa.selenium.devtools.Command<Void>
insertText
(String text) This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.static org.openqa.selenium.devtools.Command<Void>
setIgnoreInputEvents
(Boolean ignore) Ignores input events (useful while auditing page).static org.openqa.selenium.devtools.Command<Void>
setInterceptDrags
(Boolean enabled) Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.static org.openqa.selenium.devtools.Command<Void>
synthesizePinchGesture
(Number x, Number y, Number scaleFactor, Optional<Integer> relativeSpeed, Optional<GestureSourceType> gestureSourceType) Synthesizes a pinch gesture over a time period by issuing appropriate touch events.static org.openqa.selenium.devtools.Command<Void>
synthesizeScrollGesture
(Number x, Number y, Optional<Number> xDistance, Optional<Number> yDistance, Optional<Number> xOverscroll, Optional<Number> yOverscroll, Optional<Boolean> preventFling, Optional<Integer> speed, Optional<GestureSourceType> gestureSourceType, Optional<Integer> repeatCount, Optional<Integer> repeatDelayMs, Optional<String> interactionMarkerName) Synthesizes a scroll gesture over a time period by issuing appropriate touch events.static org.openqa.selenium.devtools.Command<Void>
synthesizeTapGesture
(Number x, Number y, Optional<Integer> duration, Optional<Integer> tapCount, Optional<GestureSourceType> gestureSourceType) Synthesizes a tap gesture over a time period by issuing appropriate touch events.
-
Constructor Details
-
Input
public Input()
-
-
Method Details
-
dispatchDragEvent
@Beta public static org.openqa.selenium.devtools.Command<Void> dispatchDragEvent(Input.DispatchDragEventType type, Number x, Number y, DragData data, Optional<Integer> modifiers) Dispatches a drag event into the page. -
dispatchKeyEvent
public static org.openqa.selenium.devtools.Command<Void> dispatchKeyEvent(Input.DispatchKeyEventType type, Optional<Integer> modifiers, Optional<TimeSinceEpoch> timestamp, Optional<String> text, Optional<String> unmodifiedText, Optional<String> keyIdentifier, Optional<String> code, Optional<String> key, Optional<Integer> windowsVirtualKeyCode, Optional<Integer> nativeVirtualKeyCode, Optional<Boolean> autoRepeat, Optional<Boolean> isKeypad, Optional<Boolean> isSystemKey, Optional<Integer> location, Optional<List<String>> commands) Dispatches a key event to the page. -
insertText
This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME. -
imeSetComposition
@Beta public static org.openqa.selenium.devtools.Command<Void> imeSetComposition(String text, Integer selectionStart, Integer selectionEnd, Optional<Integer> replacementStart, Optional<Integer> replacementEnd) This method sets the current candidate text for IME. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition. -
dispatchMouseEvent
public static org.openqa.selenium.devtools.Command<Void> dispatchMouseEvent(Input.DispatchMouseEventType type, Number x, Number y, Optional<Integer> modifiers, Optional<TimeSinceEpoch> timestamp, Optional<MouseButton> button, Optional<Integer> buttons, Optional<Integer> clickCount, Optional<Number> force, Optional<Number> tangentialPressure, Optional<Number> tiltX, Optional<Number> tiltY, Optional<Integer> twist, Optional<Number> deltaX, Optional<Number> deltaY, Optional<Input.DispatchMouseEventPointerType> pointerType) Dispatches a mouse event to the page. -
dispatchTouchEvent
public static org.openqa.selenium.devtools.Command<Void> dispatchTouchEvent(Input.DispatchTouchEventType type, List<TouchPoint> touchPoints, Optional<Integer> modifiers, Optional<TimeSinceEpoch> timestamp) Dispatches a touch event to the page. -
cancelDragging
Cancels any active dragging in the page. -
emulateTouchFromMouseEvent
@Beta public static org.openqa.selenium.devtools.Command<Void> emulateTouchFromMouseEvent(Input.EmulateTouchFromMouseEventType type, Integer x, Integer y, MouseButton button, Optional<TimeSinceEpoch> timestamp, Optional<Number> deltaX, Optional<Number> deltaY, Optional<Integer> modifiers, Optional<Integer> clickCount) Emulates touch event from the mouse event parameters. -
setIgnoreInputEvents
Ignores input events (useful while auditing page). -
setInterceptDrags
Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`. -
synthesizePinchGesture
@Beta public static org.openqa.selenium.devtools.Command<Void> synthesizePinchGesture(Number x, Number y, Number scaleFactor, Optional<Integer> relativeSpeed, Optional<GestureSourceType> gestureSourceType) Synthesizes a pinch gesture over a time period by issuing appropriate touch events. -
synthesizeScrollGesture
@Beta public static org.openqa.selenium.devtools.Command<Void> synthesizeScrollGesture(Number x, Number y, Optional<Number> xDistance, Optional<Number> yDistance, Optional<Number> xOverscroll, Optional<Number> yOverscroll, Optional<Boolean> preventFling, Optional<Integer> speed, Optional<GestureSourceType> gestureSourceType, Optional<Integer> repeatCount, Optional<Integer> repeatDelayMs, Optional<String> interactionMarkerName) Synthesizes a scroll gesture over a time period by issuing appropriate touch events. -
synthesizeTapGesture
@Beta public static org.openqa.selenium.devtools.Command<Void> synthesizeTapGesture(Number x, Number y, Optional<Integer> duration, Optional<Integer> tapCount, Optional<GestureSourceType> gestureSourceType) Synthesizes a tap gesture over a time period by issuing appropriate touch events. -
dragIntercepted
-