Commit 801e06d
fix(appium): silence "Method is not implemented" log spam from isDisplayed
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>1 parent d30a101 commit 801e06d
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
337 | 355 | | |
338 | 356 | | |
339 | 357 | | |
| |||
0 commit comments