DavertMik · GitHub

and others added 3 commits

May 28, 2026 00:47
Appium extends WebDriver but WebElement._detectHelperType only checked
constructor.name === 'WebDriver', so Appium helpers fell through to
'unknown'. fillRichEditor (added in #5527) wraps elements in WebElement
and calls evaluate(), which then threw on every fillField/appendField
call from Appium.
- WebElement now walks the prototype chain so any subclass of
  WebDriver/Playwright/Puppeteer is detected correctly.
- WebDriver.fillField skips fillRichEditor when isWeb === false, since
  rich-editor detection needs a DOM that doesn't exist in Appium native.
- Appium constructor: appiumV2 defaulted via `|| true` (always truthy);
  the v1-deprecation banner then fired on every default-config user.
  Fixed both: explicit `appiumV2: false` is now honored, and the banner
  only prints when the user opts into v1.
- Added regression tests for prototype-chain detection.
- Enabled the Android Appium workflow on pull_request to 4.x so the fix
  can be verified end-to-end via Sauce Labs from the PR.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The Sauce Labs Android emulator cold-start regularly exceeds
webdriverio's 2-minute connectionRetryTimeout default, producing
UND_ERR_HEADERS_TIMEOUT on `POST /wd/hub/session` and failing the
suite before any test runs. Bump the default for the Appium helper
to 5 minutes (mobile cloud grids are slow by nature).
Also re-enable Mocha's `this.retries(1)` in the Appium test suite —
already attempted but commented out — so a single transient Sauce
Labs hiccup no longer reds the whole job.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…layed
webdriverio v9 implements element.isDisplayed() by injecting a JS
visibility check via POST /execute/sync. Appium's native context has no
JS engine, so every call lands a "Method is not implemented" error in
the wdio logger before the existing _isDisplayedSafe catch swallows it.
Tests pass but logs are noisy with these false-positive errors during
seeElement, click, grabTextFrom, grabAttributeFrom, etc.
Override isDisplayed at the element level: short-circuit to true while
in native context so the failing request is never issued. Matches the
semantics _isDisplayedSafe already applies (treats "not implemented" as
displayed since we found the element). In web/webview context, defer
to the original implementation.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@DavertMik

@DavertMik

Read the original on github.com ↗