Testing 使用带switchToIframe的Testcafe测试chrome扩展

Testing 使用带switchToIframe的Testcafe测试chrome扩展,testing,iframe,google-chrome-extension,automated-tests,testcafe,Testing,Iframe,Google Chrome Extension,Automated Tests,Testcafe,目前,我在chrome中的testcafe上安装了一个扩展并运行:testcafe-chrome:userProfile-test.js 我的扩展中的content\u脚本插入一个iframe,指向web\u可访问的资源index.html资产。但是,当我使用t.switchToIframetestcafe切换到iframe上下文时,返回“您要切换到的iframe的内容未加载” 从我所看到的情况来看,testcafe hammerhead在采用chrome扩展名://[PACKAGE ID]/[

目前,我在chrome中的testcafe上安装了一个扩展并运行:
testcafe-chrome:userProfile-test.js

我的扩展中的
content\u脚本
插入一个iframe,指向
web\u可访问的资源
index.html资产。但是,当我使用
t.switchToIframe
testcafe切换到iframe上下文时,返回“您要切换到的iframe的内容未加载”

从我所看到的情况来看,testcafe hammerhead在采用
chrome扩展名://[PACKAGE ID]/[PATH])
格式时似乎没有重写iframe src,因此我尝试将url更改为指向url,即localhost:8080/index.html,但这也不起作用

如果我创建一个html文件,使用js文件注入iframe,我就能够运行测试并与iframe交互。因此,我认为这与内容脚本如何运行以及它们如何将内容注入DOM有关

有没有其他人遇到过这个问题/对如何编写扩展测试有什么更好的建议


谢谢

不幸的是,TestCafe不支持浏览器扩展测试。TestCafe是为跨浏览器HTML5Web应用程序测试而设计的,因此需要进行大量改进,以涵盖特定于浏览器的扩展API

我建议您在存储库中创建一个问题,并向其中添加+1。如果它收到足够的选票,我们可以考虑它的实施。