是否可以使用TestCafe访问ShadowDom中包含的iframe?
我尝试过使用组合选择器,就像我可以访问普通的ShadowDOM元素一样,但无法让iFrame工作。
出现的错误消息是1) The iframe in which the test is currently operating does not exist anymore.
this.iFrame = $(()=> document.querySelector('body> div:nth-child(3)')。shadowRoot.querySelector('div> iframe'))
感谢您使用TestCafe。尚不支持切换到位于影子根目录中的iframe。我在TestCafe存储库中创建了一个关于它的功能建议:https://github.com/DevExpress/testcafe/issues/3673。您可以使用它来跟踪我们实现此功能的进度。