What is Mouse Actions in Selenium WebDriver?

Can anyone please explain the mouse actions in Selenium webdriver?

Mouse actions enable users to provide virtual device input action to the browser.

Some of the popular mouse actions are:

  • click()
  • click(WebElement webElement)
  • clickAndHold()
  • clickAndHold(WebElement onElement)
  • contextClick()
  • contextClick(WebElement onElement)
  • doubleClick()
  • doubleClick(WebElement onElement)
  • dragAndDrop(WebElement fromElement, WebElement toElement)
  • dragAndDropBy(WebElement fromElement, int xOffset, int yOffset)
  • moveByOffset(int xOffset, int yOffset)
  • moveToElement(WebElement toElement)
  • moveToElement(WebElement toElement, int xOffset, int yOffset)
  • release()
  • release(WebElement onElement)

Detailed info: https://artoftesting.com/handling-mouse-events-in-selenium

1 Like