Testing 我可以使用嵌入式iframe吗?

Testing 我可以使用嵌入式iframe吗?,testing,iframe,automated-tests,e2e-testing,testcafe,Testing,Iframe,Automated Tests,E2e Testing,Testcafe,我有一个复杂的页面结构,其中一个iframe(#dialogFrameContent)嵌入到另一个iframe(#migration iframe)中 我正在使用wait t t.switchToIframe(“#dialogFrameContent”)但我有以下错误: The specified selector does not match any element in the DOM tree. | Selector('#dialogFrameContent') 这种

我有一个复杂的页面结构,其中一个iframe(#dialogFrameContent)嵌入到另一个iframe(#migration iframe)中

我正在使用
wait t t.switchToIframe(“#dialogFrameContent”)
但我有以下错误:

The specified selector does not match any element in the DOM tree.

         | Selector('#dialogFrameContent')

这种结构可用于testcafe吗?

是的,您可以在iframe中嵌入iframe。甚至可以将iframe嵌入iframe中的iframe中的iframe中。然而,这可能是一个性能问题。因此,我不建议这样做。

是的,TestCafe允许您使用嵌入式iframe,但您需要切换到每个父iframe

等待t
.switchToIframe(“#迁移iframe”)
.switchToIframe(“#dialogFrameContent”);

谢谢您的回答。我知道在iframe中嵌入iframe不是一个好主意,但我必须测试这种应用程序,以获得您的答案。我这样做了,但它不起作用。在这种情况下,我建议您使用最小的项目(或公共URL)和测试代码更新您的问题。