How to work while Selenium tests are working

半腔热情 提交于 2020-01-11 12:08:11

问题


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 go to the web application under test viewed in web browser.

Is there a way to prevent Selenium driver from stealing focus?


回答1:


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.




回答2:


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/



来源:https://stackoverflow.com/questions/42366866/how-to-work-while-selenium-tests-are-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!