How to move the mouse in Selenium?

User picture User · Aug 23, 2015 · Viewed 33.5k times · Source

I'm trying to simulate mouse movement across a random curve line or parabola so it looks like the mouse actually moved across the page. With Selenium, I only know how to click on an element but that doesn't simulate a real user on some websites. I want the mouse to move along a random line that I calculate, then click the element.

Answer

Sait picture Sait · Aug 23, 2015

The docs say you can use move_by_offset(xoffset, yoffset) function.