Skip to content

How can I show the Mouse Cursor motion in Serenity-JS #2722

Discussion options

You must be logged in to vote

Web integration tools like WebdriverIO, Playwright, and Selenium don't take control of your mouse cursor or other input devices. Instead, they communicate with the browser, instructing it to perform a specific mouse or keyboard interaction. Because of that, you don't see the cursor move, even though the interaction is performed.

To have something that indicates the cursor's position, you need to make your web integration tool inject some JavaScript into the page to create a DOM element that follows the mouse cursor. This approach was originally proposed in this StackOverflow thread.

With Serenity/JS, you can accomplish that using an interaction to ExecuteScript.sync(...)

import { ExecuteS…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by jan-molak
Comment options

You must be logged in to vote
1 reply
@jan-molak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants