在执行期间,spectron 打开两个空白的终端窗口。第一个窗口是我想要的应用程序,其他窗口看起来像终端,里面没有任何东西。
目前我使用 focus() 聚焦到第一个窗口。
Github 问题链接:https://github.com/electron/spectron/issues/60
有谁知道发生了什么?是 ChromeDriver 的问题吗?
最佳答案
我遇到了同样的问题(只是为了澄清,仅在 Windows 上)。
显然,被引入为 workaround for Spectron on Windows :
The launcher binary written in go was frequently marked as a trojan or virus. A simple bat file should seen as more innocuous. See #93 for the problem as well as this bat file.
不幸的是,使用
.bat
的结果文件是 unavoidable spawning of these extra empty consoles .唯一已知的解决方法是使用
.focus()
就像你提到的。
关于electron - Spectron 在测试运行期间打开空终端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51972307/