Documentation ¶
Overview ¶
Package input provides the Chrome DevTools Protocol commands, types, and events for the Input domain.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type ButtonType
- type DispatchKeyEventParams
- func (p *DispatchKeyEventParams) Do(ctx context.Context) (err error)
- func (v DispatchKeyEventParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v DispatchKeyEventParams) MarshalJSON() ([]byte, error)
- func (v *DispatchKeyEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *DispatchKeyEventParams) UnmarshalJSON(data []byte) error
- func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithCode(code string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithIsKeypad(isKeypad bool) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithKey(key string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithKeyIdentifier(keyIdentifier string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithLocation(location int64) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithModifiers(modifiers Modifier) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithNativeVirtualKeyCode(nativeVirtualKeyCode int64) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithText(text string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithUnmodifiedText(unmodifiedText string) *DispatchKeyEventParams
- func (p DispatchKeyEventParams) WithWindowsVirtualKeyCode(windowsVirtualKeyCode int64) *DispatchKeyEventParams
- type DispatchMouseEventParams
- func (p *DispatchMouseEventParams) Do(ctx context.Context) (err error)
- func (v DispatchMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v DispatchMouseEventParams) MarshalJSON() ([]byte, error)
- func (v *DispatchMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *DispatchMouseEventParams) UnmarshalJSON(data []byte) error
- func (p DispatchMouseEventParams) WithButton(button ButtonType) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithButtons(buttons int64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithDeltaX(deltaX float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithDeltaY(deltaY float64) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithModifiers(modifiers Modifier) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithPointerType(pointerType DispatchMouseEventPointerType) *DispatchMouseEventParams
- func (p DispatchMouseEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchMouseEventParams
- type DispatchMouseEventPointerType
- func (t DispatchMouseEventPointerType) MarshalEasyJSON(out *jwriter.Writer)
- func (t DispatchMouseEventPointerType) MarshalJSON() ([]byte, error)
- func (t DispatchMouseEventPointerType) String() string
- func (t *DispatchMouseEventPointerType) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (t *DispatchMouseEventPointerType) UnmarshalJSON(buf []byte) error
- type DispatchTouchEventParams
- func (p *DispatchTouchEventParams) Do(ctx context.Context) (err error)
- func (v DispatchTouchEventParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v DispatchTouchEventParams) MarshalJSON() ([]byte, error)
- func (v *DispatchTouchEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *DispatchTouchEventParams) UnmarshalJSON(data []byte) error
- func (p DispatchTouchEventParams) WithModifiers(modifiers Modifier) *DispatchTouchEventParams
- func (p DispatchTouchEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchTouchEventParams
- type EmulateTouchFromMouseEventParams
- func (p *EmulateTouchFromMouseEventParams) Do(ctx context.Context) (err error)
- func (v EmulateTouchFromMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v EmulateTouchFromMouseEventParams) MarshalJSON() ([]byte, error)
- func (v *EmulateTouchFromMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EmulateTouchFromMouseEventParams) UnmarshalJSON(data []byte) error
- func (p EmulateTouchFromMouseEventParams) WithClickCount(clickCount int64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithDeltaX(deltaX float64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithDeltaY(deltaY float64) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithModifiers(modifiers Modifier) *EmulateTouchFromMouseEventParams
- func (p EmulateTouchFromMouseEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *EmulateTouchFromMouseEventParams
- type GestureType
- type InsertTextParams
- func (p *InsertTextParams) Do(ctx context.Context) (err error)
- func (v InsertTextParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v InsertTextParams) MarshalJSON() ([]byte, error)
- func (v *InsertTextParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *InsertTextParams) UnmarshalJSON(data []byte) error
- type KeyType
- type Modifier
- type MouseType
- type SetIgnoreInputEventsParams
- func (p *SetIgnoreInputEventsParams) Do(ctx context.Context) (err error)
- func (v SetIgnoreInputEventsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SetIgnoreInputEventsParams) MarshalJSON() ([]byte, error)
- func (v *SetIgnoreInputEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SetIgnoreInputEventsParams) UnmarshalJSON(data []byte) error
- type SynthesizePinchGestureParams
- func (p *SynthesizePinchGestureParams) Do(ctx context.Context) (err error)
- func (v SynthesizePinchGestureParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SynthesizePinchGestureParams) MarshalJSON() ([]byte, error)
- func (v *SynthesizePinchGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SynthesizePinchGestureParams) UnmarshalJSON(data []byte) error
- func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizePinchGestureParams
- func (p SynthesizePinchGestureParams) WithRelativeSpeed(relativeSpeed int64) *SynthesizePinchGestureParams
- type SynthesizeScrollGestureParams
- func (p *SynthesizeScrollGestureParams) Do(ctx context.Context) (err error)
- func (v SynthesizeScrollGestureParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SynthesizeScrollGestureParams) MarshalJSON() ([]byte, error)
- func (v *SynthesizeScrollGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SynthesizeScrollGestureParams) UnmarshalJSON(data []byte) error
- func (p SynthesizeScrollGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMarkerName string) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithPreventFling(preventFling bool) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithRepeatCount(repeatCount int64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithRepeatDelayMs(repeatDelayMs int64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithSpeed(speed int64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithXDistance(xDistance float64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithXOverscroll(xOverscroll float64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithYDistance(yDistance float64) *SynthesizeScrollGestureParams
- func (p SynthesizeScrollGestureParams) WithYOverscroll(yOverscroll float64) *SynthesizeScrollGestureParams
- type SynthesizeTapGestureParams
- func (p *SynthesizeTapGestureParams) Do(ctx context.Context) (err error)
- func (v SynthesizeTapGestureParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SynthesizeTapGestureParams) MarshalJSON() ([]byte, error)
- func (v *SynthesizeTapGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SynthesizeTapGestureParams) UnmarshalJSON(data []byte) error
- func (p SynthesizeTapGestureParams) WithDuration(duration int64) *SynthesizeTapGestureParams
- func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizeTapGestureParams
- func (p SynthesizeTapGestureParams) WithTapCount(tapCount int64) *SynthesizeTapGestureParams
- type TimeSinceEpoch
- type TouchPoint
- type TouchType
Constants ¶
const ( CommandDispatchKeyEvent = "Input.dispatchKeyEvent" CommandInsertText = "Input.insertText" CommandDispatchMouseEvent = "Input.dispatchMouseEvent" CommandDispatchTouchEvent = "Input.dispatchTouchEvent" CommandEmulateTouchFromMouseEvent = "Input.emulateTouchFromMouseEvent" CommandSetIgnoreInputEvents = "Input.setIgnoreInputEvents" CommandSynthesizePinchGesture = "Input.synthesizePinchGesture" CommandSynthesizeScrollGesture = "Input.synthesizeScrollGesture" CommandSynthesizeTapGesture = "Input.synthesizeTapGesture" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ButtonType ¶
type ButtonType string
ButtonType mouse button (default: "none").
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-button
const ( ButtonNone ButtonType = "none" ButtonLeft ButtonType = "left" ButtonMiddle ButtonType = "middle" ButtonRight ButtonType = "right" ButtonBack ButtonType = "back" ButtonForward ButtonType = "forward" )
ButtonType values.
func (ButtonType) MarshalEasyJSON ¶
func (t ButtonType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (ButtonType) MarshalJSON ¶
func (t ButtonType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (ButtonType) String ¶
func (t ButtonType) String() string
String returns the ButtonType as string value.
func (*ButtonType) UnmarshalEasyJSON ¶
func (t *ButtonType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*ButtonType) UnmarshalJSON ¶
func (t *ButtonType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type DispatchKeyEventParams ¶
type DispatchKeyEventParams struct { Type KeyType `json:"type"` // Type of the key event. Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred. Text string `json:"text,omitempty"` // Text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "") UnmodifiedText string `json:"unmodifiedText,omitempty"` // Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: ""). KeyIdentifier string `json:"keyIdentifier,omitempty"` // Unique key identifier (e.g., 'U+0041') (default: ""). Code string `json:"code,omitempty"` // Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). Key string `json:"key,omitempty"` // Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). WindowsVirtualKeyCode int64 `json:"windowsVirtualKeyCode,omitempty"` // Windows virtual key code (default: 0). NativeVirtualKeyCode int64 `json:"nativeVirtualKeyCode,omitempty"` // Native virtual key code (default: 0). AutoRepeat bool `json:"autoRepeat"` // Whether the event was generated from auto repeat (default: false). IsKeypad bool `json:"isKeypad"` // Whether the event was generated from the keypad (default: false). IsSystemKey bool `json:"isSystemKey"` // Whether the event was a system key event (default: false). Location int64 `json:"location,omitempty"` // Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0). }
DispatchKeyEventParams dispatches a key event to the page.
func DispatchKeyEvent ¶
func DispatchKeyEvent(typeVal KeyType) *DispatchKeyEventParams
DispatchKeyEvent dispatches a key event to the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
parameters:
type - Type of the key event.
func (*DispatchKeyEventParams) Do ¶
func (p *DispatchKeyEventParams) Do(ctx context.Context) (err error)
Do executes Input.dispatchKeyEvent against the provided context.
func (DispatchKeyEventParams) MarshalEasyJSON ¶
func (v DispatchKeyEventParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DispatchKeyEventParams) MarshalJSON ¶
func (v DispatchKeyEventParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DispatchKeyEventParams) UnmarshalEasyJSON ¶
func (v *DispatchKeyEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DispatchKeyEventParams) UnmarshalJSON ¶
func (v *DispatchKeyEventParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (DispatchKeyEventParams) WithAutoRepeat ¶
func (p DispatchKeyEventParams) WithAutoRepeat(autoRepeat bool) *DispatchKeyEventParams
WithAutoRepeat whether the event was generated from auto repeat (default: false).
func (DispatchKeyEventParams) WithCode ¶
func (p DispatchKeyEventParams) WithCode(code string) *DispatchKeyEventParams
WithCode unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
func (DispatchKeyEventParams) WithIsKeypad ¶
func (p DispatchKeyEventParams) WithIsKeypad(isKeypad bool) *DispatchKeyEventParams
WithIsKeypad whether the event was generated from the keypad (default: false).
func (DispatchKeyEventParams) WithIsSystemKey ¶
func (p DispatchKeyEventParams) WithIsSystemKey(isSystemKey bool) *DispatchKeyEventParams
WithIsSystemKey whether the event was a system key event (default: false).
func (DispatchKeyEventParams) WithKey ¶
func (p DispatchKeyEventParams) WithKey(key string) *DispatchKeyEventParams
WithKey unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
func (DispatchKeyEventParams) WithKeyIdentifier ¶
func (p DispatchKeyEventParams) WithKeyIdentifier(keyIdentifier string) *DispatchKeyEventParams
WithKeyIdentifier unique key identifier (e.g., 'U+0041') (default: "").
func (DispatchKeyEventParams) WithLocation ¶
func (p DispatchKeyEventParams) WithLocation(location int64) *DispatchKeyEventParams
WithLocation whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
func (DispatchKeyEventParams) WithModifiers ¶
func (p DispatchKeyEventParams) WithModifiers(modifiers Modifier) *DispatchKeyEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (DispatchKeyEventParams) WithNativeVirtualKeyCode ¶
func (p DispatchKeyEventParams) WithNativeVirtualKeyCode(nativeVirtualKeyCode int64) *DispatchKeyEventParams
WithNativeVirtualKeyCode native virtual key code (default: 0).
func (DispatchKeyEventParams) WithText ¶
func (p DispatchKeyEventParams) WithText(text string) *DispatchKeyEventParams
WithText text as generated by processing a virtual key code with a keyboard layout. Not needed for for keyUp and rawKeyDown events (default: "").
func (DispatchKeyEventParams) WithTimestamp ¶
func (p DispatchKeyEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchKeyEventParams
WithTimestamp time at which the event occurred.
func (DispatchKeyEventParams) WithUnmodifiedText ¶
func (p DispatchKeyEventParams) WithUnmodifiedText(unmodifiedText string) *DispatchKeyEventParams
WithUnmodifiedText text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
func (DispatchKeyEventParams) WithWindowsVirtualKeyCode ¶
func (p DispatchKeyEventParams) WithWindowsVirtualKeyCode(windowsVirtualKeyCode int64) *DispatchKeyEventParams
WithWindowsVirtualKeyCode windows virtual key code (default: 0).
type DispatchMouseEventParams ¶
type DispatchMouseEventParams struct { Type MouseType `json:"type"` // Type of the mouse event. X float64 `json:"x"` // X coordinate of the event relative to the main frame's viewport in CSS pixels. Y float64 `json:"y"` // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred. Button ButtonType `json:"button,omitempty"` // Mouse button (default: "none"). Buttons int64 `json:"buttons,omitempty"` // A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0. ClickCount int64 `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0). DeltaX float64 `json:"deltaX,omitempty"` // X delta in CSS pixels for mouse wheel event (default: 0). DeltaY float64 `json:"deltaY,omitempty"` // Y delta in CSS pixels for mouse wheel event (default: 0). PointerType DispatchMouseEventPointerType `json:"pointerType,omitempty"` // Pointer type (default: "mouse"). }
DispatchMouseEventParams dispatches a mouse event to the page.
func DispatchMouseEvent ¶
func DispatchMouseEvent(typeVal MouseType, x float64, y float64) *DispatchMouseEventParams
DispatchMouseEvent dispatches a mouse event to the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
parameters:
type - Type of the mouse event. x - X coordinate of the event relative to the main frame's viewport in CSS pixels. y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
func (*DispatchMouseEventParams) Do ¶
func (p *DispatchMouseEventParams) Do(ctx context.Context) (err error)
Do executes Input.dispatchMouseEvent against the provided context.
func (DispatchMouseEventParams) MarshalEasyJSON ¶
func (v DispatchMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DispatchMouseEventParams) MarshalJSON ¶
func (v DispatchMouseEventParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DispatchMouseEventParams) UnmarshalEasyJSON ¶
func (v *DispatchMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DispatchMouseEventParams) UnmarshalJSON ¶
func (v *DispatchMouseEventParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (DispatchMouseEventParams) WithButton ¶
func (p DispatchMouseEventParams) WithButton(button ButtonType) *DispatchMouseEventParams
WithButton mouse button (default: "none").
func (DispatchMouseEventParams) WithButtons ¶
func (p DispatchMouseEventParams) WithButtons(buttons int64) *DispatchMouseEventParams
WithButtons a number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
func (DispatchMouseEventParams) WithClickCount ¶
func (p DispatchMouseEventParams) WithClickCount(clickCount int64) *DispatchMouseEventParams
WithClickCount number of times the mouse button was clicked (default: 0).
func (DispatchMouseEventParams) WithDeltaX ¶
func (p DispatchMouseEventParams) WithDeltaX(deltaX float64) *DispatchMouseEventParams
WithDeltaX X delta in CSS pixels for mouse wheel event (default: 0).
func (DispatchMouseEventParams) WithDeltaY ¶
func (p DispatchMouseEventParams) WithDeltaY(deltaY float64) *DispatchMouseEventParams
WithDeltaY Y delta in CSS pixels for mouse wheel event (default: 0).
func (DispatchMouseEventParams) WithModifiers ¶
func (p DispatchMouseEventParams) WithModifiers(modifiers Modifier) *DispatchMouseEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (DispatchMouseEventParams) WithPointerType ¶
func (p DispatchMouseEventParams) WithPointerType(pointerType DispatchMouseEventPointerType) *DispatchMouseEventParams
WithPointerType pointer type (default: "mouse").
func (DispatchMouseEventParams) WithTimestamp ¶
func (p DispatchMouseEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchMouseEventParams
WithTimestamp time at which the event occurred.
type DispatchMouseEventPointerType ¶
type DispatchMouseEventPointerType string
DispatchMouseEventPointerType pointer type (default: "mouse").
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-pointerType
const ( Mouse DispatchMouseEventPointerType = "mouse" Pen DispatchMouseEventPointerType = "pen" )
DispatchMouseEventPointerType values.
func (DispatchMouseEventPointerType) MarshalEasyJSON ¶
func (t DispatchMouseEventPointerType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (DispatchMouseEventPointerType) MarshalJSON ¶
func (t DispatchMouseEventPointerType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (DispatchMouseEventPointerType) String ¶
func (t DispatchMouseEventPointerType) String() string
String returns the DispatchMouseEventPointerType as string value.
func (*DispatchMouseEventPointerType) UnmarshalEasyJSON ¶
func (t *DispatchMouseEventPointerType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*DispatchMouseEventPointerType) UnmarshalJSON ¶
func (t *DispatchMouseEventPointerType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type DispatchTouchEventParams ¶
type DispatchTouchEventParams struct { Type TouchType `json:"type"` // Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one. TouchPoints []*TouchPoint `json:"touchPoints"` // Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one. Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred. }
DispatchTouchEventParams dispatches a touch event to the page.
func DispatchTouchEvent ¶
func DispatchTouchEvent(typeVal TouchType, touchPoints []*TouchPoint) *DispatchTouchEventParams
DispatchTouchEvent dispatches a touch event to the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent
parameters:
type - Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one. touchPoints - Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
func (*DispatchTouchEventParams) Do ¶
func (p *DispatchTouchEventParams) Do(ctx context.Context) (err error)
Do executes Input.dispatchTouchEvent against the provided context.
func (DispatchTouchEventParams) MarshalEasyJSON ¶
func (v DispatchTouchEventParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DispatchTouchEventParams) MarshalJSON ¶
func (v DispatchTouchEventParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DispatchTouchEventParams) UnmarshalEasyJSON ¶
func (v *DispatchTouchEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DispatchTouchEventParams) UnmarshalJSON ¶
func (v *DispatchTouchEventParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (DispatchTouchEventParams) WithModifiers ¶
func (p DispatchTouchEventParams) WithModifiers(modifiers Modifier) *DispatchTouchEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (DispatchTouchEventParams) WithTimestamp ¶
func (p DispatchTouchEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *DispatchTouchEventParams
WithTimestamp time at which the event occurred.
type EmulateTouchFromMouseEventParams ¶
type EmulateTouchFromMouseEventParams struct { Type MouseType `json:"type"` // Type of the mouse event. X int64 `json:"x"` // X coordinate of the mouse pointer in DIP. Y int64 `json:"y"` // Y coordinate of the mouse pointer in DIP. Button ButtonType `json:"button"` // Mouse button. Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred (default: current time). DeltaX float64 `json:"deltaX,omitempty"` // X delta in DIP for mouse wheel event (default: 0). DeltaY float64 `json:"deltaY,omitempty"` // Y delta in DIP for mouse wheel event (default: 0). Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). ClickCount int64 `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0). }
EmulateTouchFromMouseEventParams emulates touch event from the mouse event parameters.
func EmulateTouchFromMouseEvent ¶
func EmulateTouchFromMouseEvent(typeVal MouseType, x int64, y int64, button ButtonType) *EmulateTouchFromMouseEventParams
EmulateTouchFromMouseEvent emulates touch event from the mouse event parameters.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-emulateTouchFromMouseEvent
parameters:
type - Type of the mouse event. x - X coordinate of the mouse pointer in DIP. y - Y coordinate of the mouse pointer in DIP. button - Mouse button.
func (*EmulateTouchFromMouseEventParams) Do ¶
func (p *EmulateTouchFromMouseEventParams) Do(ctx context.Context) (err error)
Do executes Input.emulateTouchFromMouseEvent against the provided context.
func (EmulateTouchFromMouseEventParams) MarshalEasyJSON ¶
func (v EmulateTouchFromMouseEventParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EmulateTouchFromMouseEventParams) MarshalJSON ¶
func (v EmulateTouchFromMouseEventParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EmulateTouchFromMouseEventParams) UnmarshalEasyJSON ¶
func (v *EmulateTouchFromMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EmulateTouchFromMouseEventParams) UnmarshalJSON ¶
func (v *EmulateTouchFromMouseEventParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (EmulateTouchFromMouseEventParams) WithClickCount ¶
func (p EmulateTouchFromMouseEventParams) WithClickCount(clickCount int64) *EmulateTouchFromMouseEventParams
WithClickCount number of times the mouse button was clicked (default: 0).
func (EmulateTouchFromMouseEventParams) WithDeltaX ¶
func (p EmulateTouchFromMouseEventParams) WithDeltaX(deltaX float64) *EmulateTouchFromMouseEventParams
WithDeltaX X delta in DIP for mouse wheel event (default: 0).
func (EmulateTouchFromMouseEventParams) WithDeltaY ¶
func (p EmulateTouchFromMouseEventParams) WithDeltaY(deltaY float64) *EmulateTouchFromMouseEventParams
WithDeltaY Y delta in DIP for mouse wheel event (default: 0).
func (EmulateTouchFromMouseEventParams) WithModifiers ¶
func (p EmulateTouchFromMouseEventParams) WithModifiers(modifiers Modifier) *EmulateTouchFromMouseEventParams
WithModifiers bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
func (EmulateTouchFromMouseEventParams) WithTimestamp ¶
func (p EmulateTouchFromMouseEventParams) WithTimestamp(timestamp *TimeSinceEpoch) *EmulateTouchFromMouseEventParams
WithTimestamp time at which the event occurred (default: current time).
type GestureType ¶
type GestureType string
GestureType [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-GestureSourceType
const ( GestureDefault GestureType = "default" GestureTouch GestureType = "touch" GestureMouse GestureType = "mouse" )
GestureType values.
func (GestureType) MarshalEasyJSON ¶
func (t GestureType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (GestureType) MarshalJSON ¶
func (t GestureType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (GestureType) String ¶
func (t GestureType) String() string
String returns the GestureType as string value.
func (*GestureType) UnmarshalEasyJSON ¶
func (t *GestureType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*GestureType) UnmarshalJSON ¶
func (t *GestureType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type InsertTextParams ¶
type InsertTextParams struct {
Text string `json:"text"` // The text to insert.
}
InsertTextParams this method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.
func InsertText ¶
func InsertText(text string) *InsertTextParams
InsertText this method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-insertText
parameters:
text - The text to insert.
func (*InsertTextParams) Do ¶
func (p *InsertTextParams) Do(ctx context.Context) (err error)
Do executes Input.insertText against the provided context.
func (InsertTextParams) MarshalEasyJSON ¶
func (v InsertTextParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (InsertTextParams) MarshalJSON ¶
func (v InsertTextParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*InsertTextParams) UnmarshalEasyJSON ¶
func (v *InsertTextParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*InsertTextParams) UnmarshalJSON ¶
func (v *InsertTextParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type KeyType ¶
type KeyType string
KeyType type of the key event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-type
const ( KeyDown KeyType = "keyDown" KeyUp KeyType = "keyUp" KeyRawDown KeyType = "rawKeyDown" KeyChar KeyType = "char" )
KeyType values.
func (KeyType) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (KeyType) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*KeyType) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*KeyType) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type Modifier ¶
type Modifier int64
Modifier input key modifier type.
const ( ModifierNone Modifier = 0 ModifierAlt Modifier = 1 ModifierCtrl Modifier = 2 ModifierMeta Modifier = 4 ModifierShift Modifier = 8 )
Modifier values.
const ModifierCommand Modifier = ModifierMeta
ModifierCommand is an alias for ModifierMeta.
func (Modifier) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (Modifier) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*Modifier) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*Modifier) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type MouseType ¶
type MouseType string
MouseType type of the mouse event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-type
const ( MousePressed MouseType = "mousePressed" MouseReleased MouseType = "mouseReleased" MouseMoved MouseType = "mouseMoved" MouseWheel MouseType = "mouseWheel" )
MouseType values.
func (MouseType) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (MouseType) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*MouseType) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*MouseType) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type SetIgnoreInputEventsParams ¶
type SetIgnoreInputEventsParams struct {
Ignore bool `json:"ignore"` // Ignores input events processing when set to true.
}
SetIgnoreInputEventsParams ignores input events (useful while auditing page).
func SetIgnoreInputEvents ¶
func SetIgnoreInputEvents(ignore bool) *SetIgnoreInputEventsParams
SetIgnoreInputEvents ignores input events (useful while auditing page).
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setIgnoreInputEvents
parameters:
ignore - Ignores input events processing when set to true.
func (*SetIgnoreInputEventsParams) Do ¶
func (p *SetIgnoreInputEventsParams) Do(ctx context.Context) (err error)
Do executes Input.setIgnoreInputEvents against the provided context.
func (SetIgnoreInputEventsParams) MarshalEasyJSON ¶
func (v SetIgnoreInputEventsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SetIgnoreInputEventsParams) MarshalJSON ¶
func (v SetIgnoreInputEventsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SetIgnoreInputEventsParams) UnmarshalEasyJSON ¶
func (v *SetIgnoreInputEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SetIgnoreInputEventsParams) UnmarshalJSON ¶
func (v *SetIgnoreInputEventsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SynthesizePinchGestureParams ¶
type SynthesizePinchGestureParams struct { X float64 `json:"x"` // X coordinate of the start of the gesture in CSS pixels. Y float64 `json:"y"` // Y coordinate of the start of the gesture in CSS pixels. ScaleFactor float64 `json:"scaleFactor"` // Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). RelativeSpeed int64 `json:"relativeSpeed,omitempty"` // Relative pointer speed in pixels per second (default: 800). GestureSourceType GestureType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). }
SynthesizePinchGestureParams synthesizes a pinch gesture over a time period by issuing appropriate touch events.
func SynthesizePinchGesture ¶
func SynthesizePinchGesture(x float64, y float64, scaleFactor float64) *SynthesizePinchGestureParams
SynthesizePinchGesture synthesizes a pinch gesture over a time period by issuing appropriate touch events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizePinchGesture
parameters:
x - X coordinate of the start of the gesture in CSS pixels. y - Y coordinate of the start of the gesture in CSS pixels. scaleFactor - Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
func (*SynthesizePinchGestureParams) Do ¶
func (p *SynthesizePinchGestureParams) Do(ctx context.Context) (err error)
Do executes Input.synthesizePinchGesture against the provided context.
func (SynthesizePinchGestureParams) MarshalEasyJSON ¶
func (v SynthesizePinchGestureParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SynthesizePinchGestureParams) MarshalJSON ¶
func (v SynthesizePinchGestureParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SynthesizePinchGestureParams) UnmarshalEasyJSON ¶
func (v *SynthesizePinchGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SynthesizePinchGestureParams) UnmarshalJSON ¶
func (v *SynthesizePinchGestureParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (SynthesizePinchGestureParams) WithGestureSourceType ¶
func (p SynthesizePinchGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizePinchGestureParams
WithGestureSourceType which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
func (SynthesizePinchGestureParams) WithRelativeSpeed ¶
func (p SynthesizePinchGestureParams) WithRelativeSpeed(relativeSpeed int64) *SynthesizePinchGestureParams
WithRelativeSpeed relative pointer speed in pixels per second (default: 800).
type SynthesizeScrollGestureParams ¶
type SynthesizeScrollGestureParams struct { X float64 `json:"x"` // X coordinate of the start of the gesture in CSS pixels. Y float64 `json:"y"` // Y coordinate of the start of the gesture in CSS pixels. XDistance float64 `json:"xDistance,omitempty"` // The distance to scroll along the X axis (positive to scroll left). YDistance float64 `json:"yDistance,omitempty"` // The distance to scroll along the Y axis (positive to scroll up). XOverscroll float64 `json:"xOverscroll,omitempty"` // The number of additional pixels to scroll back along the X axis, in addition to the given distance. YOverscroll float64 `json:"yOverscroll,omitempty"` // The number of additional pixels to scroll back along the Y axis, in addition to the given distance. PreventFling bool `json:"preventFling,omitempty"` // Prevent fling (default: true). Speed int64 `json:"speed,omitempty"` // Swipe speed in pixels per second (default: 800). GestureSourceType GestureType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). RepeatCount int64 `json:"repeatCount,omitempty"` // The number of times to repeat the gesture (default: 0). RepeatDelayMs int64 `json:"repeatDelayMs,omitempty"` // The number of milliseconds delay between each repeat. (default: 250). InteractionMarkerName string `json:"interactionMarkerName,omitempty"` // The name of the interaction markers to generate, if not empty (default: ""). }
SynthesizeScrollGestureParams synthesizes a scroll gesture over a time period by issuing appropriate touch events.
func SynthesizeScrollGesture ¶
func SynthesizeScrollGesture(x float64, y float64) *SynthesizeScrollGestureParams
SynthesizeScrollGesture synthesizes a scroll gesture over a time period by issuing appropriate touch events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeScrollGesture
parameters:
x - X coordinate of the start of the gesture in CSS pixels. y - Y coordinate of the start of the gesture in CSS pixels.
func (*SynthesizeScrollGestureParams) Do ¶
func (p *SynthesizeScrollGestureParams) Do(ctx context.Context) (err error)
Do executes Input.synthesizeScrollGesture against the provided context.
func (SynthesizeScrollGestureParams) MarshalEasyJSON ¶
func (v SynthesizeScrollGestureParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SynthesizeScrollGestureParams) MarshalJSON ¶
func (v SynthesizeScrollGestureParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SynthesizeScrollGestureParams) UnmarshalEasyJSON ¶
func (v *SynthesizeScrollGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SynthesizeScrollGestureParams) UnmarshalJSON ¶
func (v *SynthesizeScrollGestureParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (SynthesizeScrollGestureParams) WithGestureSourceType ¶
func (p SynthesizeScrollGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizeScrollGestureParams
WithGestureSourceType which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
func (SynthesizeScrollGestureParams) WithInteractionMarkerName ¶
func (p SynthesizeScrollGestureParams) WithInteractionMarkerName(interactionMarkerName string) *SynthesizeScrollGestureParams
WithInteractionMarkerName the name of the interaction markers to generate, if not empty (default: "").
func (SynthesizeScrollGestureParams) WithPreventFling ¶
func (p SynthesizeScrollGestureParams) WithPreventFling(preventFling bool) *SynthesizeScrollGestureParams
WithPreventFling prevent fling (default: true).
func (SynthesizeScrollGestureParams) WithRepeatCount ¶
func (p SynthesizeScrollGestureParams) WithRepeatCount(repeatCount int64) *SynthesizeScrollGestureParams
WithRepeatCount the number of times to repeat the gesture (default: 0).
func (SynthesizeScrollGestureParams) WithRepeatDelayMs ¶
func (p SynthesizeScrollGestureParams) WithRepeatDelayMs(repeatDelayMs int64) *SynthesizeScrollGestureParams
WithRepeatDelayMs the number of milliseconds delay between each repeat. (default: 250).
func (SynthesizeScrollGestureParams) WithSpeed ¶
func (p SynthesizeScrollGestureParams) WithSpeed(speed int64) *SynthesizeScrollGestureParams
WithSpeed swipe speed in pixels per second (default: 800).
func (SynthesizeScrollGestureParams) WithXDistance ¶
func (p SynthesizeScrollGestureParams) WithXDistance(xDistance float64) *SynthesizeScrollGestureParams
WithXDistance the distance to scroll along the X axis (positive to scroll left).
func (SynthesizeScrollGestureParams) WithXOverscroll ¶
func (p SynthesizeScrollGestureParams) WithXOverscroll(xOverscroll float64) *SynthesizeScrollGestureParams
WithXOverscroll the number of additional pixels to scroll back along the X axis, in addition to the given distance.
func (SynthesizeScrollGestureParams) WithYDistance ¶
func (p SynthesizeScrollGestureParams) WithYDistance(yDistance float64) *SynthesizeScrollGestureParams
WithYDistance the distance to scroll along the Y axis (positive to scroll up).
func (SynthesizeScrollGestureParams) WithYOverscroll ¶
func (p SynthesizeScrollGestureParams) WithYOverscroll(yOverscroll float64) *SynthesizeScrollGestureParams
WithYOverscroll the number of additional pixels to scroll back along the Y axis, in addition to the given distance.
type SynthesizeTapGestureParams ¶
type SynthesizeTapGestureParams struct { X float64 `json:"x"` // X coordinate of the start of the gesture in CSS pixels. Y float64 `json:"y"` // Y coordinate of the start of the gesture in CSS pixels. Duration int64 `json:"duration,omitempty"` // Duration between touchdown and touchup events in ms (default: 50). TapCount int64 `json:"tapCount,omitempty"` // Number of times to perform the tap (e.g. 2 for double tap, default: 1). GestureSourceType GestureType `json:"gestureSourceType,omitempty"` // Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). }
SynthesizeTapGestureParams synthesizes a tap gesture over a time period by issuing appropriate touch events.
func SynthesizeTapGesture ¶
func SynthesizeTapGesture(x float64, y float64) *SynthesizeTapGestureParams
SynthesizeTapGesture synthesizes a tap gesture over a time period by issuing appropriate touch events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeTapGesture
parameters:
x - X coordinate of the start of the gesture in CSS pixels. y - Y coordinate of the start of the gesture in CSS pixels.
func (*SynthesizeTapGestureParams) Do ¶
func (p *SynthesizeTapGestureParams) Do(ctx context.Context) (err error)
Do executes Input.synthesizeTapGesture against the provided context.
func (SynthesizeTapGestureParams) MarshalEasyJSON ¶
func (v SynthesizeTapGestureParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SynthesizeTapGestureParams) MarshalJSON ¶
func (v SynthesizeTapGestureParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SynthesizeTapGestureParams) UnmarshalEasyJSON ¶
func (v *SynthesizeTapGestureParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SynthesizeTapGestureParams) UnmarshalJSON ¶
func (v *SynthesizeTapGestureParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (SynthesizeTapGestureParams) WithDuration ¶
func (p SynthesizeTapGestureParams) WithDuration(duration int64) *SynthesizeTapGestureParams
WithDuration duration between touchdown and touchup events in ms (default: 50).
func (SynthesizeTapGestureParams) WithGestureSourceType ¶
func (p SynthesizeTapGestureParams) WithGestureSourceType(gestureSourceType GestureType) *SynthesizeTapGestureParams
WithGestureSourceType which type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
func (SynthesizeTapGestureParams) WithTapCount ¶
func (p SynthesizeTapGestureParams) WithTapCount(tapCount int64) *SynthesizeTapGestureParams
WithTapCount number of times to perform the tap (e.g. 2 for double tap, default: 1).
type TimeSinceEpoch ¶
TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TimeSinceEpoch
func (TimeSinceEpoch) MarshalEasyJSON ¶
func (t TimeSinceEpoch) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (TimeSinceEpoch) MarshalJSON ¶
func (t TimeSinceEpoch) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (TimeSinceEpoch) Time ¶
func (t TimeSinceEpoch) Time() time.Time
Time returns the TimeSinceEpoch as time.Time value.
func (*TimeSinceEpoch) UnmarshalEasyJSON ¶
func (t *TimeSinceEpoch) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*TimeSinceEpoch) UnmarshalJSON ¶
func (t *TimeSinceEpoch) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type TouchPoint ¶
type TouchPoint struct { X float64 `json:"x"` // X coordinate of the event relative to the main frame's viewport in CSS pixels. Y float64 `json:"y"` // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. RadiusX float64 `json:"radiusX,omitempty"` // X radius of the touch area (default: 1.0). RadiusY float64 `json:"radiusY,omitempty"` // Y radius of the touch area (default: 1.0). RotationAngle float64 `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0). Force float64 `json:"force,omitempty"` // Force (default: 1.0). ID float64 `json:"id,omitempty"` // Identifier used to track touch sources between events, must be unique within an event. }
TouchPoint [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-TouchPoint
func (TouchPoint) MarshalEasyJSON ¶
func (v TouchPoint) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (TouchPoint) MarshalJSON ¶
func (v TouchPoint) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*TouchPoint) UnmarshalEasyJSON ¶
func (v *TouchPoint) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*TouchPoint) UnmarshalJSON ¶
func (v *TouchPoint) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type TouchType ¶
type TouchType string
TouchType type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-type
const ( TouchStart TouchType = "touchStart" TouchEnd TouchType = "touchEnd" TouchMove TouchType = "touchMove" TouchCancel TouchType = "touchCancel" )
TouchType values.
func (TouchType) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (TouchType) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*TouchType) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*TouchType) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.