在TestCafe中使用expect内部嵌套iframe
我对在挂起测试的Google表单上的嵌套iframe中使用expect语句有一个问题。(用于测试模态内部的内容) 以下是我正在尝试实施的测试:在TestCafe中使用expect内部嵌套iframe,iframe,automated-tests,e2e-testing,testcafe,web-testing,Iframe,Automated Tests,E2e Testing,Testcafe,Web Testing,我对在挂起测试的Google表单上的嵌套iframe中使用expect语句有一个问题。(用于测试模态内部的内容) 以下是我正在尝试实施的测试: const modaldialogFrame = Selector( '.modal-dialog-content.script-app-contents' ).find('iframe'); const sandboxFrame = Selector('#sandboxFrame'); const userHtmlFrame = Selector(
const modaldialogFrame = Selector(
'.modal-dialog-content.script-app-contents'
).find('iframe');
const sandboxFrame = Selector('#sandboxFrame');
const userHtmlFrame = Selector('#userHtmlFrame');
test('Check for email input', async browser => {
await browser.switchToIframe(modaldialogFrame);
await browser.switchToIframe(sandboxFrame);
await browser.switchToIframe(userHtmlFrame);
await browser.expect(Selector('#email').exists).ok();
})
但expect将挂起测试,并增加
await browser.switchToMainWindow();
expect语句之后没有帮助
但是,只有单击元素并键入才能使用
await browser.typeText('#email', 'name@email.com');
await browser.typeText('#password', 'mypassword');
await browser.click('#login-button');
因此,输入iframe是有效的,但expect语句不起作用,我能做些什么来克服这个问题
如果这是一个bug,我愿意帮助您尽快解决此问题。感谢您的反馈,我已经重现了此问题,并在我们的存储库中创建了一个问题: 您可以使用它来跟踪进度。我需要一些时间来找出原因,因为谷歌电子表格在页面上执行了很多非常复杂的脚本