1

My issue is related to this question Disable physical mouse and keyboard in selenium but I didn't see an answer for this question.

tests are being ran by Java + Selenium + Chrome on the same user's machine (we don't have server to run the automation tests on, due to employer cost reasons). I have dual monitors so I ran the automation on one of the monitors, and tried to do something else on the other monitor but selenium kept taking away my physical mouse.

Any help/guidance or info on how to resolve this issue is appreciated.

  • How are you running the tests? – Brian Jan 31 at 21:21
2

Selenium does not "take mouse from you" it can however switch focus to a browser window if certain conditions happens (usually when new tab opens). To avoid this i suggest you run your tests in headless mode. To run your tests in this mode you need to set chrome options as following:

  chromeOptions = new ChromeOptions();
  chromeOptions.addArguments("--headless");

Of course this means you will not see the actual test being run in a browser window, instead a command line window will open, which you can minimize and continue your work.

| improve this answer | |

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.