From 3337a647a4d5a94e377cd7c834a5065bf47f34ff Mon Sep 17 00:00:00 2001 From: Aleksey Popov Date: Tue, 12 Jul 2022 18:36:46 +0400 Subject: [PATCH] test --- src/client/core/utils/dom.js | 2 +- .../functional/fixtures/api/es-next/iframe-switching/test.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/core/utils/dom.js b/src/client/core/utils/dom.js index d9935445785..2b9ff7a419c 100644 --- a/src/client/core/utils/dom.js +++ b/src/client/core/utils/dom.js @@ -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)); }); diff --git a/test/functional/fixtures/api/es-next/iframe-switching/test.js b/test/functional/fixtures/api/es-next/iframe-switching/test.js index e774546fdbf..e6f1e7eef5f 100644 --- a/test/functional/fixtures/api/es-next/iframe-switching/test.js +++ b/test/functional/fixtures/api/es-next/iframe-switching/test.js @@ -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 () {