testing - Testcafe 初始设置
问题描述
我得到错误Safari can't open the page "https://localhost:52169/browser/connect/r5cJvcm" because Safari can't establish a secure connection to the server "localhost"
当我尝试执行这个
testcafe safari TestFile2.js --hostname localhost
上面的命令确实适用于 chrome 但是如果我尝试执行而不指定--hostname localhost
它会抛出错误ERR_CONNECTION_TIMED_OUT
。
如何正确完成初始设置以执行 testcafe 测试
是的,我需要在连接到 VPN 时执行测试
我确实尝试在 System Preferences -> Security & Privacy -> Privacy -> Automation and screenrecording 中启用 TestCafe 浏览器工具。但这并没有帮助。
解决方案
在--hostname
VPN 连接的情况下需要指定选项。它应该适用于所有浏览器。有关详细信息,请参阅以下线程:https ://stackoverflow.com/a/56219385/10448174 。
推荐阅读
- android-studio - AndroidStudio::Flutter::如何在两个主文件之间切换
- angular - 无法从 Angular 中的表中获取点击记录的 ID
- unity3d - unity scroll view 项目重叠
- hyperledger-fabric - 超级账本结构:传输:身份验证握手失败:x509:通道创建证书
- c# - TimeZoneInfo.GetSystemTimeZones().Count 为统一 android 应用程序提供 0
- apache-spark - Pyspark 中从字符串到日期时间(yyyy-mm-dd hh:mm:ss)的转换
- android - Xamarin java.lang.UnsatisfiedLinkError:没有找到 void crc64690a6026da756c39.MainApplication.n_onCreate() 的实现
- c# - 错误'集合已修改;枚举操作可能无法执行。遍历字典和删除字典条目时
- javascript - Angular:有一种方法可以与指令中的二级子组件交互吗?
- hadoop - 在长期运行的纱线应用程序中重新生成委托令牌