问题
I work with Selenium Webdriver in Java on the chromedriver and I try to display the cursor permanently while a test case is performed. I have tried the robot and the action class but without any succes. for Example i tried this:
Actions builder = new Actions(driver);
Action action = builder.moveToElement(logo).click().build();
action.perform();
In this case i can see the cursor but its not moving. Any help would be very appriciated.
回答1:
I've found a workaround for my problem. I use the autoit framework with the ff.au3 Library. For the library you need to install the mozrepl addon (Mozrepl wont be supported in FF Version 55 but it should be possible to find a solution for chrome browser and IE too). With that i can easily control the browser and show all the mouse moves. Furthermore it is no problem to integrate this in Selenium. Following some links to get you started.
Mozrepl
Thorsten Willert
autoit
EDIT: autoit just works on windows...
来源:https://stackoverflow.com/questions/46231617/try-to-make-the-mouse-cursor-visible-in-a-selenium-test-case