1

I am trying to run an automated test that requires me to move the mouse around the page.

The problem is that whenever the person running the test moves the physical mouse while the test is running, it interferes with the mouse movements I am trying to do within Selenium+Chrome.

Is there a way to tell selenium to disable the physical mouse and / or the physical keyboard interactions while running a test?

By the way, tests are being ran by Java + Selenium + Chrome

Just to clarify, running this on a separate, dedicated machine without human intervention is not an option. This is something that is required to run on a machine that is being used for other purposes by a human (or any other species that can move a mouse!). Headless will probably be the way to go in the future, but not at the moment.

  • Why is it required to run tests on the machine used by other people at the same time? What scenario are you trying to simulate? – dzieciou Jul 24 at 19:41
  • 1
    @dzieciou I don't see how the scenario matters, but there is a web tool for generating tests, and the person who generates the test presses a button to see it running in his/her machine. Regardless of the scenario, the requirement is that it cannot run on a separate machine. Given that fact, I need to know if there is a way to tell selenium to ignore external, physical devices while running a test. – BlunT Jul 25 at 8:14
4

You should not be running tests on a machine used by user(s). Set up a dedicated computer or VM for testing and and use headless browser mode (more info here and here).

  • Appreciate the info, but that is not a viable option. I will update the question to clear that out. – BlunT Jul 24 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.