Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey28 committed Jul 12, 2022
1 parent 1e6384f commit 3337a64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/core/utils/dom.js
Expand Up @@ -397,7 +397,7 @@ export function findIframeByWindow (iframeWindow) {
if (elem.tagName === 'IFRAME')
iframes.push(elem);

if (elem.shadowRoot)
if (browserUtils.isIE && elem.shadowRoot)
elem.shadowRoot.querySelectorAll('iframe').forEach(iframe => iframes.push(iframe));
});

Expand Down
Expand Up @@ -24,7 +24,10 @@ describe('[API] t.switchToIframe(), t.switchToMainWindow()', function () {
});

it('Should switch context between a shadow iframe and the main window', function () {
return runTests('./testcafe-fixtures/iframe-switching-test.js', 'Click on an element in a shadow iframe and return to the main window', DEFAULT_RUN_OPTIONS);
return runTests('./testcafe-fixtures/iframe-switching-test.js', 'Click on an element in a shadow iframe and return to the main window', {
...DEFAULT_RUN_OPTIONS,
only: 'chrome',
});
});

it('Should wait while a target iframe is loaded', function () {
Expand Down

0 comments on commit 3337a64

Please sign in to comment.