This PR fixes the react selector behavior to support components that are
wrapped by the memo or forwardRef React builtin functions.
Previously these components couldn't be selected. This PR fixes that
behavior, enabling selecting those components.
Current behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> undefined
```
Fixed behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> <div id ="foo_component" />
```
|
||
|---|---|---|
| .. | ||
| .eslintrc.js | ||
| consoleApi.ts | ||
| DEPS.list | ||
| domUtils.ts | ||
| highlight.ts | ||
| injectedScript.ts | ||
| layoutSelectorUtils.ts | ||
| reactSelectorEngine.ts | ||
| README.md | ||
| recorder.ts | ||
| roleSelectorEngine.ts | ||
| roleUtils.ts | ||
| selectorEngine.ts | ||
| selectorEvaluator.ts | ||
| selectorGenerator.ts | ||
| selectorUtils.ts | ||
| utilityScript.ts | ||
| vueSelectorEngine.ts | ||
| xpathSelectorEngine.ts | ||
Injected
This directory contains helper sources which are injected into the page.
These sources are bundled with webpack to src/generated to be used as a compile-time source constants. See *.webpack.config.js for configs.