How to Move the Mouse Pointer and Click With Selenium Webdriver JavaScript

How to move mouse pointer to element in Selenium with nodejs

Try ActionSequence.mouseMove? Other commands (mouseUp, mouseDown) you can find in https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/actions_exports_ActionSequence.html too

driver.actions().mouseMove(element).mouseUp().mouseDown().pe‌​rform()

or

driver.actions().mouseMove(element).click().perform()

Move physical mouse pointer in selenium and c#

Answering From Java Perspective

No you can't show the mouse pointer moving and performing the task using the Actions Class.

The Java Docs of Actions Class clearly mentions that while Automation through Selenium you should use Actions class only for emulating complex user gestures and but not for using the Keyboard or Mouse directly.

To interact with the the Keyboard or Mouse directly i.e. to generate native system input events for the purposes of Test Automation where control of the mouse and keyboard is needed you should use the Robot Class instead.

You can find a detailed discussion in Why do we need Robot class when we have Actions class in selenium



Related Topics



Leave a reply



Submit