When I write automated tests and run them (on my PC) I can not work until the tests are finished, because for example if I am coding the focus will jump out of visual studio to
You can use Windows 10 Virtual Desktops. Check here how to use it: https://www.howtogeek.com/197625/how-to-use-virtual-desktops-in-windows-10/
Not only you can't prevent the WebdDiver
from taking the focus, you shouldn't do it. The WebdDiver
needs the focus on the browser in order to successfully interact with it. If you take the focus the WebdDiver
won't be able to perform actions like FindElement()
, Click()
or any other operation and the tests will fail.