Unable to switch iframe
See original GitHub issueWhat is your Scenario?
I am attempting to switch to an iframe using TestCafe.
What is the Current behavior?
When attempting to switch to an iframe, TestCafe does not think that it has loaded and displays the following message:
“Content of the iframe in which the test is currently operating did not load.”
What is the Expected behavior?
TestCafe successfully switches to the iframe
What is your public website URL? (or attach your complete example)
https://www.terrific.ie/dealer/bradys-of-castleknock/finance/45784/13295
Note this vehicle may not be available at some point
What is your TestCafe test code?
import { Selector, t } from "testcafe";
fixture(`Quick Test`);
test
.page(`https://www.terrific.ie/dealer/bradys-of-castleknock/finance/45784/13295`)(
`Quick Test`,
async () => {
await t
.click(`.submit-outer`)
.expect(Selector(`.car-summary-box`).visible)
.ok()
.expect(Selector(`.cw-finance-plugin.plugin-loaded`).visible)
.ok()
.switchToIframe(`.cw-finance-plugin.plugin-loaded`)
.click(`.cw-checkmark`)
.debug();
});
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
- Run the attached code
TestCafe version
1.18.4
Node.js version
v14.19.0
Command-line arguments
testcafe chrome
Browser name(s) and version(s)
Chrome latest
Platform(s) and version(s)
No response
Other
This has been reproduced by Aleksey as per this stackoverflow question:
https://stackoverflow.com/questions/71528890/how-does-testcafe-decide-an-iframe-has-loaded/71558047
Issue Analytics
- State:
- Created a year ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Not able to switch to iframe using Selenium webdriver
Use Below code for handling iframe. WebElement iframe = driver.findElement(By.tagName("iframe")); driver.switchTo().frame(iframe); //Move ...
Read more >Unable to switch to frame which is inside an iframe
1.Use the following code to switch into the frame: driver.switchTo.frame(content); //now you have switched into the frame · 2.Then you need to ...
Read more >Issue with chrome driver not able to switch to frame #5401
There was a new bug in chromedriver that isn't waiting for content to load into the iframe before attempting to interact with it,...
Read more >Switch to Frame does not work - Katalon Community
“Switch to Frame” does not switch to the iFrame. I have verified that iFrame element exists but it failed to Switch to the...
Read more >SafariDriver fails to switch to frames/iframes? Not currently ...
The below change in switching to iframe in Safari worked perfectly for me. driver.switchTo().frame(driver.findElement(By.id("frame_name")) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We also have this issue, intermittently. In case it helps, try this test sample:
Hi @kacy-weakley,
I just tested your code in the latest version of TestCafe and see that the test is completed correctly. Please try the latest version on your side. As for the original issue described in this ticket, unfortunately, we cannot continue our research until we have a simple project illustrating the issue without third-party libraries.