The standard SeleniumLibrary has some limited support for mouse actions. Mouse Down and Mouse Up are available and clicking on a specific position, but moving the mouse pointer while holding the mouse button is not supported.
This plugin will extend the SeleniumLibrary with extra mouse actions.
pip install robotframework-selenium-mouseextensions [--upgrade]
Add plugin information to the library import of SeleniumLibrary:
*** Settings ***
Library SeleniumLibrary plugins=SeleniumMouseExtensions
*** Settings ***
Suite Setup Open Browser about:blank browser=Chrome
Suite Teardown Close Browser
Library SeleniumLibrary plugins=SeleniumMouseExtensions
*** Test Cases ***
Test Kleki
Go To http://kleki.com
Sleep 5s
mouse down with offset //canvas 300 300
mouse move by offset 100 100
mouse up
mouse down with offset //canvas 300 400
mouse move by offset 100 -100
mouse up
Capture Page Screenshot
Sleep 5s
Keyword documentation here and if you need to create one for offline usage:
python -m robot.libdoc SeleniumLibrary::plugins=SeleniumMouseExtensions ./SeleniumLibraryWithMouseExtensions.html