Home Reference Source
public class | source

Mouse

Constructor Summary

Public Constructor
public

constructor(client: Chrome | CRIConnection | CDPSession | Object, keyboard: Keyboard)

Member Summary

Private Members
private

_button: 'none' | 'left' | 'right' | 'middle'

private

_client: *

private
private
private

Method Summary

Public Methods
public

async click(x: number, y: number, options: {delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=)

public

async down(options: {button?: "left"|"right"|"middle", clickCount?: number}=)

public

async move(x: number, y: number, options: {steps?: number}=)

public

async up(options: {button?: "left"|"right"|"middle", clickCount?: number}=)

Public Constructors

public constructor(client: Chrome | CRIConnection | CDPSession | Object, keyboard: Keyboard) source

Params:

NameTypeAttributeDescription
client Chrome | CRIConnection | CDPSession | Object
keyboard Keyboard
  • optional
  • nullable: true

Private Members

private _button: 'none' | 'left' | 'right' | 'middle' source

private _client: * source

private _keyboard: * source

private _x: number source

private _y: number source

Public Methods

public async click(x: number, y: number, options: {delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=) source

Params:

NameTypeAttributeDescription
x number
y number
options {delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=
  • nullable: false

public async down(options: {button?: "left"|"right"|"middle", clickCount?: number}=) source

Params:

NameTypeAttributeDescription
options {button?: "left"|"right"|"middle", clickCount?: number}=
  • nullable: false

public async move(x: number, y: number, options: {steps?: number}=) source

Params:

NameTypeAttributeDescription
x number
y number
options {steps?: number}=
  • nullable: false

public async up(options: {button?: "left"|"right"|"middle", clickCount?: number}=) source

Params:

NameTypeAttributeDescription
options {button?: "left"|"right"|"middle", clickCount?: number}=
  • nullable: false