3

I have an issue with using an expect statement inside a nested iframe on Google Sheets hanging the tests. (for testing content inside modals)

Here is the test I am trying to implement:

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();
})

But the expect will hang the tests, also adding

 await browser.switchToMainWindow();

after the expect statement doesn't help.

However, only clicking on the element and typing will work with

await browser.typeText('#email', 'name@email.com');
await browser.typeText('#password', 'mypassword');
await browser.click('#login-button');

Therefore entering iframes work, but expect statements do not, what can I do to overcome this issue ?

I am willing to help to solve this as fast as possible if this is a bug.

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47
Istvan Fulop
  • 141
  • 1
  • 8

1 Answers1

3

Thank you for your feedback, I've reproduced the problem and created an issue in our repository:

https://github.com/DevExpress/testcafe/issues/3422

You can use it to track the progress. I need some time to find its cause because Google Spreadsheets executes a lot of very complex scripts on the page.

Andrey Belym
  • 2,893
  • 8
  • 19