Commit fb0d87e
fix(appium): resolve "Unsupported helper type: unknown" in fillField
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>1 parent 6c7e718 commit fb0d87e
5 files changed
Lines changed: 31 additions & 9 deletions
File tree
- .github/workflows
- lib
- element
- helper
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
| 185 | + | |
| 186 | + | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | | - | |
| 1267 | + | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | 1270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
39 | 55 | | |
40 | 56 | | |
41 | 57 | | |
| |||
0 commit comments