question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot use ReactSelector and withAttribute()

See original GitHub issue

Trying to call

ReactSelector("AutoComplete").withAttribute("name", "city")

does not work, get error The specified selector does not match any element in the DOM tree.

Selector("input").withAttribute("name", "city")

work fine

am I missing something?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dimaipcommented, Aug 10, 2017

Just came here to open the same feature request: would be really nice to have that withProps selector. Usecase: we have a set of presentational components that is used all over the page for different things (e.g. think of a Bootstrap-styled Button component). Now I would love to find some particular button based on its props, but currently that’s not possible.

2reactions
mulyovedcommented, Apr 28, 2017

@AlexanderMoskovkin you are right, adding input made it work

I was confused by the AutoComplete react props name=“city” which is forwarded to the input as attribute name=“city”

which raise I think nice feature request, be able to do something like that will be cool

ReactSelector("AutoComplete").withProps("name", "city")

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReactSelector can not access all components
It seems that there is a workaround in using ReactSelector('WithStyles(ForwardRef(TextField))') instead of ReactSelector('TextField') . I'm not ...
Read more >
Select Page Elements | Basic Guides | Guides | Docs
withAttribute, Finds an element with the specified attribute or attribute ... If TestCafe cannot find the corresponding node in the DOM, the test...
Read more >
testcafe/CHANGELOG.md
Use this metadata to build a logic that determines whether to run the current test. ... toString()` now equals `function fetch() { [native...
Read more >
testcafe | Yarn - Package Manager
In some environments, TestCafe cannot take screenshots when the test runs in a ... You can now use the withAttribute method to select...
Read more >
testcafe
In the API, use the [stopOnFirstFail](https://devexpress.github.io/testcafe/documentation/using-testcafe/programming-interface/runner.html#run) option.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found