fix: handle disappearing iframes during screenshot preparation - #1328
Draft
DenisLevkovets wants to merge 1 commit into
Draft
fix: handle disappearing iframes during screenshot preparation#1328DenisLevkovets wants to merge 1 commit into
DenisLevkovets wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: handle disappearing iframes during screenshot preparation
Summary
Handle auxiliary iframes that disappear while
assertViewprepares or cleans up page animations.runInEachDisplayedIframecurrently callssession.$(iframe).isDisplayed()with a raw WebDriver element reference. Such an element has no selector. If it becomes stale during the visibility check, WDIO attempts to refetch it using an undefined selector, masking the original error withselector needs to be typeof string or function, but found: undefined. An iframe can also disappear between the visibility check andswitchToFrame.stale element reference/no such frameerrors during the visibility check or frame entry, with a warning and a reset to the top-level frame.finally.Validation
npm run build: passed.npm test: 3472 passing, 1 pending; type checking and lint passed.assertViewcases passed against existing screenshot references, withdisableAnimation: true,retry: 0, and no reference updates.The real-browser checks used an external temporary reproducer; they are not part of this PR's committed test suite. Full upstream e2e/browser-env suites and the original Storybook CI job were not run.
CLA
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=ru.