Interface Mouse

All Known Implementing Classes:
Session

public interface Mouse
Interface representing basic mouse operations.
  • Method Summary

    Modifier and Type Method Description
    default Session click​(java.lang.String selector)
    Click on the specified element.
    default Session click​(java.lang.String selector, java.lang.Object... args)
    Click on the specified element.
    Session getThis()  
    default Session move​(double x, double y)
    Dispatches a mousemove event.
  • Method Details

    • click

      default Session click​(java.lang.String selector)
      Click on the specified element. There are some preconditions for an element to be clicked. The element must be visible and it must have a height and width greater then 0.
      Parameters:
      selector - css or xpath selector
      Returns:
      this
    • click

      default Session click​(java.lang.String selector, java.lang.Object... args)
      Click on the specified element. There are some preconditions for an element to be clicked. The element must be visible and it must have a height and width greater then 0.
      Parameters:
      selector - css or xpath selector
      args - format string
      Returns:
      this
    • move

      default Session move​(double x, double y)
      Dispatches a mousemove event.
      Parameters:
      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.
      Returns:
      this
    • getThis

      Session getThis()