testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

Switching to iFrame hangs indefinitely in versions after 1.12.0

Open Matenko opened this issue 4 years ago • 4 comments

What is your Scenario?

We use Zendesk for a number of management accounts within our organization and use TestCafe to automate a large portion of tests and processes. The landing page for Zendesk doesn't appear to work with switching iFrames after 1.12.0 of TestCafe. It's only a portion of iFrames so this is limited to a few important pages.

The provided example is using a demo account with fresh credentials.

This has worked in version 1.12.0 and a workaround is grabbing the href of the iframe, navigating to that page, and logging in through there but other iFrames also appear to have some odd behavior that wasn't occurring in 1.12.0.

What is the Current behavior?

Switching to the first iFrame causes the framework to hang indefinitely.

What is the Expected behavior?

The context switches and the test proceeds to log in.

What is your public website URL? (or attach your complete example)

https://indigovsupport.zendesk.com/

What is your TestCafe test code?

import {Selector} from 'testcafe'

fixture`Example Login Issue`.page('https://indigovsupport.zendesk.com/')

test('Login', async t => {
    await t
        .switchToIframe(Selector('iframe').nth(0))
        .typeText('#user_email', '[email protected]')
        .typeText('#user_password', '70sgM3R2!OuuJSzJF@NB*e')
        .click('#sign-in-submit-button')
        .switchToMainWindow()
        .expect(Selector('a[data-target-id="customers-tab"]').exists)
        .ok({timeout:6000})
})

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Install TestCafe version 1.18.3.
  2. Run the provided example in Chrome.

TestCafe version

1.18.3

Node.js version

No response

Command-line arguments

npx testcafe chrome example.ts

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

Matenko avatar Feb 08 '22 04:02 Matenko

Thank you for the sharing the test code snippet. We reproduced the issue and will update this thread once we have news.

dositec avatar Feb 09 '22 09:02 dositec

Hello @dositec

The Oops, this help center no longer exists message is displayed on the tested page. image

Could you please update the example to make it work?

miherlosev avatar Dec 13 '22 08:12 miherlosev

The example endpoint provider no longer uses the problematic iframes for the login page so this is no longer reproducible within the same context. If I can find another example out in the wild I'll update this issue with new repro steps or if this is closed out, file a new issue and link it.

Matenko avatar Dec 13 '22 17:12 Matenko

Okay, I will close this issue. If you can create another example, please file a new issue with the steps to reproduce it.

miherlosev avatar Dec 14 '22 07:12 miherlosev