在Selenium中的单个任务之间在无头和无头之间切换

在Selenium中的单个任务之间在无头和无头之间切换

问题描述:

在Selenium中,有什么方法可以从无头切换到前头吗?例如,我正在无头运行一些工作流,但是在中间,我希望用户能够按一个按钮来查看实际的浏览器窗口是什么样子.我该怎么办?

Is there any way to switch from headless to headed in the middle of a task in Selenium? For example, I'm running some workflow headless, but in the middle I want the user to be able to push a button to see what the actual browser window looks like. How do I do that?

不可能.

但是可以从屏幕上隐藏浏览器窗口:):

But it is possible to hide browser window from the screen :) :

driver.Manage().Window.Position =new Point(-2000, 0);