API Docs for: 0.0.6
Show:

FirefoxDriver.Commands.WebDriver.Interaction Class

Interaction related WebDriver endpoints see JsonWireProtocol

Methods

buttondown

(
  • sessionId
  • button
)

Click and hold the left mouse button (at the coordinates set by the last moveto command). Note that the next mouse-related command that should follow is buttonup. Any other mouse command (such as click or another call to buttondown) will yield undefined behaviour.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • button POST

    Which button, enum: {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified.

buttonup

(
  • sessionId
  • button
)

Releases the mouse button previously held (where the mouse is currently at). Must be called once for every buttondown command issued. See the note in click and buttondown about implications of out-of-order commands.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • button POST

    Which button, enum: {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified.

clickPage

(
  • sessionId
  • button
)

Click any mouse button (at the coordinates set by the last moveto command). Note that calling this command after calling buttondown and before calling button up (or any out-of-order interactions sequence) will yield undefined behaviour).

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • button POST

    Which button, enum: {LEFT = 0, MIDDLE = 1 , RIGHT = 2}. Defaults to the left mouse button if not specified.

doubleclickPage

(
  • sessionId
)

Double-clicks at the current mouse coordinates (set by moveto).

Parameters:

  • sessionId GET

    ID of the session to route the command to

doubletap

(
  • sessionId
)

Double tap on the touch screen using finger motion events.

Parameters:

  • sessionId GET

    ID of the session to route the command to

flick

(
  • sessionId
  • element
  • xoffset
  • yoffset
  • speed
)

Flick on the touch screen using finger motion events. This flickcommand starts at a particulat screen location.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • element POST

    ID of the element where the flick starts

  • xoffset POST

    The x offset in pixels to flick by

  • yoffset POST

    The y offset in pixels to flick by

  • speed POST

    The speed in pixels per seconds

longpress

(
  • sessionId
)

Long press on the touch screen using finger motion events.

Parameters:

  • sessionId GET

    ID of the session to route the command to

moveto

(
  • sessionId
  • element
  • xoffset
  • yoffset
)

Move the mouse by an offset of the specificed element. If no element is specified, the move is relative to the current mouse cursor. If an element is provided but no offset, the mouse will be moved to the center of the element. If the element is not visible, it will be scrolled into view.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • element POST

    Opaque ID assigned to the element to move to, as described in the WebElement JSON Object. If not specified or is null, the offset is relative to current position of the mouse.

  • xoffset POST

    X offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element.

  • yoffset POST

    Y offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element.

tap

(
  • sessionId
)

Single tap on the touch enabled device.

Parameters:

  • sessionId GET

    ID of the session to route the command to

touchdown

(
  • sessionId
  • x
  • y
)

Finger down on the screen.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • x POST

    X coordinate on the screen.

  • y POST

    Y coordinate on the screen.

touchmove

(
  • sessionId
  • x
  • y
)

Finger move on the screen.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • x POST

    X coordinate on the screen.

  • y POST

    Y coordinate on the screen.

touchscroll

(
  • sessionId
  • x
  • y
)

Scroll on the touch screen using finger based motion events. Use this command if you don't care where the scroll starts on the screen.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • x POST

    X coordinate on the screen.

  • y POST

    Y coordinate on the screen.

touchup

(
  • sessionId
  • x
  • y
)

Finger up on the screen.

Parameters:

  • sessionId GET

    ID of the session to route the command to

  • x POST

    X coordinate on the screen.

  • y POST

    Y coordinate on the screen.