Repository navigation
fix: skip snapshot when DOM capture fails (PER-8903) - #325
Open
rishigupta1599 wants to merge 1 commit into
Open
rishigupta1599 wants to merge 1 commit into
rishigupta1599 wants to merge 1 commit into
Conversation
… one (PER-8903) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Why
PER-8903: when DOM capture/serialization threw,
snapshot()logged at debug level and still posted a snapshot with a nulldomSnapshot. The test author saw an apparently successful snapshot (fail-open, CWE-754).What
WebDriverException/Exceptionduring DOM capture, log at error level and returnnull(same as other failure paths) without callingpostSnapshot. Public API unchanged.nullis returned and no/percy/snapshotrequest is made. They fail without the fix and pass with it.null.Related PRs
Open PRs #319 (PPLT-6242) and #312 touch DOM capture code. This diff only changes the two catch blocks in
snapshot(), so any conflict should be trivial.Verification
mvn test -Dtest=PercyDriverPathTest,PercyLogicTestinmaven:3.9-eclipse-temurin-11: 65 tests pass. The two updated tests fail on master without the fix.🤖 Generated with Claude Code
Summary by CodeRabbit