Commit f99b964
committed
fix: React selector detection in findElements for Locator objects
The findElements function was checking locator.react directly, but when
called from findClickable, the locator is wrapped in a Locator object
which stores the react property in locator.locator.react instead.
This commit:
1. Updates findElements to check for React locators in multiple ways:
- locator.type === 'react' (Locator object)
- locator.locator?.react (Locator object with nested locator)
- locator.react (raw locator object)
2. Updates findReactElements to handle both Locator objects and raw
locator objects by checking for locator.locator property first
Fixes: React selector tests now passing
Test results: 42/44 passing (100% of non-skipped tests)1 parent f6ec8a9 commit f99b964
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2872 | 2872 | | |
2873 | 2873 | | |
2874 | 2874 | | |
2875 | | - | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
2876 | 2879 | | |
2877 | 2880 | | |
2878 | 2881 | | |
| |||
3389 | 3392 | | |
3390 | 3393 | | |
3391 | 3394 | | |
3392 | | - | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
3393 | 3398 | | |
3394 | 3399 | | |
3395 | 3400 | | |
| |||
0 commit comments