Skip to content

Conversation

timwy6
Copy link
Contributor

@timwy6 timwy6 commented Aug 14, 2025

This PR improves webview context switching by ensuring proxyWebViewActive is set correctly. This enables UIA2 to properly proxy webview commands to ChromeDriver on Android, while allowing XCUITest to handle both webview and native commands on iOS.

It also adds an “avoid proxy” list (referenced from the Appium Flutter Driver repo) to better handle specific commands when in a webview context.

The changes have been tested thoroughly with Flutter, native, and webview contexts — including multiple context switches on both iOS and Android — with no issues observed.

This addresses the issue here: #118

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables proper webview context handling and command proxying in the Appium Flutter Driver. It introduces context switching logic that determines when commands should be proxied to the underlying drivers (UIA2/XCUITest) versus handled natively, specifically for webview contexts.

  • Adds webview context detection and proxying logic with proper state management
  • Implements an "avoid proxy" list to handle specific commands that shouldn't be proxied in webview contexts
  • Introduces proper proxy state management for webview vs native contexts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@saikrishna321
Copy link
Member

@timwy6 Can you please fix linting

@saikrishna321
Copy link
Member

@mykola-mokhnach Thoughts?

@saikrishna321
Copy link
Member

@timwy6 can you please add e2e test

@timwy6 timwy6 force-pushed the feat/webview_context branch from 81bb019 to 6a9d0c2 Compare August 18, 2025 01:08
@timwy6
Copy link
Contributor Author

timwy6 commented Aug 18, 2025

Hi @saikrishna321 ,
I've updated the changes based on the Copilot review, fixed linting, and added E2E test scenarios. Please review when you have a chance, and feel free to suggest any additional changes or test scenarios.
Thank you!

@saikrishna321 saikrishna321 merged commit 628bf35 into AppiumTestDistribution:main Aug 18, 2025
6 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 18, 2025
## [1.3.0](v1.2.0...v1.3.0) (2025-08-18)

### Features

* enable webview context handling and command proxying in driver ([#131](#131)) ([628bf35](628bf35))
Copy link
Contributor

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants