Provide a way to get a component key
alexeyBityukov opened this issue · 4 comments
I have several div with installed keys. Is it possible to get a div by the value of key?
No it is not possible to do that, you can instead do something like this
<div key={x} id={x} ></div>
and select using the ReactSelector('div').withProps('id', x);
Hi @alexBityuckov,
Unfortunately, it's impossible to get a component key
now. I'll investigate the possibility to add this info in the future releases.
Is there any eta on this feature coming to live? @kirovboris Would be very helpful in our project. :)
I've just published testcafe-react-selectors@3.1.0
.
https://github.com/DevExpress/testcafe-react-selectors#selecting-components-by-the-component-key
Since 3.0.1
the getReact
method provides a component key.
https://github.com/DevExpress/testcafe-react-selectors#obtaining-components-props-and-state