CodeceptJS
CodeceptJS copied to clipboard
React locator types are throwing an error when passing props/state
What are you trying to achieve?
When using the React locator examples from the docs, TypeScript is throwing an error at me.
What do you get instead?
Provide console output if related. Use
--verbosemode for more details.
Provide test source code if related
I.click({ react: 'Tab', props: { title: 'Click Me!' }});
Details
- CodeceptJS version:
^3.0.7 - NodeJS Version: v16.5.0
- Operating System: macOS
- puppeteer
Confirming, same issue with typings
I'm having similar issue with playwright. It's a great feature to catch react components, I hope it's fixed ASAP
Following error is taken: page.waitForSelector: Unknown engine "react" while parsing selector react=v
I overcame this by casting the locator to CodeceptJS.LocatorOrString, see https://github.com/codeceptjs/CodeceptJS/issues/3297