Commit b59142f
committed
fix: React/Vue/Playwright locator detection for Locator objects
Similar to the Puppeteer fix, the Playwright helper was checking
locator.react/vue/pw directly, but when called from findClickable,
the locator is wrapped in a Locator object which stores these
properties in locator.locator.react/vue/pw instead.
This commit:
1. Updates findElements to check for React/Vue/PW locators in multiple ways:
- locator.type === 'react'/'vue'/'pw' (Locator object)
- locator.locator?.react/vue/pw (nested locator)
- locator.react/vue/pw (raw object)
2. Updates findReact, findVue, and findByPlaywrightLocator to handle
both Locator objects and raw locator objects by checking for
locator.locator property first
Fixes: All React and Playwright locator tests now passing
Test results: 40/41 passing (98% pass rate, 3 skipped)
The one remaining failure is an error message format test that expects
'found' in the error message, but Playwright throws TimeoutError instead
of ElementNotFound. This is expected Playwright behavior.1 parent f99b964 commit b59142f
File tree
2 files changed
+25
-11
lines changed- lib/helper
- extras
2 files changed
+25
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4117 | 4117 | | |
4118 | 4118 | | |
4119 | 4119 | | |
4120 | | - | |
4121 | | - | |
4122 | | - | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
4123 | 4128 | | |
4124 | 4129 | | |
4125 | 4130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
6 | | - | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
17 | | - | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
25 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| |||
0 commit comments