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

"Content of the iframe to which you are switching did not load" error; failure to proxy? #1531

Closed
haggholm opened this issue Mar 13, 2018 · 3 comments
Assignees
Labels
STATE: Auto-locked Issues that were automatically locked by the Lock bot

Comments

@haggholm
Copy link

As the title says, our test encounters the dreaded “Content of the iframe to which you are switching did not load”. It’s not at all clear why: running with the Chrome devtools open, no requests are failing or timing out. (The devtools show the websocket connection as forever “pending”, but forcing it to fail did not make TestCafe think the frame was done loading.)

If I may speculate, I notice that while the parent frame is proxied, the iframe URL is pointing straight to our server, not a proxy. Maybe this is the issue? If so, maybe it is in turn caused by the fact that our iframe src is set by Javascript, not hardcoded in the page? (And if so, maybe a simple MutationObserver on {attributeFilter:['src']} could help?)

Minimal repro:

import { Selector, t } from 'testcafe';

fixture `Login from login page Elk`
	.page `https://web.elk.co/login`;

test('Login with test account', async t => {
	await t
		.switchToMainWindow()
		.expect(Selector('iframe[id=Content]').exists).ok()
		.switchToIframe('#Content')
		.expect(Selector('#email').exists).ok()
		.expect(Selector('#password').exists).ok();
});
@LavrovArtem LavrovArtem self-assigned this Mar 14, 2018
@LavrovArtem
Copy link
Contributor

Hi @haggholm,
I've reproduced the problem and I will investigate it.

LavrovArtem added a commit to LavrovArtem/testcafe-hammerhead that referenced this issue Mar 14, 2018
@LavrovArtem
Copy link
Contributor

The fix is published in [email protected].

@lock
Copy link

lock bot commented Mar 28, 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 Issues that were automatically locked by the Lock bot label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked Issues that were automatically locked by the Lock bot
Projects
None yet
Development

No branches or pull requests

2 participants