Skip to content

fix: dispatch abstract widget methods through platform overrides - #2451

Merged
mykola-mokhnach merged 1 commit into
appium:masterfrom
dlowzzxx:fix/abstract-widget-methods-2372
Oct 7, 2026
Merged

mykola-mokhnach merged 1 commit into
appium:masterfrom
dlowzzxx:fix/abstract-widget-methods-2372

Conversation

@dlowzzxx

@dlowzzxx dlowzzxx commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Change list

Fixes #2372. An @OverrideWidget field declared as an abstract Widget subclass now dispatches its abstract methods to the selected Android, iOS, or HTML widget instead of throwing AbstractMethodError. The enhanced proxy intercepts those methods; an unhandled abstract invocation retains its original error behavior.

Rebased on master at 0f6e5c1d. The production fix is unchanged. The regression test now imports Appium's vendored FindBy and PageFactory, matching the current upstream API.

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details and validation

Validation on Windows with Temurin 21.0.12.1 and repository Gradle 9.8.0:

  • With the two production files restored from current master, the four widget regression cases fail with the reported AbstractMethodError. On the rebased fix, all 27 focused widget/proxy tests pass, including Android, iOS, HTML and Android-webview stubs, single/list fields, and unhandled abstract fallback. These are repository unit tests using stub drivers.
  • clean build --continue runs 199 core tests (190 pass, nine golden-comparison assertions fail) and all 12 bridge tests pass. The same nine failed test methods also fail on current upstream production in a shared baseline augmented only with a separate Selenium-decorator regression. A pristine upstream-only suite was not run. The full local build is not green.
  • Assembly, main Checkstyle, E2E-source Checkstyle, bridge checks and JaCoCo reporting pass. Test Checkstyle reports the same five missing-Javadoc errors in untouched EmptyWebDriver and TestUtils files in that current-base comparison. git diff --check passes.

A process-local short temporary directory was needed to start Gradle in this Windows environment. No repository build settings were changed. Device/emulator/simulator E2E and the Selenium/JDK matrix were not run locally. Earlier hosted results belong to the previous head.

Hosted CI on this rebased head is separate: at 09:15 UTC on October 7, run 37595892063 had nine successful checks, two macOS E2E jobs in progress and one failing check. The JDK 17 snapshot job failed SeleniumBridgeTest.opensOneBiDiConnectionForRepeatedCalls (expected one connection, observed zero); this is a test failure, unlike the prior-head snapshot compile errors. No matching clean hosted baseline was obtained, so its cause is unresolved.

This change was AI-assisted with Codex. The validation and its limits are described above.

@mykola-mokhnach

Copy link
Copy Markdown
Contributor

@dlowzzxx Please rebase the PR with master

@dlowzzxx
dlowzzxx force-pushed the fix/abstract-widget-methods-2372 branch from 86ccb9a to c02b9ee Compare October 7, 2026 08:45
@dlowzzxx

dlowzzxx commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on 0f6e5c1d and updated the tests for Appium’s PageFactory/FindBy APIs. The four abstract-widget regressions fail on current upstream and pass here; all 27 focused widget/proxy tests pass. The description records the reproduced full-suite and Javadoc failures.

@mykola-mokhnach
mykola-mokhnach merged commit c5b4413 into appium:master Oct 7, 2026
13 of 14 checks passed
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.

AbstractMethodError for abstract Widget class - since migration to byte-buddy

2 participants