Skip to content

test: [SDK-4333] fix Appium tests for Flutter Android#30

Merged
fadi-george merged 21 commits intomainfrom
fadi/sdk-4333-appium-tests-3
Apr 15, 2026
Merged

test: [SDK-4333] fix Appium tests for Flutter Android#30
fadi-george merged 21 commits intomainfrom
fadi/sdk-4333-appium-tests-3

Conversation

@fadi-george
Copy link
Copy Markdown
Contributor

@fadi-george fadi-george commented Apr 15, 2026

Description

Fix Appium E2E tests to pass on Flutter Android. Previously only iOS was working.

appium_android.mov

Details

Webview / IAM handling

  • Fixed IAM webview detection on Android by iterating getWindowHandles() within the WEBVIEW_* context, since Android's ChromeDriver caches old window handles across multiple IAMs
  • Extracted switchToWebViewContext() and switchToIAMWebView() helpers for cleaner platform-specific context switching
  • Simplified isWebViewVisible() for Android to just check for WEBVIEW context existence

Text input

  • Added typeInto() helper that calls el.click() before el.setValue() on Flutter Android, since setValue alone doesn't work without focus
  • Replaced all setValue calls across specs 04-10 with typeInto()
  • Updated loginUser() and addTag() in app.ts to use the shared helper

Scroll improvements

  • Changed scrollToEl scroll distance from small (20%) to normal (50%) so it can reach elements further down the page
  • Added a small nudge scroll when an element is found in the bottom 20% of the screen to avoid clipping

Platform-specific fixes

  • Fixed location spec to use UiAutomator text selectors for Android permission dialogs instead of iOS-only mobile: alert
  • Added getToggleState() helper using value on iOS and checked on Android
  • Android-specific pause after closing IAMs to let animations complete

Cleanup

  • Removed unnecessary ChromeDriver autodownload flags
  • Removed redundant try/catch blocks and logging

Made with Cursor

@fadi-george fadi-george requested a review from a team as a code owner April 15, 2026 18:15
Comment thread appium/tests/helpers/selectors.ts
Comment thread appium/tests/specs/02_push.spec.ts Outdated
Comment thread appium/tests/specs/12_activity.spec.ts
@fadi-george fadi-george force-pushed the fadi/sdk-4333-appium-tests-3 branch from 57844c9 to 7410cc7 Compare April 15, 2026 18:36
Comment thread appium/tests/specs/debug.spec.ts
@fadi-george fadi-george merged commit 3c535d9 into main Apr 15, 2026
@fadi-george fadi-george deleted the fadi/sdk-4333-appium-tests-3 branch April 15, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants