我无法单击测试咖啡厅中帧标签中的任何元素
我可以登录到我的应用程序,但是在此之后,由于所有元素都在帧标签内部,因此无法执行任何操作。 我尝试过的方法:
- selector(()=> {返回 document.getElementById(“ frameId”)。contentDocument.getElementById(“#ele”)});
- T.Switchto(“ frameid”); var ele = selector(“#ele”); 等待T.Click(Ele);
- browser.switchtoframe('#outerframe');
- const y =等待客户端功能(()=> window.location.pathname)()() 等待T.Switchtowindow(f => f.url.pathname === y)
请让我们知道任何解决方法以访问框架标签内的元素
I am able to login to my application but after that unable to perform any action because all elements are inside the frame tag.
The approaches I have tried:
- Selector(() =>{return
document.getElementById("frameId").contentDocument.getElementById("#ele")}); - t.switchTo("frameID");
var ele = Selector("#ele");
await t.click(ele); - browser.switchToFrame('#outerFrame');
- const y=await ClientFunction(() => window.location.pathname)()
await t.switchToWindow(f => f.url.pathname === y)
please do let us know any workaround to access the element inside the frame tag
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
单击iframe内部元素的正确方法是使用
switchtoiframe
函数。请参阅以下文章以获取更多详细信息: https:// testcafe。 io/documentation/402681/reference/test-api/testController/switchtoframeThe correct way to click an element inside an iframe is to use the
switchToIframe
function. Please refer to the following article for more details: https://testcafe.io/documentation/402681/reference/test-api/testcontroller/switchtoiframe