我正在查看https://github.com/DevExpress/testcafe-browser-provider-electron存储库。 要使用 testcafe 自动化 Electron 应用程序,我发现我们需要在 .testcafe-electron-rc 中提供“mainWindowUrl”。常规 Electron 应用程序中包含 index.html 文件,我可以将其传递给 mainWindowUrl,但我不确定我们应该为atom.exe/vscode.exe 等可执行 Electron 应用程序传递什么。
最佳答案
如果 TestCafe 找不到主窗口 URL,它将显示应用程序初始化期间打开的 URL 列表。您可以指定一个空字符串作为 mainWindowUrl
的值,等待 TestCafe 显示错误并使用显示列表中的链接。
关于testing - 对于像atom/vscode这样的可执行 Electron 应用程序,我们在.testcafe-electron-rc的 "mainWindowUrl"属性中指定什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58894709/