Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to IFrame: TypeError: Cannot call a class as a function #3681

Closed
AlexSkorkin opened this issue Apr 11, 2019 · 3 comments
Closed

Switch to IFrame: TypeError: Cannot call a class as a function #3681

AlexSkorkin opened this issue Apr 11, 2019 · 3 comments
Assignees
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot.

Comments

@AlexSkorkin
Copy link
Collaborator

A strange error appears during switching to an iframe if this iframe is invisible.
image

URL: https://demos.devexpress.com/ASPxSpreadsheetDemos/Features/DocumentManagement.aspx

Test:

import { Selector } from 'testcafe';

fixture `https://demos.devexpress.com/ASPxSpreadsheetDemos/Features/DocumentManagement.aspx`
    .page `https://demos.devexpress.com/ASPxSpreadsheetDemos/Features/DocumentManagement.aspx`;

test('New Test', async t => {
    await t
        .switchToIframe(Selector('#ContentHolder_Spreadsheet_IT'));
});
@helen-dikareva
Copy link
Collaborator

This problem can be reproduced with only testcafe open source

@helen-dikareva helen-dikareva self-assigned this Apr 12, 2019
@helen-dikareva
Copy link
Collaborator

Simple fix: here should be

  return getExecuteSelectorResult(selector, commandSelectorTimeout, null,
            fn => new iframeErrorCtors.NotFoundError(fn), () => new iframeErrorCtors.IsInvisibleError(), this.statusBar)

But of course a test is required.

@lock
Copy link

lock bot commented Apr 25, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Apr 25, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…3682)

* fix invisible iframe error issue(closes DevExpress#3681)

* move test

* correct crazy numbers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot.
Projects
None yet
Development

No branches or pull requests

3 participants