Repository navigation
fix: skip the webview scan when switching to the native context - #1111
Merged
KazuCocoa merged 1 commit intoOct 20, 2026
Merged
Conversation
|
|
KazuCocoa
approved these changes
Oct 20, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 20, 2026
## [14.2.5](v14.2.4...v14.2.5) (2026-10-20) ### Bug Fixes * skip the webview scan when switching to the native context ([#1111](#1111)) ([78e796a](78e796a))
|
🎉 This PR is included in version 14.2.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
setContextinlib/commands/context/exports.tsrunsgetWebViewsMappingon every switch, including a switch back toNATIVE_APP. The native context is always in the list, and the native branch ofswitchContextnever reads the mapping. When a debuggable app's WebView is frozen in the background, its devtools socket accepts connections but never answers. Every scan then waits out the 2 s CDP timeout (CDP_REQ_TIMEOUT), so each switch back to native spends about 2 s in a scan it does not need.Skip the scan when the target is
NATIVE_APP, which xcuitest-driver'ssetContextalready does. Switches to webviews still scan and still throwNoSuchContextError. A new unit test covers the native switch; it fails on master and passes with this change. The commit cherry-picks cleanly onto beta.Validation: TypeScript build, lint, format:check and all 266 unit tests pass. No device or emulator end-to-end run.